Le 16/11/2010 20:50, Ralf Hildebrandt a écrit :
RCF 5321 says:

4.5.3.1.1.  Local-part
The maximum total length of a user name or other local-part is 64
octets.


RFC 2821 says:

local-part
The maximum total length of a user name or other local-part is 64 characters.
        
        
RFC 821 says:

user
The maximum total length of a user name is 64 characters.



my understanding of these is: all implementations should support up to 64 chars at least. beyond that, nothing is guaranteed.

obviously, 64 is an arbitrary number. the fact that it is a power of two is not a valid excuse: nobody represents domains or local-parts as bits.

Ideally, there should be no limit. unfortunately, this is not reasonable in practice.



When I fed my postfix-2.8-20101108 (I'm using strict_rfc821_envelopes = yes) 
with this:

# telnet localhost 10026
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.charite.de ESMTP
EHLO foo
250-mail.charite.de
250-PIPELINING
250-SIZE 26214400
250-ETRN
250-STARTTLS
250-XFORWARD NAME ADDR PROTO HELO SOURCE PORT IDENT
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
MAIL FROM:<>
250 2.1.0 Ok
RCPT
TO:<0123456789012345678901234567890123456789012345678901234567890123456...@example.com>
250 2.1.5 Ok
RCPT
TO:<0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456...@example.com>
250 2.1.5 Ok
QUIT
221 2.0.0 Bye
Connection closed by foreign host.

I received no error message; but when using a domain literal
exceeeding 63 characters I received an error.


that's part of the domain part validation code. I personally believe that this shouldn't be hardcoded. if one want to limit that, it's easily done with a regular expression.

On second thought, VERP is "encoding" the whole recipient address into
the local part (of the sender address) when sending out mail; thus
restricting the localpart to 64 characters would make little sense.

But where IS the actual limit in postfix?
max_line_lenght - lenght(RCPT TO:<>) ?


Reply via email to