Chris, > We have a case where we are occasionally losing mail sent through amavis. > We are using amavisd-new-2.6.1-2. Here's what's happening: > > Mail comes into postfix (port 25), postfix routes through amavis (10024), > which then routes to backend postfix (10025). I think this is a common, if > not standard, configuration people use. > > Postfix (25) is accepting the mail. It then tries to deliver it to amavis, > and it 'thinks' it is successful, so postfix removes it from the queue. > Amavis actually had a problem, but instead of returning an error code to > postfix, it inadvertantly returned a success code. Here are the applicable > log entries:
> Feb 18 19:44:17 gwsinam01 amavis[18065]: (18065-02-5) Negative SMTP resp. > to DATA: 250 Ok > Feb 18 19:44:17 gwsinam01 amavis[18065]: (18065-02-5) Passed CLEAN, > [165.212.54.192] [165.212.54.192] <[email protected]> -> > <[email protected]>, Message-ID: > <997nbrtsd9056...@per1-denvercolo-gwsin01>, mail_id: WWoHsFeMNE+K, Hits: -, > size: 1511, pt: 18, queued_as: 250 Ok, 77 ms > > This problem is not easy to duplicate, but when it starts to happen on a > box, it seems that it will continue to happen periodically until amavis is > restarted. It appears related to the most important bug fixed by 2.6.2: - when feeding a message by SMTP back to MTA and MTA rejects a recipient as invalid and a smtp connection cache is enabled, the SMTP protocol can get out of step, rejecting the next message in the same connection with a "503 5.5.1 Error: nested MAIL command"; this only affects (hopefully) rare sites where recipient validation is performed after content filtering instead of before content filtering; reported by Richard Smits; > The "Negative SMTP resp. to DATA" line seems to indicate that the amavis > SMTP transaction with the backend postfix has somehow gotten out of sync. Right. The response to DATA should be 3xx, not 2xx. > We thought that maybe this was due to smtp connection caching, so we added > the following lines to the config file about a month ago: > > $smtp_connection_cache_enable = 0; > $smtp_connection_cache_on_demand = 0; Good thinking. > However, the problem occurred again yesterday even with this setting. See if the patch I posted for 2.6.1 helps (or upgrade to 2.6.2): http://marc.info/?l=amavis-user&m=122055191316224 > In addition to the log entries above that show we are losing mail, we see > other items in the log that are similar in nature but don't cause a loss of > mail. Here is another group of log entries: > Feb 18 03:20:16 gwsinam01 amavis[22317]: (22317-02) (!)rw_loop: leaving rw > loop, no progress > Feb 18 03:20:16 gwsinam01 amavis[22317]: (22317-02) (!)FWD via SMTP: > <[email protected]> -> > <[email protected]>, 451 4.5.0 From > MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting: at (eval 87) > line 555.): id=22317-02 > Feb 18 03:20:16 gwsinam01 amavis[22317]: (22317-02) Blocked MTA-BLOCKED, > [165.212.54.192] [165.212.54.192] <[email protected]> -> > <[email protected]>, Message-ID: > <723nbrdtc7056...@per1-denvercolo-gwsin01>, mail_id: 8jTOPl+MEkHm, Hits: -, > size: 1516, pt: 18, 30080 ms > This message was rejected by amavis, but was properly deferred and then > retried successfully by postfix. I'd be interested log message before the timeout happens at 'rw_loop: leaving rw', to see at what phase of a SMTP transaction the session was, along with timestamps. It is possibly related, or it could just be due to an unresponsive MTA. Mark ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ AMaViS-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/
