Pavel Kankovsky writes:
> 1. QSBMF may be Simple to Parse but it cannot be as simple as $EXTn
Just about. See below.
> 2. qmail-VERP combo should not be advertised and/or documented as
> something *eliminating* the need to parse bounces completely
Sheesh, Pavel, get a life or something! The statement of the problem
that VERP solves is that there are N+1 foreign bounce message formats,
where N is the number that you have seen before. VERP lets you
totally escape having to parse remote bounce messages. Local bounce
messages use QSBMF. Is this such a big deal??
Here's some perl code which splits out bounces, and also prunes some
stupid sendmail warnings.
$list = shift;
$_ = $ENV{LOCAL};
($addr) = m/$list-owner-(.*)/i or die "doesn't match the list name";
if ($addr) {
$addr =~ s/=([^=]*)$/\@$1/;
while(<>) {
exit 99 if /THIS IS A WARNING MESSAGE ONLY/;
exit 99 if /^Subject: WARNING: message delayed at/;
exit 99 if /^Subject: Warning From uucp/;
exit 99 if /^Subject: Returned mail: Deferred/;
}
&handle_addr($addr);
} else {
$/="";
$_=<>; # get rid of the email header.
$_=<>; # get the QSBMF
/^Hi. This is the/ or die "This is not a qmail bounce message";
while(<>) {
last if /^-/;
/^<(.*)>/ or die "No recipient address";
&handle_addr($1);
}
}
--
-russ nelson <[EMAIL PROTECTED]> http://russnelson.com
Crynwr sells support for free software | PGPok | "Ask not what your country
521 Pleasant Valley Rd. | +1 315 268 1925 voice | can force other people to
Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | do for you..." -Perry M.