I recently modified sendmail.cf to use a third party SMTP server to send emails. It works great. But when I run sendmail from the command line, I have to specify the -C flag and force feed it the location of my sendmail.cf, or else it doesn't work.
So in other words, the following works great:
me@db0:~> sendmail -C/etc/mail/sendmail.cf -v
foo@bar.com
This is a test message.
foo@bar.com... Connecting to smtp.xxxxxx.com port 465 via relay...
...
foo@bar.com... Sent (OK ...)
However, if I don't specify the -C flag, sendmail doesn't consider what's in the sendmail.cf and barfs:
me@db0:~> sendmail -v
foo@bar.com
This is a test message.
foo@bar.com... Connecting to [127.0.0.1] via relay...
foo@bar.com... Deferred: Connection refused by [127.0.0.1]
I don't run sendmail as a daemon. I'm only using it to send emails. I know my modifications of sendmail.cf are correct because it works perfectly when I use the -C flag. I searched my disk to see if I could find another sendmail.cf on the machine and only the one in /etc/mail came up.
Any ideas why sendmail is not reading my sendmail.cf?
I'm running Sendmail version 8.14.2 on Fedora Core 8.