LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Listserv Admin <[log in to unmask]>
Fri, 2 Jun 2000 13:35:08 -0400
TEXT/PLAIN (52 lines)
As an aside and an alternative to patching sendmail.  We decided not to
patch sendmail and to set up probes using procmail instead. In case this
might prove helpful to someone who doesn't want to touch sendmail and who
has procmail and perl on their system.

This will need some local customization, domain names, addresses etc.
Format of the 550 error line changed in Sendmail 8.10; take the '\S+ '
out if running an earlier version. The Subject: line of notices from
earlier Sendmails is also different. If I remember correctly,
'* ^Subject: *Returned mail' is what is needed. In most situations the
'/usr/bin/rsh post ' can be omitted too.

--Trish

----- excerpt from postmaster .procmailrc:
# -- Listserv probes, transfer failures
:0 HBc
* ^From:.*Mailer-Daemon@post\.queensu\.ca
* ^Subject: *Postmaster notify:
* ^To: *postmaster@post\.queensu\.ca
* ^550 .*\<owner-.+@POST\.QUEENSU\.CA\>\.\.\. User unknown
| $MAILDIR/lsv-probe-forward 2>>$MAILDIR/lsv-probe.log
:0 HB
* ^From:.*Mailer-Daemon@post\.queensu\.ca
* ^Subject: *Postmaster notify:
* ^To: *postmaster@post\.queensu\.ca
* ^55[0-9] .*(\<owner-.+@POST\.QUEENSU\.CA\>\.\.\. User unknown|\<LISTSERV@)|\<[log in to unmask]* Deferred\:
| /bin/tail +2 | $SENDMAIL [log in to unmask]

----- lsv-probe-forward:
#!/opt/local/bin/perl
$from = <>;
@buf = ();  $hit = "";
while (<>) {
  if (/^550 \S+ \<(owner\-.+\@POST\.QUEENSU\.CA)\>\.\.\. User unknown/) {
        $hit = $1;
        next;   # don't include in forwarded message
  }
  push(@buf,$_);
}
exit unless $hit;
$rsh = "|/usr/bin/rsh post /usr/local/listserv/bin/lsv_amin -t \"'$hit'\"";
print STDERR $from;
print STDERR $rsh, "\n";
open(RSH, $rsh ) || die "Could not open rsh pipe: $!\n";
print RSH $from;
print RSH @buf;
while (<>) {
  print RSH $_;
}
close RSH;

ATOM RSS1 RSS2