Lloyd Zusman <[EMAIL PROTECTED]> writes:
> Randall Shaw <[EMAIL PROTECTED]> writes:
>
>> [ ... ]
>>
>> What we are attempting to solve, is killing those messages from being
>> deferred and thus sitting in the mail queue with no hope of ever returning
>> the failure notice to the original sender.
>
> I came up with a hack to solve this exact problem. I did it as follows.
>
> First, I put the following line in my /etc/syslog.conf file:
>
> mail.info |exec /usr/bin/nice -7 /usr/local/bin/mailLogger
>
> The mailLogger script is written in Perl and routes and filters various
> mail-related syslog messages that come to it via stdin. Among other
> things, it contains the following code
>
>
> while (defined(my $line = <STDIN>)) {
> chomp($line);
> # ... etc. ...
> if ($line =~ m/\bcouriersmtp:\s+id=(\S+?),.*:\s+deferred\s*$/) {
> my $id = $1;
> system("/usr/local/bin/maybeCancel $id 1>/dev/null 2>&1 &");
> }
> # ... etc. ...
> }
>
> [ ... ]Also, attached is my maybeCancel script.
maybecancel
Description: maybeCancel
-- Lloyd Zusman [EMAIL PROTECTED] God bless you.
