From: "Sharma, Ashish" on
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: owner-postfix-users(a)postfix.org [mailto:owner-postfix-users(a)postfix.org] On Behalf Of Mark Martinec
Sent: Friday, April 09, 2010 6:07 PM
To: postfix-users(a)postfix.org
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:
<ashiish.sharma(a)gmail.com> -> <ida6786ombor26(a)dev1.cpgtest.ostinet.net>
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

From: Mark Martinec on
Ashish,

>> 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.
>
> 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?

Yes, it is. (in general, not specific to content filter interfacing)

Mark

From: Wietse Venema on
Sharma, Ashish:
> 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.

Postfix accepts non-compliant SMTP responses from your home-grown
SMTP code. That does not mean that your program is correct.

You need to fix your code, or better, use code that already works
instead of re-inventing SMTP badly.

Wietse

From: "Sharma, Ashish" on
Andreas,

Thanks for the suggestion,

On comparison I found this http://code.google.com/p/subethasmtp/ to be more appropriate(lightweight and easy to use for a simple postfix content filter) than the heavyweight Apache James.

Ashish Sharma

-----Original Message-----
From: owner-postfix-users(a)postfix.org [mailto:owner-postfix-users(a)postfix.org] On Behalf Of lst_hoe02(a)kwsoft.de
Sent: Friday, April 09, 2010 7:37 PM
To: postfix-users(a)postfix.org
Subject: RE: amavis Delivery status notification(DSN) failing

Zitat von "Sharma, Ashish" <ashish.sharma3(a)hp.com>:

> Wietse,
>
> Thanks for your suggestion.
>
> Since I am new in this can you suggest some java based deployments
> that I can use. I too looked for what you have suggested but maybe I
> didn't looked hard enough.
>
> Thanks in advance
> Ashish Sharma


http://james.apache.org/

Regards

Andreas