Hi community,

I get a bit annoying spam lately to rcpts like <1239123129381239...@example.com> where localpart is bunch of numbers and just localpart alone length is more then 300 chars.

https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1.1 says "The maximum total length of a user name or other local-part is 64 octets."

https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1.3 says "The maximum total length of a reverse-path or forward-path is 256 octets (including the punctuation and element separators)." as I understand it's about max length of  one address used in "MAIL FROM" or "RCPT TO".

Postfix accepts such envelopes but then:

Apr 18 07:42:00 hostname postfix/smtpd[617913]: warning: socketmap:inet:postsrsd:10003:reverse socketmap server permanent error: Too big. Apr 18 07:42:00 hostname postfix/smtpd[617913]: warning: socketmap:inet:postsrsd:10003:reverse lookup error for "1232....@example.com" Apr 18 07:42:00 hostname postfix/smtpd[617913]: NOQUEUE: reject: RCPT from unknown[192.0.2.96]: 451 4.3.5 Server configuration error; from=<double-bounce@hostname> to=<1232....@example.com> proto=ESMTP helo=<sender>

Which result in infinity errors. I want to clarify is this is desired configuration out of the box? And is using stuff like is a proper way to apply restrictions that not set by default:

smtpd_recipient_restrictions =
    check_recipient_access 
regexp:/etc/postfix/recipient_address_length_restrictions
    ...

/etc/postfix/recipient_address_length_restrictions
/^.{38,}@/    554 5.1.7 Recipient address rejected: Localpart is too long.

38 chars and greater chosen due to SRS need also some space.

--
Regards,
Dmytro Alieksieiev
DevOps Engineer
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to