OK, now I'm really confused! According to the sendmail documentation, at
, confDOMAIN_NAME is supposed to provide the fully-qualified domain name for my machine, e.g. $w.FOO.com , where $w is the short domain name. But this would mean changing sendmail.mc, remaking sendmail.cf and restarting sendmail every time my machine gets a new dynamic IP!
Anyway, assuming this is what you meant, I tried adding the line
with my current real IP in place of the x's, and
to send all outgoing mail via the ISP's SMTP server with ford@my_real_email_domain.com instead of email@example.com on the envelope.
I telnetted to localhost on port 25, and sendmail correctly claims to be xxx-xxx-xxx-xxx.mart-bsr1.chi-mart.il.cable.rcn.com. However, then I created a simple mail, containing the following:
I sent the mail using "sendmail -v -t < message", and got the following output (with addresses substituted throughout, apart from gluon.local):
me@another_real_email_address.com... Connecting to localhost.local. via relay...
220 xxx-xxx-xxx-xxx.mart-bsr1.chi-mart.il.cable.rcn.com ESMTP Sendmail 8.12.9/8.12.9; Mon, 24 Jan 2005 17:54:21 -0600
>>> EHLO gluon.local
xxx-xxx-xxx-xxx-xxx.mart-bsr1.chi-mart.il.cable.rcn.com Hello localhost [127.0.0.1], pleased to meet you
>>> MAIL From:<firstname.lastname@example.org> SIZE=78
250 2.1.0 <email@example.com>... Sender ok
>>> RCPT To:<me@another_real_email_address.com>
553 5.1.8 <me@another_real_email_address.com>... Domain of sender address firstname.lastname@example.org does not exist
503 5.0.0 Need RCPT (recipient)
250 2.0.0 Reset state
/home/ford/dead.letter... Saved message in /home/ford/dead.letter
Closing connection to localhost.local.
221 2.0.0 xxx-xxx-xxx-xxx.mart-bsr1.chi-mart.il.cable.rcn.com closing connection
The corresponding entries in /var/log/mail/info are:
Jan 24 17:54:17 gluon sendmail: j0ONsGgd024242: from=ford, size=78, class=0, nrcpts=1, msgid=<200501242354.j0ONsGgd024242@gluon.local>, relay=ford@localhost
Jan 24 17:54:26 gluon sendmail: j0ONsLBo024246: ruleset=check_rcpt, arg1=<me@another_real_email_address.com>, relay=localhost [127.0.0.1], reject=553 5.1.8 <me@another_real_email_address.com>... Domain of sender address email@example.com does not exist
Jan 24 17:54:26 gluon sendmail: j0ONsGgd024242: to=me@another_real_email_address.com, ctladdr=ford (501/501), delay=00:00:10, xdelay=00:00:09, mailer=relay, pri=30067, relay=localhost.local. [127.0.0.1], dsn=5.1.8, stat=User unknown
Jan 24 17:54:26 gluon sendmail: j0ONsLBo024246: from=<firstname.lastname@example.org>, size=78, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
So, two things appear to be wrong. Firstly, the mail is being sent from email@example.com, instead of from ford@my_real_email_domain.com. Secondly, I have relay=localhost, instead of relay=smtp.rcn.com, which suggests that the mail is being transmitted directly from my machine to the destination, instead of via smtp.rcn.com. Why are the MASQUERADE_AS and SMART_HOST not having any effect?