mrrph <mrrph@???> wrote:
> On Sun, 26 Jun 2005, Giolla Decair wrote:
>> came across what might eba bit of a bug in:
Afaict that is no bug, it is a strict interpretation of the respective
rfcs.
>> require verify = header_syntax
>> in that if the From: address has a trailing . on teh doamin it's
>> rejected as invalid.
>> e.g:
>> rejected after DATA: domain missing or malformed: failing address in
>> "To" header is: nottingham_freecycle@???.
> I think you can toggle the following BOOL in globals.c to change this
> behavior:
> BOOL strip_trailing_dot = FALSE;
> Caveat Emptor: I haven't tested this, but a grep and a few glances
> through the code seem to point in this direction.
No need to grep the source. Check the documentation.
| strip_trailing_dot
| Use: main
| Type: boolean
| Default: false
|
| If this option is set, a trailing dot at the end of a domain in an
| address is ignored. If this is in the envelope and the message is
| passed on to another MTA, the dot is not passed on. If this option is
| not set, a dot at the end of a domain causes a syntax error. However,
| addresses in header lines are checked only when an ACL requests header
| syntax checking.
> The same behavior is exhibited in the RCPT ACL, so I'm assuming it's
> global. I don't have any need to change the default, so I'll likely not
> test this. Try it out, post your results, and revert if necessary.
For RCTP rfc2821 appplies which clearly forbids trailing dots:
"RCPT TO:" ("<Postmaster@" domain ">" / "<Postmaster>" / Forward-Path) [SP Rcpt-parameters] CRLF
Forward-path = Path
Path = "<" [ A-d-l ":" ] Mailbox ">"
Mailbox = Local-part "@" Domain
Domain = (sub-domain 1*("." sub-domain)) / address-literal
sub-domain = Let-dig [Ldh-str]
Let-dig = ALPHA / DIGIT
Ldh-str = *( ALPHA / DIGIT / "-" ) Let-dig
The case for rfc2821 (which defines the syntax of the To: header) is
similar, if you decipher the syntax you end up with this for the
domain:
dot-atom = [CFWS] dot-atom-text [CFWS]
dot-atom-text = 1*atext *("." 1*atext)
i.e. no trailing dot.
cu andreas
--
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"
http://downhill.aus.cc/