From: John Schmitt on

I use fetchmail to get my email from yahoo & gmail et al. Lately I've been getting these two messages when fetchmail runs. What is postfix doing and what is it trying to tell me? Is this something I should fix on my end? Is postfix trying to resend some spam I received from yahoo? Or is it just having trouble delivering spam to my inbox?

I'm running a simple home setup for myself using Fedora 12.

Transcript of session follows.

Out: 220 mymachine.mydomain.net ESMTP Postfix
In: HELO mymachine
Out: 250 mymachine.mydomain.net
In: MAIL FROM:<>
Out: 250 2.1.0 Ok
In: RCPT TO:<"???B?\" <olpcxcqkkqcgid(a)aol.com>>
Out: 501 5.1.3 Bad recipient address syntax
In: QUIT
Out: 221 2.0.0 Bye


For other details, see the local mail logfile


Date: Thu, 8 Apr 2010 13:02:01 -0700 (PDT)
From: Mail Delivery System <MAILER-DAEMON(a)mymachine.mydomain.net>
To: Postmaster <postmaster(a)mydomain.net>
Subject: Postfix SMTP server: errors from localhost[::1]

Transcript of session follows.

Out: 220 mymachine.mydomain.net ESMTP Postfix
In: EHLO pop-ssl.plus.mail.a06.yahoodns.net
Out: 250-mymachine.mydomain.net
Out: 250-PIPELINING
Out: 250-SIZE
Out: 250-VRFY
Out: 250-ETRN
Out: 250-STARTTLS
Out: 250-ENHANCEDSTATUSCODES
Out: 250-8BITMIME
Out: 250 DSN
In: MAIL FROM:<"???B?\" <olpcxcqkkqcgid(a)aol.com>> BODY=8BITMIME SIZE=2131
Out: 501 5.1.7 Bad sender address syntax
In: RSET
Out: 250 2.0.0 Ok
In: QUIT
Out: 221 2.0.0 Bye


For other details, see the local mail logfile

This is from /var/log/maillog:

Apr 8 13:02:00 mymachine postfix/smtpd[13072]: connect from localhost[::1]
Apr 8 13:02:00 mymachine postfix/smtpd[13000]: connect from localhost[::1]
Apr 8 13:02:01 mymachine postfix/cleanup[13003]: 00144E02007: message-id=<20100408200201.00144E02007(a)mymachine.mydomain.net>
Apr 8 13:02:01 mymachine postfix/smtpd[13000]: disconnect from localhost[::1]
Apr 8 13:02:01 mymachine postfix/qmgr[21590]: 00144E02007: from=<double-bounce(a)mymachine.mydomain.net>, size=759, nrcpt=1 (queue active)
Apr 8 13:02:01 mymachine lmtpunix[12930]: accepted connection
Apr 8 13:02:01 mymachine lmtpunix[12930]: lmtp connection preauth'd as postman
Apr 8 13:02:01 mymachine lmtpunix[12930]: duplicate_check: <20100408200201.00144E02007(a)mymachine.mydomain.net> user.john 0
Apr 8 13:02:01 mymachine postfix/cleanup[13003]: 20E23E02009: message-id=<20100408200201.20E23E02009(a)mymachine.mydomain.net>
Apr 8 13:02:01 mymachine lmtpunix[12930]: duplicate_check: <20100408200201.00144E02007(a)mymachine.mydomain.net> user.john 0
Apr 8 13:02:01 mymachine postfix/qmgr[21590]: 20E23E02009: from=<double-bounce(a)mymachine.mydomain.net>, size=957, nrcpt=1 (queue active)
Apr 8 13:02:01 mymachine postfix/smtpd[13072]: disconnect from localhost[::1]
Apr 8 13:02:01 mymachine lmtpunix[13071]: accepted connection
Apr 8 13:02:01 mymachine lmtpunix[13071]: lmtp connection preauth'd as postman
Apr 8 13:02:01 mymachine lmtpunix[12930]: Delivered: <20100408200201.00144E02007(a)mymachine.mydomain.net> to mailbox: user.john
Apr 8 13:02:01 mymachine lmtpunix[12930]: mystore: starting txn 2147490480
Apr 8 13:02:01 mymachine lmtpunix[12930]: mystore: committing txn 2147490480
Apr 8 13:02:01 mymachine lmtpunix[12930]: duplicate_mark: <20100408200201.00144E02007(a)mymachine.mydomain.net> user.john 1270756921 320038
Apr 8 13:02:01 mymachine lmtpunix[12930]: mystore: starting txn 2147490481
Apr 8 13:02:01 mymachine lmtpunix[12930]: mystore: committing txn 2147490481
Apr 8 13:02:01 mymachine lmtpunix[12930]: duplicate_mark: <20100408200201.00144E02007(a)mymachine.mydomain.net> .john+@.sieve. 1270756921 0
Apr 8 13:02:01 mymachine lmtpunix[13071]: duplicate_check: <20100408200201.20E23E02009(a)mymachine.mydomain.net> user.john 0
Apr 8 13:02:01 mymachine postfix/lmtp[13008]: 00144E02007: to=<john(a)mydomain.net>, orig_to=<postmaster>, relay=mymachine.mydomain.net[/var/lib/imap/socket/lmtp], delay=0.42, delays=0.06/0/0/0.35, dsn=2.1.5, status=sent (250 2.1.5 Ok)
Apr 8 13:02:01 mymachine postfix/qmgr[21590]: 00144E02007: removed

