Share

Sendmail Jilter

Tracker: Bugs

9 Custom status not working - ID: 1216158
Last Update: Comment added ( neilagg )

Hello:

When I reject a connection, I run this code in my
handler's connect method:

String[] messages = new String[1];
messages[0] = "Too many connections
from "+ipAddressStr+", please try again later";
return JilterStatus.makeCustomStatus("553", "5.3.0",
messages );

But, when I get the rejection via email, it has this:

----- The following addresses had permanent fatal
errors -----
<test@jamm3.jammconsulting.com>
(reason: 554 jamm3.JAMMConsulting.com ESMTP
not accepting messages)

----- Transcript of session follows -----
... while talking to jamm3.jammconsulting.com.:
<<< 554 jamm3.JAMMConsulting.com ESMTP not
accepting messages
554 5.0.0 Service unavailable

The details has this:

Reporting-MTA: dns; jamm2.JAMMConsulting.com
Arrival-Date: Mon, 6 Jun 2005 22:49:50 -0500

Final-Recipient: RFC822;
test@jamm3.jammconsulting.com
Action: failed
Status: 5.5.0
Diagnostic-Code: SMTP; 554
jamm3.JAMMConsulting.com ESMTP not accepting
messages
Last-Attempt-Date: Mon, 6 Jun 2005 23:15:47 -0500

It seems the custom status is not working.

If you want to see my code, I am willing to post it.

Thanks,
Neil


Neil Aggarwal ( neilagg ) - 2005-06-07 04:22

9

Closed

None

Nobody/Anonymous

None

None

Public


Comments ( 4 )




Date: 2005-08-25 04:05
Sender: neilagg

Logged In: YES
user_id=343449

Need to use envrcpt instead of connect for the custom
status. The Sendmail MTA intentionally overrides custom
status codes on the connect callback.


Date: 2005-06-25 08:49
Sender: bcrProject Admin

Logged In: YES
user_id=6616

From the discussion on the mailing list:

I took a quick look at the Sendmail 8.13.2 source and saw the following
in sendmail/milter.c :

/*
** SMFIR_REPLYCODE can"t work with connect due to
** the requirements of SMTP. Therefore, ignore the
** reply code text but keep the state it would reflect.
*/

So the bottom line is I think what I was mumbling about before -- due to

the fact that the connect response is "well formed", the MTA is
restrictive about what can be put in here.

Final answer is "you can't customize the banner -- sorry".


Date: 2005-06-22 20:49
Sender: neilagg

Logged In: YES
user_id=343449

I did some additional testing and found out something
interesting:

If I put a custom status on the connect method of the
processor, I get the generic response:
reason: 554 jamm3.JAMMConsulting.com ESMTP not
accepting messages

But, when I put the custom status on the envrcpt method of
the processor, I get the rejection with the custom status
code.

It seems from this that the sendmail daemon on the sending
server is not correclty picking up the custom reply code on a
connect command to the remote daemon. I think this is a
bug in the sendmail code.



Date: 2005-06-07 18:08
Sender: neilagg

Logged In: YES
user_id=343449

I tried tracing through the jilter sources where it is generating
the custom status message and it looks like it is generating
correctly but the failure report still has a different response
code.

Could this be the sending mail server (sendmail on Fedora
Core 2) is over-riding the failure code? Why would it do that?

I have a test environment set up if you need to play with it.


Log in to comment.




Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2005-08-25 04:05 neilagg
close_date - 2005-08-25 04:05 neilagg
priority 5 2005-06-07 04:25 neilagg