sendmail parameter "C"

Carsten horde-groupware at familie-lahme.de
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 "main.cf".
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/main.cf just containing: "relayhost = [my.smart.host.ip]"
#3 send mail using this command: "cat mysimpletextfile | sendmail -t  
-C /var/tmp"

But regardless, what I put into the main.cf, 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 main.cf found and stops.

What am I doing wrong?

br
Carsten
-- 
Was dem Einen sein Ferrari,
ist dem Anderen seine Signatur



Mehr Informationen über die Mailingliste postfix-users