Jan-Frode Myklebust:
> On Wed, Aug 31, 2011 at 09:16:36AM +0200, Jan-Frode Myklebust wrote:
> > I would like to point postfix' virtual_transport at several addresses
> > for lmtp delivery, and hopefully want postfix to gracefully handle that
> > any one of them might be down. 
> > 
> >     virtual_transport = lmtp:loadbalancers.example.com:24
> 
> I mistakingly entered
> 
>       virtual_transport = smtp:loadbalancers.example.com:24
>                           ^^^^
> 
> and got a few messages bounced:
> 
>       Aug 31 10:12:01 mailgw1 postfix/smtp[32598]: E6A2490076: 
> to=<m...@example.com>, relay=loadbalancers.example.com[192.168.42.15]:24, 
> delay=0.03, delays=0.02/0.01/0/0, dsn=5.5.2, status=bounced (host 
> loadbalancers.example.com[192.168.42.15] refused to talk to me: 502 5.5.2 
> Unknown command)
> 
> I'm a bit surprised that it lead to a 502, instead of a temporary
> error. Is there any way to change this to a temporary error and
> have it retry at a later point? It would be nice if the mail-serves
> can queue the messages when all my lmtp-servers are down...

The server replies with 502 because LMTP uses LHLO, while SMTP uses
HELO or EHLO, and for good reasons: the protocol has different
replies for multi-recipient email.

You can change 502 into 4xx with smtp_reply_filter (Postfix 2.7 and
later).  But I recommend that you use the correct protocol instead.

http://www.postfix.org/postconf.5.html#smtp_reply_filter

        Wietse

Reply via email to