[Mimedefang] RFC compliance (was: Foreign Character Sets)

Jan Pieter Cornet johnpc at xs4all.nl
Mon Apr 18 17:25:26 EDT 2005


On Mon, Apr 18, 2005 at 09:08:29AM -0500, Damrose, Mark wrote:
> Not necessarily.  E.g.  MS Exchange 5.5 will reject an e-mail 
> with 2 consecutive dots <test..1 at example.com>.  That address 
> is perfectly legal, and sendmail will happily pass it.

No it isn't "perfectly legal". Both RFC821 and RFC2821 do not allow
2 consecutive dots (RFC2821 section 4.1.2, using the "atext"
definition of RFC2822 section 3.2.4. Look it up if you like).

Sendmail is just a bit too lax about it (doing it's best in the "be
liberal in what you expect").

We've changed that (using MD, obviously :) to be somewhat more RFC
compliant. The only derivation from RFC2821 that I currently allow
is a trailing dot on the local-part. See for example this SMTP
conversation:

220 mxdrop0.xs4all.nl ESMTP Sendmail 8.13.3/8.13.3; Mon, 18 Apr 2005 23:04:34 +0200 (CEST)
EHLO foo
250-mxdrop0.xs4all.nl Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 31457280
250-ETRN
250-DELIVERBY
250 HELP
MAIL From:<foo..bar at example.com>
554 5.7.1 Sender address format `<foo..bar at example.com>' not RFC-compliant
MAIL From:<e.g. at example.com>
250 2.1.0 <e.g. at example.com>... Sender ok
QUIT
221 2.0.0 mxdrop0.xs4all.nl closing connection

If you do want to use two consecutive dots, you'll have to quote the
local-part, like this:

MAIL From:<"foo..bar"@example.com>
250 2.1.0 <"foo..bar"@example.com>... Sender ok

That's been running now for a few months, on a 500000+ users cluster,
with no complaints whatsoever.

-- 
#!perl -wpl # mmfppfmpmmpp mmpffm <pmmppfmfpppppfmmmf at fpffmm4mmmpmfpmf.ppppmf>
$p=3-2*/[^\W\dmpf_]/i;s.[a-z]{$p}.vec($f=join('',$p-1?chr(sub{$_[0]*9+$_[1]*3+
$_[2]}->(map{/p|f/i+/f/i}split//,$&)+97):qw(m p f)[map{((ord$&)%32-1)/$_%3}(9,
3,1)]),5,1)='`'lt$&;$f.eig;                                # Jan-Pieter Cornet



More information about the MIMEDefang mailing list