[Greylist-users] My incoming mail is relay, not smtp
Tim Freeman
tim at fungible.com
Fri Nov 21 08:46:02 PST 2003
>The value of the {mail_mailer} is whatever the name of the mailer that
>sendmail says is being used for delivery (as defined in your sendmail.cf).
>Normally, this is smtp or esmtp.
I think it's the mailer that would be used to send a bounce message
back to the alleged sender.
Their meanings are documented in the "Sendmail Installation and
Operation Guide", which is /usr/share/doc/sendmail/op/op.txt.gz on my
Debian system, and that file says:
${mail_mailer}
The mailer from the resolved triple of the
address given for the SMTP MAIL command. Defined
in the SMTP server only.
${rcpt_mailer}
The mailer from the resolved triple of the
address given for the SMTP RCPT command. Defined
in the SMTP server only after a RCPT command.
$r Protocol used to receive the message. Set from
the -p command line flag or by the SMTP server
code.
RFC 821 says RCPT identifies the recipient and MAIL identifies the
sender. (I'm not being pedantic; I had to look it up myself just
now.)
You might want "r" instead of "{mail_mailer}". Unfortunately, "r" is
not propagated by default from sendmail to the milter, so I also need
to put this in my sendmail.mc:
define(`confMILTER_MACROS_ENVRCPT', ``{rcpt_mailer}, {rcpt_host}, {rcpt_addr}, r'')
I did this right before my MAILER(local) line, and now I get a value
for "r" in relaydelay.pl. The value for "r" appears to always be
ESMTP or SMTP on my machine, even when I do "mail tim at localhost".
Is there a way for me to reproduce the situation where the mail wasn't
sent by SMTP and it's therefore important for relaydelay not to
tempfail it?
>My guess is that because you have a smarthost defined, sendmail is picking
>the relay mailer because it would normally "relay" all mail to the
>smarthost, and not because it thinks the sending mail host is a relay.
You're right. If I take out the smarthost declaration, then
mail_mailer for mail from outside is esmtp instead of relay. Note
that this is changing the *outgoing* mailer that would be used for a
bounce message, but the comment on line 614 of relaydelay.pl says
we're trying to pay attention to the *incoming* mailer that was used
to give us the mail:
# Only do our processing if the inbound mailer is an smtp variant.
These will be different in exactly the situation I'm in, where
incoming mail comes through a different path from outgoing.
>The change you made would be required for anyone who isn't using the
>standard smtp or esmtp mailers (or isn't using the standard names for those
>mailers). It should not cause any problems for you.
I agree that things are working fine for me right now. I'm poking at
this because I want to understand it.
--
Tim Freeman tim at fungible.com
GPG public key fingerprint ECDF 46F8 3B80 BB9E 575D 7180 76DF FE00 34B1 5C78
Your levity is good. It relieves tension and fear of death. -- Terminator 3
More information about the Greylist-users
mailing list