On Wed, Jan 19, 2011 at 1:48 PM, Victor Duchovni < victor.ducho...@morganstanley.com> wrote:
> On Wed, Jan 19, 2011 at 01:40:06PM -0500, Manuel Mely wrote: > > > I'm having a weird problem here, when my email server tries to relay a > > message with multiple recipients to my relay email server, the latter > closes > > the connection because one of the recipient domain doesn't work, it > doesn't > > continues sending to the others recipient, the message is moved to the > > deferred queue. I'm sure this behavior must be changed, but i can figure > out > > what is missing in my configuration. I need some help here. > > Your relay host is violating the SMTP protocol by prematurely closing > the connection, and on top of that without even responding with a 5XX > error for the problem recipient (which Postfix would otherwise "remove" > from the queued list of recipients, and then succeed with the remaining > recipients when the message is retried). > > The right answer is to use a less broken relay host. A work-around is > to set: > > smtp_destination_recipient_limit = 1 > > Mail with an invalid recipient domain will still linger in your queue, > so you should perhaps add > > reject_unknown_recipient_domain > > to the top of your smtpd_recipient_restrictions, if the mail in question > enters your queue via SMTP (rather than local submission via sendmail(1), > or via qmqp). > > -- > Viktor. > Right! The thing is that i have some scripts to check my internal SMTP servers availability. Then, if they don't have connection with my relay node, i have to put a 4xx code to stop growing my queue from remote servers in internet. but i missed that 421 closes transmission and for multiple recipients this is not good. Is it better to set smtp_destination_recipient_limit = 1 or change my 421 code to something like 450 or 5xx? if my client SMTP server is down, i don't want to accept messages to their users from internet, just defer those messages in the remote server queue. By the way, do you think this is permitted in the SMTP world? if i defer those messages in that way... am i violating something here?