Mark, Accepted your point, but I am actually doing what you have suggested already.
Maybe the proof lies in the fact that my custom content filter is working fine when amavisd is not used and postfix is directly communicating with my component. I am not receiving such problem in that case. Is it because postfix is little lax in enforcing smtp for content filter? Thanks in advance Ashish Sharma -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Mark Martinec Sent: Friday, April 09, 2010 6:07 PM To: [email protected] Subject: Re: amavis Delivery status notification(DSN) failing Ashish, > Attached is the full level 5 log for your reference. Thank you! Apr 9 07:17:31 ip-10-194-99-63 amavis[18885]: (18885-05) (about to connect to [127.0.0.1]:10030) FWD via SMTP: <[email protected]> -> <[email protected]> Apr 9 07:17:31 ip-10-194-99-63 amavis[18885]: (18885-05) smtp session: setting up a new session Apr 9 07:17:31 ip-10-194-99-63 amavis[18885]: (18885-05) establish_or_refresh, state: down Apr 9 07:17:31 ip-10-194-99-63 amavis[18885]: (18885-05) smtp creating socket by IO::Socket::INET to [127.0.0.1]:10030 Apr 9 07:17:31 ip-10-194-99-63 amavis[18885]: (18885-05) rw_loop: needline=1, flush=0, wr=0, timeout=35 Apr 9 07:17:31 ip-10-194-99-63 amavis[18885]: (18885-05) rw_loop: receiving Apr 9 07:17:31 ip-10-194-99-63 amavis[18885]: (18885-05) rw_loop read 10 chars< 220 Hello\n Apr 9 07:17:31 ip-10-194-99-63 amavis[18885]: (18885-05) rw_loop: needline=1, flush=0, wr=0, timeout=35 Apr 9 07:17:56 ip-10-194-99-63 postfix/smtpd[19431]: disconnect from mail-pw0-f48.google.com[209.85.160.48] Apr 9 07:18:06 ip-10-194-99-63 amavis[18885]: (18885-05) (!)rw_loop: leaving rw loop, no progress, last event (select) 34.994 s ago Your java filter sent a greeting: "220 Hello\n" instead of: "220 Hello\r\n". Amavisd waited 30 seconds but end of line (CR LF) never arrived, so the session was aborted. RFC 5321 (and RFC 2821 and RFC 821) requires that SMTP commands and replies are terminated by a CRLF, not by a single LF character. Mark