From: Victor Duchovni on
On Thu, Apr 08, 2010 at 03:10:58PM -0700, John Schmitt wrote:

>
> I use fetchmail to get my email from yahoo & gmail et al. Lately I've been getting these two messages when fetchmail runs. What is postfix doing and what is it trying to tell me? Is this something I should fix on my end? Is postfix trying to resend some spam I received from yahoo? Or is it just having trouble delivering spam to my inbox?
>
> I'm running a simple home setup for myself using Fedora 12.
>
> Transcript of session follows.
>
> Out: 220 mymachine.mydomain.net ESMTP Postfix
> In: HELO mymachine
> Out: 250 mymachine.mydomain.net
> In: MAIL FROM:<>
> Out: 250 2.1.0 Ok
> In: RCPT TO:<"???B?\" <olpcxcqkkqcgid(a)aol.com>>

This is forward-path syntax from RFCs 821, 2821 or 5321. You
can't just copy/paste the "To: " header from an RFC822 mail
message into the "RCPT TO:" SMTP command.

http://tools.ietf.org/html/rfc821
http://tools.ietf.org/html/rfc2821
http://tools.ietf.org/html/rfc5321

You should also keep in mind that is very wrong to determine who to
send email to based on "To:" or "Cc:" headers, you must determine the
intended recipient from an attribute that record the original envelope
recipient. Otherwise, you'll create nasty forwarding loops and misdeliver
email.

--
Viktor.

P.S. Morgan Stanley is looking for a New York City based, Senior Unix
system/email administrator to architect and sustain our perimeter email
environment. If you are interested, please drop me a note.

From: Wietse Venema on
John Schmitt:
>
> I use fetchmail to get my email from yahoo & gmail et al. Lately
> I've been getting these two messages when fetchmail runs. What
> is postfix doing and what is it trying to tell me? Is this
> something I should fix on my end? Is postfix trying to resend
> some spam I received from yahoo? Or is it just having trouble
> delivering spam to my inbox?
>
> I'm running a simple home setup for myself using Fedora 12.
>
> Transcript of session follows.
>
> Out: 220 mymachine.mydomain.net ESMTP Postfix
> In: HELO mymachine
> Out: 250 mymachine.mydomain.net
> In: MAIL FROM:<>
> Out: 250 2.1.0 Ok
> In: RCPT TO:<"???B?\" <olpcxcqkkqcgid(a)aol.com>>
> Out: 501 5.1.3 Bad recipient address syntax

