On my system i have set amavis-ng with a session
timeout so it will do the processing before hanging up
with the mail server. I have had a few messages come
through in the past day that appear to violate the MIME
standard. As such they do not unpack correctly The
result is that amavis-ng sticks a copy of the message in
the problem directory and then hangs up the smtp
connection with my local mail server. My mail server
realizes the smtp connection was terminated and sticks
the message back into the queue and tries to deliver it
later. Since it has an internal formatting error it will
contine to have problems later and generate more error
messages. What I believe the correct behavoir should
be on messages that have a formatting error such as
this should be is either have amavis do a hard rejection
causing my local mail server to bounce it or have
amavis tell the mail server it is accepting it, but then
stick it into the problem directory.
Logged In: YES
user_id=572223
With further thought i think the easiest way to implement this
would be to basically copy the code used to quarantine a
message except make the appropriate changes for the
different e-mail and directory.
Logged In: YES
user_id=58184
This is not a bug. This behavior is intended.
Remove the offending message from the queue and use
amavis-inject to send the quarantined message.
However, I'm interested in how the message is malformed.
Could you send me a copy?
-Hilko
Problem E-Mail
Logged In: YES
user_id=572223
I have uploaded an example e-mail that has a problem.
Logged In: YES
user_id=572223
why is this the intended behavior. I see no point in having the
mail sit in the queue only to be passed in again and again
putting multiple copies of it on the hd and sending multiple e-
mails about it. It puts a copy of the message into the
problems folder so pulling it out of the queue would not cause
one to lose the message. (If there is a good reason I would
like to hear it). At the least could you make it an option in the
config file.
Logged In: YES
user_id=58184
Why is this intended?
If the message violates the MIME standard and can't be
unpacked properly, it should be inspected by the admin. It
is the admin's job to fix the problem.
-Hilko
Logged In: YES
user_id=572223
I agree that it is the admin's job to fix it. But the way it is now
he gets a notice every 1 (or how ever often the mail server
tries to deliver it) and a new copy is placed in the problem
directory. One notification should be enough. And then he
can fix whatever problem and use the amavis-inject script to
put it back in when it is fixed. I still see no reason to notify
the admin over and over.
Logged In: YES
user_id=572223
I think i have patched SMTP.pm to do what (to me) makes
sense. The below code change (about line 408) logs the
message to the file and then drops it from the mail servers
queue. This way there is a copy if the admin needs to fix it or
otherwise deal with it. In addition the mail server will not try to
continue to deliver it and repeatadly fail.
# First try to put the message into the problems directory.
if (AMAVIS->quarantine_problem_message($args)) {
+ $self->drop_message($args);
return 1;
}
# If that fails, reject the message
Logged In: YES
user_id=58184
I received a bug report against the Debian package and have
come to the conclusion that a proper LMTP implementation
would be the proper solution, at least for the Postfix setup.
Thanks,
-Hilko
Logged In: YES
user_id=572223
I'm not using the postfix mode in amavis-ng. I'm using the
SMTP daemon mode. Simply adding in a call to
drop_message after the quarantine will remove it from the
mail queue after a copy has been saved as a problem
message.