fetchmail-friends
[Top] [All Lists]

[fetchmail]bounce problem because of handle_smtp_report()

2001-05-16 22:30:01
Hi,

I recently upgraded from fetchmail-5.3.0 to fetchmail-5.8.0. We have a
multidrop box for our office.

Previously, mails used to bounce when sent to a non-existent user.
Now, after upgradation, I have noticed that mails do not get bounced
when sent to a non-existent user. On logging in verbose mode, the
transaction goes as follows:

SMTP> MAIL FROM:<linuxers-admin(_at_)hbcse(_dot_)tifr(_dot_)res(_dot_)in> 
SIZE=3421 
SMTP< 250 2.1.0 <linuxers-admin(_at_)hbcse(_dot_)tifr(_dot_)res(_dot_)in>... 
Sender ok 
SMTP> RCPT TO:<amarg(_at_)bombay(_dot_)retortsoft(_dot_)com> 
SMTP< 550 5.1.1 <amarg(_at_)bombay(_dot_)retortsoft(_dot_)com>... User unknown 
SMTP> RSET 
SMTP< 250 2.0.0 Reset state 
Saved error is still 550 

On going through the diffs, I found the following diff in sink.c:

=========================================================================
--- fetchmail-5.3.0/sink.c      Wed May 16 13:30:09 2001
+++ fetchmail-5.8.0/sink.c      Wed May 16 13:30:09 2001
@@ -759,6 +660,10 @@
                else
                {
                    char        errbuf[POPBUFSIZE];
+                   int res;
+
+                   if ((res = handle_smtp_report(ctl, msg))==PS_REFUSED)
+                       return(PS_REFUSED);

                    strcpy(errbuf, idp->id);
                    strcat(errbuf, ": ");
=========================================================================

(I had a tough time getting the diff as the code in sink.c has been
reordered!)

The first thing that handle_smtp_report() does is send an RSET to
smtp port. This resets the connection to smtp port and the mail is
flushed later. The bounce message is not sent. The original message is
also not forwarded to postmaster. On removing the code and
recompiling, the transaction now goes as:

SMTP> MAIL FROM:<linuxers-admin(_at_)hbcse(_dot_)tifr(_dot_)res(_dot_)in> 
BODY=8BITMIME SIZE=3568 
SMTP< 250 2.1.0 <linuxers-admin(_at_)hbcse(_dot_)tifr(_dot_)res(_dot_)in>... 
Sender ok 
SMTP> RCPT TO:<amarg(_at_)bombay(_dot_)retortsoft(_dot_)com> 
SMTP< 550 5.1.1 <amarg(_at_)bombay(_dot_)retortsoft(_dot_)com>... User unknown 
SMTP listener doesn't like recipient address 
`amarg(_at_)bombay(_dot_)retortsoft(_dot_)com' 
...
[bounce message transaction skipped]
...
SMTP> RCPT TO:<postmaster(_at_)bombay(_dot_)retortsoft(_dot_)com> 
SMTP< 250 2.1.5 <postmaster(_at_)bombay(_dot_)retortsoft(_dot_)com>... 
Recipient ok 

And the transaction goes as before.

Is there any reason why handle_smtp_report() was added? I think it
should be removed. Or handle_smtp_report() should not send RSET to
smtp port.

Anyone else facing the same problem?

Sunil Shetye.

P.S.:

I had sent a similar mail before (with less details). I am not sure if
it has reached the mailing list.


<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail]bounce problem because of handle_smtp_report(), Sunil Shetye <=