Postfix is telling you that the RCPT TO command has an invalid
recipient address syntax.

In particular, it appears that you take the To: header such as:

To: "Full name" <user(a)example.com>

and then use that same syntax in the RCPT TO command as:

RCPT TO:<"Full name" <user(a)example.com>>

This is not possible in SMTP.

Apart from that it is a terrible mistake to use the To: header
address for deciding where to deliver mail.

For example, this message is To: postfix-users but it should
be delivered to your own mailbox. If it isn't, you are likely
to get unsubscribed soon.

Wietse

> In: QUIT
> Out: 221 2.0.0 Bye
>
>
> For other details, see the local mail logfile
>
>
> Date: Thu, 8 Apr 2010 13:02:01 -0700 (PDT)
> From: Mail Delivery System <MAILER-DAEMON(a)mymachine.mydomain.net>
> To: Postmaster <postmaster(a)mydomain.net>
> Subject: Postfix SMTP server: errors from localhost[::1]
>
> Transcript of session follows.
>
> Out: 220 mymachine.mydomain.net ESMTP Postfix
> In: EHLO pop-ssl.plus.mail.a06.yahoodns.net
> Out: 250-mymachine.mydomain.net
> Out: 250-PIPELINING
> Out: 250-SIZE
> Out: 250-VRFY
> Out: 250-ETRN
> Out: 250-STARTTLS
> Out: 250-ENHANCEDSTATUSCODES
> Out: 250-8BITMIME
> Out: 250 DSN
> In: MAIL FROM:<"???B?\" <olpcxcqkkqcgid(a)aol.com>> BODY=8BITMIME SIZE=2131
> Out: 501 5.1.7 Bad sender address syntax
> In: RSET
> Out: 250 2.0.0 Ok
> In: QUIT
> Out: 221 2.0.0 Bye
>
>
> For other details, see the local mail logfile
>
> This is from /var/log/maillog:
>
> Apr 8 13:02:00 mymachine postfix/smtpd[13072]: connect from localhost[::1]
> Apr 8 13:02:00 mymachine postfix/smtpd[13000]: connect from localhost[::1]
> Apr 8 13:02:01 mymachine postfix/cleanup[13003]: 00144E02007: message-id=<20100408200201.00144E02007(a)mymachine.mydomain.net>
> Apr 8 13:02:01 mymachine postfix/smtpd[13000]: disconnect from localhost[::1]
> Apr 8 13:02:01 mymachine postfix/qmgr[21590]: 00144E02007: from=<double-bounce(a)mymachine.mydomain.net>, size=759, nrcpt=1 (queue active)
> Apr 8 13:02:01 mymachine lmtpunix[12930]: accepted connection
> Apr 8 13:02:01 mymachine lmtpunix[12930]: lmtp connection preauth'd as postman
> Apr 8 13:02:01 mymachine lmtpunix[12930]: duplicate_check: <20100408200201.00144E02007(a)mymachine.mydomain.net> user.john 0
> Apr 8 13:02:01 mymachine postfix/cleanup[13003]: 20E23E02009: message-id=<20100408200201.20E23E02009(a)mymachine.mydomain.net>
> Apr 8 13:02:01 mymachine lmtpunix[12930]: duplicate_check: <20100408200201.00144E02007(a)mymachine.mydomain.net> user.john 0
> Apr 8 13:02:01 mymachine postfix/qmgr[21590]: 20E23E02009: from=<double-bounce(a)mymachine.mydomain.net>, size=957, nrcpt=1 (queue active)
> Apr 8 13:02:01 mymachine postfix/smtpd[13072]: disconnect from localhost[::1]
> Apr 8 13:02:01 mymachine lmtpunix[13071]: accepted connection
> Apr 8 13:02:01 mymachine lmtpunix[13071]: lmtp connection preauth'd as postman
> Apr 8 13:02:01 mymachine lmtpunix[12930]: Delivered: <20100408200201.00144E02007(a)mymachine.mydomain.net> to mailbox: user.john
> Apr 8 13:02:01 mymachine lmtpunix[12930]: mystore: starting txn 2147490480
> Apr 8 13:02:01 mymachine lmtpunix[12930]: mystore: committing txn 2147490480
> Apr 8 13:02:01 mymachine lmtpunix[12930]: duplicate_mark: <20100408200201.00144E02007(a)mymachine.mydomain.net> user.john 1270756921 320038
> Apr 8 13:02:01 mymachine lmtpunix[12930]: mystore: starting txn 2147490481
> Apr 8 13:02:01 mymachine lmtpunix[12930]: mystore: committing txn 2147490481
> Apr 8 13:02:01 mymachine lmtpunix[12930]: duplicate_mark: <20100408200201.00144E02007(a)mymachine.mydomain.net> .john+@.sieve. 1270756921 0
> Apr 8 13:02:01 mymachine lmtpunix[13071]: duplicate_check: <20100408200201.20E23E02009(a)mymachine.mydomain.net> user.john 0
> Apr 8 13:02:01 mymachine postfix/lmtp[13008]: 00144E02007: to=<john(a)mydomain.net>, orig_to=<postmaster>, relay=mymachine.mydomain.net[/var/lib/imap/socket/lmtp], delay=0.42, delays=0.06/0/0/0.35, dsn=2.1.5, status=sent (250 2.1.5 Ok)
> Apr 8 13:02:01 mymachine postfix/qmgr[21590]: 00144E02007: removed
>
>
>

