From: "Sharma, Ashish" on 8 Apr 2010 10:05 Hi, I have a postfix mail server over which I have deployed a custom content filter written in java. Now I introduced amavisd (containing clamav and spamassassin) as content filter such that the mail is passing in following manner: ===>mail from outside ===> Postfix ====> amavisd ===> custom content filter I referred the link(http://wiki.centos.org/HowTos/Amavisd) to setup amavisd(containing clamav and spamassassin) Here my setup is running ok when amavisd is bypassed and mail is directly being sent to custom content filter but I receive following error logs as soon as I start passing my mails via amavisd: Apr 7 11:36:14 ip-10-194-99-63 postfix/smtpd[3585]: connect from mail-pw0-f48.google.com[209.85.160.48] Apr 7 11:36:14 ip-10-194-99-63 postfix/smtpd[3585]: BABCC100191: client=mail-pw0-f48.google.com[209.85.160.48] Apr 7 11:36:14 ip-10-194-99-63 postfix/cleanup[3593]: BABCC100191: message-id=<x2h6c32076e1004070836p20a8cdabz104ac2c1d55a2abd(a)mail.gmail.com> Apr 7 11:36:15 ip-10-194-99-63 postfix/qmgr[3583]: BABCC100191: from=<ashiish.sharma(a)gmail.com>, size=1966, nrcpt=1 (queue active) Apr 7 11:36:45 ip-10-194-99-63 postfix/smtpd[3585]: disconnect from mail-pw0-f48.google.com[209.85.160.48] Apr 7 11:36:54 ip-10-194-99-63 amavis[3264]: (03264-02) (!)rw_loop: leaving rw loop, no progress, last event (select) 34.987 s ago Apr 7 11:36:54 ip-10-194-99-63 amavis[3264]: (03264-02) (!)SEND via SMTP: <> -> <ashiish.sharma(a)gmail.com>, 451 4.5.0 From MTA([10.194.99.63]:10030) during fwd-connect (Negative greeting: at (eval 57) line 596, <GEN18> line 162.): id=03264-02 Apr 7 11:36:54 ip-10-194-99-63 amavis[3264]: (03264-02) (!!)TROUBLE in check_mail: delivery-notification FAILED: temporarily unable to send DSN to <ashiish.sharma(a)gmail.com>: 451 4.5.0 From MTA([10.194.99.63]:10030) during fwd-connect (Negative greeting: at (eval 57) line 596, <GEN18> line 162.): id=03264-02 at /usr/sbin/amavisd line 11359, <GEN18> line 162. Apr 7 11:36:54 ip-10-194-99-63 amavis[3264]: (03264-02) (!)PRESERVING EVIDENCE in /var/amavis/tmp/amavis-20100407T113615-03264 Apr 7 11:36:54 ip-10-194-99-63 postfix/lmtp[3594]: BABCC100191: to=<ida6786ombor26(a)dev1.cpgtest.ostinet.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=40, delays=0.54/0.01/0/40, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=03264-02, delivery-notification FAILED: temporarily unable to send DSN to <ashiish.sharma(a)gmail.com>: 451 4.5.0 From MTA([10.194.99.63]:10030) during fwd-connect (Negative greeting: at (eval 57) line 596, <GEN18> line 162.): id=03264-02 at /usr/sbin/amavisd line 11359, <GEN18> line 162. (in reply to end of DATA command)) I have no idea where the problem is actually residing. Please help Thanks in advance Ashish Sharma
From: Wietse Venema on 8 Apr 2010 12:06 Sharma, Ashish: > Apr 7 11:36:54 ip-10-194-99-63 postfix/lmtp[3594]: BABCC100191: to=<ida6786ombor26(a)dev1.cpgtest.ostinet.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=40, delays=0.54/0.01/0/40, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=03264-02, delivery-notification FAILED: temporarily unable to send DSN to <ashiish.sharma(a)gmail.com>: 451 4.5.0 From MTA([10.194.99.63]:10030) during fwd-connect (Negative greeting: at (eval 57) line 596, <GEN18> line 162.): id=03264-02 at /usr/sbin/amavisd line 11359, <GEN18> line 162. (in reply to end of DATA command)) The Postfix SMTP server after the filter is giving problems. What is the result of: $ telnet 10.194.99.63 10030 Wietse
From: Mark Martinec on 8 Apr 2010 12:34 Ashish, > I have a postfix mail server over which I have deployed a custom content > filter written in java. > > Now I introduced amavisd (containing clamav and spamassassin) as content > filter such that the mail is passing in following manner: > > ===>mail from outside ===> Postfix ====> amavisd ===> custom content filter > > I referred the link(http://wiki.centos.org/HowTos/Amavisd) to setup > amavisd(containing clamav and spamassassin) > > Here my setup is running ok when amavisd is bypassed and mail is directly > being sent to custom content filter but I receive following error logs as > soon as I start passing my mails via amavisd: > > Apr 7 11:36:54 ip-10-194-99-63 > amavis[3264]: (03264-02) (!)rw_loop: leaving rw loop, no progress, > last event (select) 34.987 s ago Apparently your custom content filter is not responding with a SMTP greeting when amavisd tries to send a delivery notification to it. At log level 5 you can see what traffic is being passed on to the back-end server/scanner specified by $notify_method . Or do a packet capture on a loopback interface if using inet socket. Make sure your backend filter can handle multiple transactions within a single SMTP session. Btw, do you really want to send bounces too to the java filter? These could be sent directly to Postfix ($notify_method), while filtered messages could go to your filter ($forward_method). Mark
From: "Sharma, Ashish" on 9 Apr 2010 02:41 Wietse, Following is the requested result: $telnet 10.194.99.63 10030 Trying 10.194.99.63... Connected to ip-10-194-99-63.ec2.internal (10.194.99.63). Escape character is '^]'. 220 Hello Mail From:ashiish.sharma(a)gmail.com 503 5.5.1 Error: need EHLO command EHLO 250 Custom Java SMTP Server MAIL FROM:ashiish.sharma(a)gmail.com 250 Ok RCPT TO:cp_user(a)dev1.cpgtest.ostinet.net 250 OK DATA: 354 send data now Ashish sharma is testing this .. 250 message received Connection closed by foreign host. Thanks Ashish Sharma -----Original Message----- From: owner-postfix-users(a)postfix.org [mailto:owner-postfix-users(a)postfix.org] On Behalf Of Wietse Venema Sent: Thursday, April 08, 2010 9:37 PM To: Postfix users Subject: Re: amavis Delivery status notification(DSN) failing Sharma, Ashish: > Apr 7 11:36:54 ip-10-194-99-63 postfix/lmtp[3594]: BABCC100191: to=<ida6786ombor26(a)dev1.cpgtest.ostinet.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=40, delays=0.54/0.01/0/40, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=03264-02, delivery-notification FAILED: temporarily unable to send DSN to <ashiish.sharma(a)gmail.com>: 451 4.5.0 From MTA([10.194.99.63]:10030) during fwd-connect (Negative greeting: at (eval 57) line 596, <GEN18> line 162.): id=03264-02 at /usr/sbin/amavisd line 11359, <GEN18> line 162. (in reply to end of DATA command)) The Postfix SMTP server after the filter is giving problems. What is the result of: $ telnet 10.194.99.63 10030 Wietse
From: "Sharma, Ashish" on 9 Apr 2010 04:33
Mark, Following is the telnet log with my custom content filter: $ telnet 10.194.99.63 10030 Trying 10.194.99.63... Connected to ip-10-194-99-63.ec2.internal (10.194.99.63). Escape character is '^]'. 220 Hello HELO 250 Custom Java SMTP Server MAIL FROM:ashiiish.sharma(a)gmail.com 250 Ok RCPT TO: cp_user(a)dev1.cpgtest.ostinet.net 250 OK DATA 354 send data now Testing from local .. 250 message received Connection closed by foreign host. My custom content filter is able to support multiple transactions in a simple SMTP session. Also I changed the $notify_method and redirected it to the postfix, but I don't think it would have any impact on this whole setup. Still facing the same problem. Please help. My amavisd information is: Product name: amavisd-new Version: 2.6.4 Thanks in advance Ashish Sharma -----Original Message----- From: owner-postfix-users(a)postfix.org [mailto:owner-postfix-users(a)postfix.org] On Behalf Of Mark Martinec Sent: Thursday, April 08, 2010 10:04 PM To: postfix-users(a)postfix.org Subject: Re: amavis Delivery status notification(DSN) failing Ashish, > I have a postfix mail server over which I have deployed a custom content > filter written in java. > > Now I introduced amavisd (containing clamav and spamassassin) as content > filter such that the mail is passing in following manner: > > ===>mail from outside ===> Postfix ====> amavisd ===> custom content filter > > I referred the link(http://wiki.centos.org/HowTos/Amavisd) to setup > amavisd(containing clamav and spamassassin) > > Here my setup is running ok when amavisd is bypassed and mail is directly > being sent to custom content filter but I receive following error logs as > soon as I start passing my mails via amavisd: > > Apr 7 11:36:54 ip-10-194-99-63 > amavis[3264]: (03264-02) (!)rw_loop: leaving rw loop, no progress, > last event (select) 34.987 s ago Apparently your custom content filter is not responding with a SMTP greeting when amavisd tries to send a delivery notification to it. At log level 5 you can see what traffic is being passed on to the back-end server/scanner specified by $notify_method . Or do a packet capture on a loopback interface if using inet socket. Make sure your backend filter can handle multiple transactions within a single SMTP session. Btw, do you really want to send bounces too to the java filter? These could be sent directly to Postfix ($notify_method), while filtered messages could go to your filter ($forward_method). Mark |