Setup: Single user linux machine running sendmail-8.14.4
Summary:
Using a Smart Host with SMTP authentication, I find that any mail I
send out, regardless of who it is from will have the From line
rewritten by the host set as smart host in
sendmail.mc with:
define(`SMART_HOST',`
smtp.example.com')dnl
And with something like this in /etc/mail/authinfo
Authinfo:
smtp.example.com "U:root" "
I:ha...@example.com" "P:??XX??" "M: LOGIN PLAIN"
------- --------- ---=--- --------- --------
Details:
Like many folks, I have more than 1 email address and from more than 1
domain. So I might send a message with the from line:
From:
ha...@example.com
or
From: ha...@NOTexample.com
But regardless of which I use, the smart host, and I guess not
surprisingly, will rewrite that from line using the username in the
authinfo credentials and its own domain.
I'd like to make sendmail pick the smart host to send mail to, by
examining the `From: ' line in outgoing mail.
Googling around I found something written by A. Filip in 1999, but not
the original message. Apparently that original message is no longer
available. However the main points were reposted by A Filip in this
thread:
http://groups.google.com/group/comp.os.linux.setup/browse_thread/thread/6dd01d889fccfd50/31fb588a9c55fc4d%2331fb588a9c55fc4d
I wondered if that technique is still valid in recent versions of
sendmail but also, that technique talks about using the `envelope
sender' address to determine `Smart Host' which might not be the same
as the `From: ' line.
I wondered if anyone can give me a URL or some coaching toward making
sendmail use specific Smart Host according to domain used in the
outgoing `From: ' line