Mark.Martinec+ (Mark Martinec)
2004-04-20 17:53:45 UTC
I'll describe a problem where one Postfix is unable to deliver
a many-recipient mail to another Postfix which has unreasonably
low smtpd_recipient_limit - and try to propose some solution.
The guilty one here in my opinion is the smtpd_hard_error_limit.
The rfc2821 does describe a procedure (4.5.3.1 Size limits and
minimums / recipients buffer) to be followed when the sending
mailer has more recipients than the recipient is willing to handle.
It involves sending '452 Too many recipients' for each excessive
recipient, then proceeding to DATA and acomplish that the first
chunk of recipients does receive the mail, and the rest can be
retried on the next attempt. The rfc2821 also requires that the
limit must be at least 100.
I know that setting smtpd_recipient_limit below 100 is a violation
of standard, yet some sites choose to do so, and I have no influence
over them, myself being on the sending side. I can only try
to learn their limit, and set up a special Postfix service with
reduced *_destination_recipient_limit to feed such sites.
So far I lived under the impression that the rfc2821/4.5.3.1
procedure would cope even in cases with a limit below 100, say 25.
This time I took the time to verify that this is not the case,
and unnecessarily so.
The showstopper is the smtpd_hard_error_limit with a default value
of 20, which is being triggered by '452 Too many recipients' replies
to RCPT TO command.
What happens it:
- sending Postfix tries to deliver a 50-recipient mail;
- recipient has smtpd_recipient_limit=25 (too low), and
the smtpd_hard_error_limit=20 (a default);
- it accepts first 25 'RCPT TO' with a 250 status;
- it then accepts the next 20 'RCPT TO's giving a 452 for each;
- at this point the receiving side drops the connection due to
the smtpd_hard_error_limit being reached, and the sending side
never gets a chance to go to DATA transfer and get the job done
at least for the first valid 25 recipients.
I propose that Postfix:
- does not count 452 replies to 'RCPT TO' commands against the
smtpd_hard_error_limit, either not counting them at all,
or establishing another limit for them with higher default value;
and/or
- that a startup warning is issued when the sum of
smtpd_recipient_limit + smtpd_hard_error_limit is below 100.
Mark
a many-recipient mail to another Postfix which has unreasonably
low smtpd_recipient_limit - and try to propose some solution.
The guilty one here in my opinion is the smtpd_hard_error_limit.
The rfc2821 does describe a procedure (4.5.3.1 Size limits and
minimums / recipients buffer) to be followed when the sending
mailer has more recipients than the recipient is willing to handle.
It involves sending '452 Too many recipients' for each excessive
recipient, then proceeding to DATA and acomplish that the first
chunk of recipients does receive the mail, and the rest can be
retried on the next attempt. The rfc2821 also requires that the
limit must be at least 100.
I know that setting smtpd_recipient_limit below 100 is a violation
of standard, yet some sites choose to do so, and I have no influence
over them, myself being on the sending side. I can only try
to learn their limit, and set up a special Postfix service with
reduced *_destination_recipient_limit to feed such sites.
So far I lived under the impression that the rfc2821/4.5.3.1
procedure would cope even in cases with a limit below 100, say 25.
This time I took the time to verify that this is not the case,
and unnecessarily so.
The showstopper is the smtpd_hard_error_limit with a default value
of 20, which is being triggered by '452 Too many recipients' replies
to RCPT TO command.
What happens it:
- sending Postfix tries to deliver a 50-recipient mail;
- recipient has smtpd_recipient_limit=25 (too low), and
the smtpd_hard_error_limit=20 (a default);
- it accepts first 25 'RCPT TO' with a 250 status;
- it then accepts the next 20 'RCPT TO's giving a 452 for each;
- at this point the receiving side drops the connection due to
the smtpd_hard_error_limit being reached, and the sending side
never gets a chance to go to DATA transfer and get the job done
at least for the first valid 25 recipients.
I propose that Postfix:
- does not count 452 replies to 'RCPT TO' commands against the
smtpd_hard_error_limit, either not counting them at all,
or establishing another limit for them with higher default value;
and/or
- that a startup warning is issued when the sum of
smtpd_recipient_limit + smtpd_hard_error_limit is below 100.
Mark
--
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Mark Martinec (system manager) tel +386 1 4773-575 !!
!! J. Stefan Institute, Jamova 39 fax +386 1 2519-385 !!
!! SI-1000 Ljubljana, Slovenia ***@ijs.si !!
!!!!!!!!!!!!!!!!!!!!!!!!!! http://www.ijs.si/people/mark/ !!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Mark Martinec (system manager) tel +386 1 4773-575 !!
!! J. Stefan Institute, Jamova 39 fax +386 1 2519-385 !!
!! SI-1000 Ljubljana, Slovenia ***@ijs.si !!
!!!!!!!!!!!!!!!!!!!!!!!!!! http://www.ijs.si/people/mark/ !!!!