[Greylist-users] My incoming mail is relay, not smtp

Tim Freeman tim at fungible.com
Thu Nov 20 23:34:12 PST 2003


I'm running one computer that receives mail from arbitrary machines on
the internet via SMTP and sends outgoing mail through a smart host.  Apparently
in my configuration, when Sendmail 8.12.9 contacts the milter, the value of
"{mail_mailer}" is "relay" instead of "smtp".  This causes
relaydelay.pl version 0.04 to never tempfail anything.  The obvious "fix" was to
hack relaydelay:

@@ -614,7 +613,10 @@
   #   that and other "local looking" from addresses as using the local mailer, 
   #   even though they are coming from off-site.  So we have to exclude the 
   #   "local" mailer from the checks since it lies.
-  if (($mail_mailer !~ /smtp\Z/i) and ($mail_mailer !~ /\Alocal\Z/i)) {
+  # Sendmail says I'm doing relaying, even when it's really just
+  # smtp delivery.  Don't know why.  Tim Freeman 20 Nov 2003.
+  #if (($mail_mailer !~ /smtp\Z/i) and ($mail_mailer !~ /\Alocal\Z/i)) {
+  if (($mail_mailer !~ /relay\Z/i) and ($mail_mailer !~ /\Alocal\Z/i)) {
     # we aren't using an smtp-like mailer, so bypass checks
     print "  Mail delivery is not using an smtp-like mailer.  Skipping checks.\n" if ($verbose);
     reverse_track($dbh, $mail_from, $rcpt_to) if ($reverse_mail_tracking and $rcpt_mailer !~ /\Alocal\Z/i);

but this change must be bad because surely someone put the test for smtp
in there for a reason, and this change will break relaydelay for them.

Sendmail is doing a fine job of delivering mail even though it thinks
everything is a relay, and with the above hack relaydelay.pl seems to
be doing a fine job of greylisting.  I've been running it for about an
hour so I can't be sure yet.

Here's my sendmail.mc with the comments ripped out:

define(`_USE_ETC_MAIL_')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc, v 8.12.9-5 2003-07-01 23:39:44 cowboy Exp $')
OSTYPE(`debian')dnl
DOMAIN(`debian-mta')dnl
LOCAL_CONFIG
LOCAL_CONFIG
define(`confSAFE_FILE_ENV',             `')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`nocanonify')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
MASQUERADE_AS(`fungible.com')dnl
dnl MASQUERADE_DOMAIN(`fungible.com')dnl
define(`SMART_HOST', `mail.pacbell.net.')dnl
define(`MILTER',1)dnl
define(`confMAX_DAEMON_CHILDREN', `40')dnl
MAILER(local)dnl
MAILER(smtp)dnl
INPUT_MAIL_FILTER(`relaydelay', `S=local:/var/run/relaydelay.sock, T=S:1m;R:2m;E:3m')dnl

Does anyone know:

1. Why relaydelay doesn't want to tempfail when the incoming mail is
   from a relay?
2. Why sendmail thinks all my incoming email is from relays when it isn't?
-- 
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