Re: [Exim] amavis problem with vacation/autoreply .-(

Top Page
Delete this message
Reply to this message
Author: Peter Benie
Date:  
To: Michael Thies
CC: exim-users
Subject: Re: [Exim] amavis problem with vacation/autoreply .-(
Michael Thies writes ("[Exim] amavis problem with vacation/autoreply .-("):
> 2001-12-19 16:01:22 16GiDi-0002FZ-00 <= <> R=16GiDh-0002FR-00 U=mth P=local S=1166
> 2001-12-19 16:01:22 16GiDi-0002FZ-00 => michael@??? R=amavis_router T=amavis
> 2001-12-19 16:01:22 16GiDi-0002FZ-00 Completed
>
> 16GiDi-0002FZ-00 never leaves the amavis_router .-(
> And this mail isn't found anywhere on the filesystem.
>
> Maybe one of you has an idea, why this is going so wrong.
>
> ===snip===
>
> amavis:
> driver = pipe
> command = "/usr/sbin/amavis -f ${sender_address} -d ${pipe_addresses}"


The problem is a combination of two bugs in amavis.

1) amavis' handling of <> is broken

[SF Bug #44959 - closed]
The line '$SENDER = "<>" if ($SENDER eq "");' occurs after the command
line for exim has been constructed. This means that exim sees:
exim -oMr scanned-ok -i -f "" recipients....
which is broken. What ought to happen is that amavis fails, and the
message is frozen, however...

2) amavis' handling of exim's exit status is broken

[SF Bug #449456 - closed]
More specifically, it uses the wait status '$?', which is 256 in this
case, as an exit status. Only 0-255 are defined as meaningful exit
statuses, and this is enforced on some OSes, such as Linux, by only
using the least significant byte. The result is that amavis fails to
forward the message and returns exit status 0, so the mail is lost.

The first bug is closed because a workaround in the FAQ
http://www.amavis.org/amavis-faq.php3

The second bug is closed because I couldn't convince the authors that
checking exim's exit status was an important part of having a reliable
mail system.

Peter