From: John Schmitt on
I want to thank you and Viktor for replying.

On Thu, Apr 08, 2010 at 07:18:38PM -0400, Wietse Venema wrote:
> John Schmitt:
[...]
> > Transcript of session follows.
> >
> > Out: 220 mymachine.mydomain.net ESMTP Postfix
> > In: HELO mymachine
> > Out: 250 mymachine.mydomain.net
> > In: MAIL FROM:<>
> > Out: 250 2.1.0 Ok
> > In: RCPT TO:<"???B?\" <olpcxcqkkqcgid(a)aol.com>>
> > Out: 501 5.1.3 Bad recipient address syntax
[...]

A few lines like this:

Message-ID: <760857006668.qgjlcbdx2ke(a)ms49.hinet.net>
From: "<B3><AF><A6>B<AF>\" <olpcxcqkkqcgid(a)aol.com>
To: lili928351(a)yahoo.com.tw

are in the headers of an email message sitting in my yahoo inbox. Is the last quotation mark escaped? Is the message deliberately engineered in order to fool mailers? As you saw, I'm fairly naive about these things.

John

From: Wietse Venema on
John Schmitt:
> I want to thank you and Viktor for replying.
>
> On Thu, Apr 08, 2010 at 07:18:38PM -0400, Wietse Venema wrote:
> > John Schmitt:
> [...]
> > > Transcript of session follows.
> > >
> > > Out: 220 mymachine.mydomain.net ESMTP Postfix
> > > In: HELO mymachine
> > > Out: 250 mymachine.mydomain.net
> > > In: MAIL FROM:<>
> > > Out: 250 2.1.0 Ok
> > > In: RCPT TO:<"???B?\" <olpcxcqkkqcgid(a)aol.com>>
> > > Out: 501 5.1.3 Bad recipient address syntax

Some software author assumes that it can take an address form that
is valid in message headers:

To: "full name" <user(a)example.com>

and then use that same form in RCPT TO commands.

The correct RCPT TO command syntax is:

RCPT TO:<user(a)example.com>

as defined in RFC documents 20 years ago.

Yes, the software's quoting algorithm is busted, too.

Wietse

 |  Next  |  Last
Pages: 1 2 3
Prev: - Erros SMTP
Next: Configuration Backup Script