Re: some apparent problems with address parsing and SMTP response handling

From: Wietse Venema (no email)
Date: Mon Oct 15 2001 - 14:20:49 EDT


Greg A. Woods:
> > Subject: Re: some apparent problems with address parsing and SMTP response handling
> >
> > Yep. Postfix parses right to left. It's kind of hard to parse named
> > groups left-to-right.
>
> True enough.
>
> I'll let you know if I come up with a better technique for smail! :-)
> (though I don't really want to dive too far into smail's very convoluted
> address parser!)

I know this feeling. I will touch that code only under threat.

> I wonder if maybe the original text shouldn't be included in a comment
> in the header in this case. I was actually convinced I had not typed a
> space until I went and looked in the FCC folder I've configured my
> mailer to save every message I send to.
>
> > > It then proceeded to hand off the resulting concatenated mess un-quoted
> > > in the SMTP connection.
> >
> > That is the result of a choice between two evils.
> >
> > Early Postfixen quoted the localpart as "a at b"@c. If Postfix was
> > the primary MX then it would bounce the mail because "a at b" is not
> > a local iser.
> >
> > The problem was when Postfix was a backup MX and Sendmail the
> > primary. It was found that the Sendmail boxen would strip the
> > quotes, causing nasty open relay problems.
>
> Oh my. I see. I suppose it is the lesser of two evils.... I'd have
> been tempted to force the issue onto sendmail though! ;-)

I saw this as a possible threat for Postfix acceptance.

> > > Finally even more surprisingly postfix complains when it gets a 5xx
> > > reply to the resulting errant RCPT TO:
> >
> > Postfix always send postmaster notice if it gets a 50x reply,
> > because that is indicative of a protocol or syntax error.
>
> That could cause quite a lot of unnecessary confusion, especially as
> other mailers become more compliant with RFC 2821 which mandates 501 in
> particular in several places where the parameters being complained about
> are not under the control of the postmaster who will receive the notice.
>
> Indeed even in this instance the error is user-induced, not really
> software induced.

In this case, the address ought to have been quoted. Maybe I will
have to mess up the code and add a switch that says do what I mean
instead of do what I say, when I call the quote82?-local() routine.

> As far as I can tell smail's doing the right thing though in rejecting
> the "a at b@c" form in RCPT TO:, since that is not a valid <forward-path>,
> and I don't see a better response code to use in place of 501, though I
> suppose I could invent a 505 or something.

It's a syntax violation, so there is no need for a new error code.

        Wietse
-
To unsubscribe, send mail to with content
(not subject): unsubscribe postfix-users








Hosted Email Solutions

Invaluement Anti-Spam DNSBLs



Powered By FreeBSD   Powered By FreeBSD