sendmail parameter "C"

Carsten horde-groupware at
Do Feb 14 12:46:07 CET 2019

Hi list,

man pages say, that there is a parameter "-C" to give sendmail an  
alternative config file "".
My purpose is to have different configurations on sending mails under  
certain conditions.
Most simple is to use a dedicated smarthost for a special script w/o  
changing the configuration of the core sendmail/postfix config.

I tried this:
#1 create a simple text file containing "From", "To", "Subject" and some text.
#2 create a /var/tmp/ just containing: "relayhost = []"
#3 send mail using this command: "cat mysimpletextfile | sendmail -t  
-C /var/tmp"

But regardless, what I put into the, sendmail allways uses the  
"regular" mail server.
Even so if I put some unreachable IP in the file, it successfully  
submits the mail.
If I change the "-C" parameter to some faulty string like "-C  
/var/tux", sendmail claims no found and stops.

What am I doing wrong?

Was dem Einen sein Ferrari,
ist dem Anderen seine Signatur

Mehr Informationen über die Mailingliste postfix-users