Download raw body.
smtpd: implement RFC9422 LIMITS extension announcement
EHLO, While I haven't seen this in the wild, it might be nice to announce our limits to the world. RFC9422 specifies 3 limits that can be announced: MAILMAX, RCPTMAX, and RCPTDOMAINMAX. RCPTDOMAINMAX isn't a feature we support as far as I'm aware, but MAILMAX, and RCPTMAX are implemented, so why not announce them and save everybody a bit of time where supported. OK? martijn@ diff c2c0b9e23bf5eaddcd93c2360dcbbfbcf852c37e 5e6293dd52780ac700e0b58e520da8dec2411c56 commit - c2c0b9e23bf5eaddcd93c2360dcbbfbcf852c37e commit + 5e6293dd52780ac700e0b58e520da8dec2411c56 blob - 3dd7af8b5c6aedaf78281af00dbec916ca692db1 blob + a41810eb6dfa5f84883d50d8541b095e2920a54c --- usr.sbin/smtpd/smtp_session.c +++ usr.sbin/smtpd/smtp_session.c @@ -1782,6 +1782,8 @@ smtp_proceed_ehlo(struct smtp_session *s, const char * smtp_reply(s, "250-8BITMIME"); smtp_reply(s, "250-ENHANCEDSTATUSCODES"); + smtp_reply(s, "250-LIMITS MAILMAX=%zu RCPTMAX=%zu", + env->sc_session_max_mails, env->sc_session_max_rcpt); smtp_reply(s, "250-SIZE %zu", env->sc_maxsize); if (ADVERTISE_EXT_DSN(s)) smtp_reply(s, "250-DSN");
smtpd: implement RFC9422 LIMITS extension announcement