fetchmail-friends
[Top] [All Lists]

[fetchmail]Fetchmail error after SMTP error

2005-02-02 06:55:38
Hello List,

I have searched the Net now for some time, finding several people with
similar problems, but unfortunately no satisfying solution.
The problem is that fetchmail "hangs" when trying to deliver an email
with invalid from-address to postfix.

When my local postfix complains with error code 501 (invalid address
syntax), I would like fetchmail to simply ignore this message since it
is most certainly spam.
So what I did was adding the antispam 501 option to each account I poll
(It is actually 2 accounts, but I stripped one in the logs below since
they are identical except for the username). Unfortunaltely this does
not help at all.

I manually sent a test message to my mail provider consisting of the
following text (raw SMTP data), which triggers the error below:
----snip-----
From: <X[5-](_at_)yebox(_dot_)com>
To: XXXXX2(_at_)YYYYY(_dot_)ZZ
Subject: testmail

test
1
2
3
----snap-----

I think the problem is that fetchmail starts reading the message headers
until the SMTP error occurs, and then gets confused when the pop3 server
keeps sending the body.

This is extremely annoying because it leads to the invalid email
blocking the retrieval of any message in that mailbox until I manually
delete the message on the pop3 server.

Below are the output of fetchmail -V and fetchmail -v -v.



I would be thankful for any hint to solving this.

Tobias Meyer


P.S.: I hope i do not double post this now - my first attemt seems to be stuck somwhere

------------------------------------------------------------------

fetchmail -V

This is fetchmail release 6.2.3+POP2+RPA+NTLM+SDPS+SSL+OPIE+NLS
Fallback MDA: (none)
Linux majestix 2.4.21-266-default #1 Fri Dec 10 16:40:59 UTC 2004 i586
i586 i386 GNU/Linux
Taking options from command line and /home/XXXXX/.fetchmailrc
Idfile is /home/XXXXX/.fetchids
Fetchmail will forward misaddressed multidrop messages to XXXXX.
Fetchmail will direct error mail to the postmaster.
Options for retrieving from XXXXX2(_at_)YYYYY(_dot_)ZZ@post.strato.de:
  True name of server is post.strato.de.
  Protocol is POP3.
  All available authentication methods will be tried.
  Server nonresponse timeout is 30 seconds.
  Default mailbox selected.
  All messages will be retrieved (--all on).
  Fetched messages will not be kept on the server (--keep off).
  Old messages will not be flushed before message retrieval (--flush
off).
  Rewrite of server-local addresses is enabled (--norewrite off).
  Carriage-return stripping is disabled (stripcr off).
  Carriage-return forcing is disabled (forcecr off).
  Interpretation of Content-Transfer-Encoding is enabled (pass8bits
off).
  MIME decoding is disabled (mimedecode off).
  Idle after poll is disabled (idle off).
  Nonempty Status lines will be kept (dropstatus off)
  Delivered-To lines will be kept (dropdelivered off)
  Messages will be SMTP-forwarded to: majestix.dkgd.local
  Recognized listener spam block responses are: 501 550 571 554
  Single-drop mode: 1 local name(s) recognized.
  No UIDs saved from this host.
  Poll trace information will be added to the Received header.

---------------------------------------------
fetchmail -v -v

fetchmail: 6.2.3 querying post.strato.de (protocol POP3) at Mon 31 Jan
2005 02:08:34 PM CET: poll started
fetchmail: POP3< +OK POP3 server ready
<366364(_dot_)14343(_dot_)1107176914(_at_)post(_dot_)webmailer(_dot_)de>
fetchmail: POP3> CAPA
fetchmail: POP3< +OK Capability list follows:
fetchmail: POP3< EXPIRE NEVER
fetchmail: POP3< PIPELINING
fetchmail: POP3< RESP-CODES
fetchmail: POP3< TOP
fetchmail: POP3< USER
fetchmail: POP3< UIDL
fetchmail: POP3< IMPLEMENTATION MH/2.7.0b4+MVE
fetchmail: POP3< .
fetchmail: POP3> USER XXXXX2(_at_)YYYYY(_dot_)ZZ
fetchmail: POP3< +OK Waiting for password
fetchmail: POP3> PASS
fetchmail: POP3< +OK User logged in, proceed.
fetchmail: selecting or re-polling default folder
fetchmail: POP3> STAT
fetchmail: POP3< +OK 1 479
1 message for XXXXX2(_at_)YYYYY(_dot_)ZZ at post.strato.de (479 octets).
fetchmail: POP3> LIST
fetchmail: POP3< +OK 1 message, listing follows
fetchmail: POP3< 1 479
fetchmail: POP3< .
fetchmail: POP3> RETR 1
fetchmail: POP3< +OK message follows
reading message XXXXX2(_at_)YYYYY(_dot_)ZZ@post.strato.de:1 of 1 (479 octets)
About to rewrite From: <X[5-](_at_)yebox(_dot_)com>
Rewritten version is From: <X[5-](_at_)yebox(_dot_)com>

About to rewrite To: XXXXX2(_at_)YYYYY(_dot_)ZZ
Rewritten version is To: XXXXX2(_at_)YYYYY(_dot_)ZZ

fetchmail: SMTP< 220 majestix.dkgd.local ESMTP Postfix
fetchmail: SMTP> EHLO localhost
fetchmail: SMTP< 250-majestix.dkgd.local
fetchmail: SMTP< 250-PIPELINING
fetchmail: SMTP< 250-SIZE 102400000
fetchmail: SMTP< 250-VRFY
fetchmail: SMTP< 250-ETRN
fetchmail: SMTP< 250-XVERP
fetchmail: SMTP< 250 8BITMIME
fetchmail: forwarding to majestix.dkgd.local
fetchmail: SMTP> MAIL FROM:<X[5-](_at_)yebox(_dot_)com> SIZE=479
fetchmail: SMTP< 501 Bad address syntax
fetchmail: SMTP> RSET
fetchmail: SMTP< 250 Ok
fetchmail: message XXXXX2(_at_)YYYYY(_dot_)ZZ@post.strato.de:1 was not the 
expected
length (464 actual != 479 expected)
 flushed
fetchmail: POP3> DELE 1
fetchmail: POP3< test
fetchmail: POP3> QUIT
fetchmail: POP3< 1
fetchmail: client/server protocol error while fetching from
post.strato.de
fetchmail: 6.2.3 querying post.strato.de (protocol POP3) at Mon 31 Jan
2005 02:08:39 PM CET: poll completed
fetchmail: Query status=4 (PROTOCOL)
fetchmail: Deleting fetchids file.
fetchmail: normal termination, status 4
fetchmail: Deleting fetchids file.


<Prev in Thread] Current Thread [Next in Thread>