Alexis Lelion
2012-Jan-27 10:59 UTC
[Dovecot] LMTP : Can't handle mixed proxy/non-proxy destinations
Hello, In my current setup, I uses two mailservers to handle the users connections, and my emails are stored on a distant server using NFS (maildir architecture) Dovecot is both my IMAP server and the delivery agent (LMTP via postfix) To avoid indexing issues related to NFS, proxying is enabled both on IMAP and LMTP. But when a mail is sent to users that are shared between the servers, I got the subject mentionned error in the logs : Jan 25 09:05:12 mail01 postfix/lmtp[23934]: A92709300DB: to=< user_on_mail02 at domain.com>, relay=mail01.domain.com[private/dovecot-lmtp], delay=0.07, delays=0.01/0/0/0.06, dsn=4.3.0, status=deferred (host mail01.domain.com[private/dovecot-lmtp] said: 451 4.3.0 < user_on_mail02 at domain.com> Can't handle mixed proxy/non-proxy destinations (in reply to RCPT TO command))>From what I saw, the mail is then put in the queue, and wait until thenext time Postifx will browse the queue. The mail will then be correctly delivered on "mail02". However, the "queue_run_delay" postfix parameter is set to 900, which means that the mail will be delivered with a lag of 15 minutes. I was wondering if there was another way of handling this, for example by triggering an immediate queue lookup from postfix or forwarding a copy of the mail to the other server. Note that the postfix "queue_run_delay" was increased to 15min on purpose, so I cannot change that. I'm using dovecot 2.0.15 on Debian Squeeze, kernel 2.6.32-5-amd64. Thanks, Alexis
Timo Sirainen
2012-Jan-28 17:32 UTC
[Dovecot] LMTP : Can't handle mixed proxy/non-proxy destinations
On 27.1.2012, at 12.59, Alexis Lelion wrote:> Jan 25 09:05:12 mail01 postfix/lmtp[23934]: A92709300DB: to=< > user_on_mail02 at domain.com>, relay=mail01.domain.com[private/dovecot-lmtp], > delay=0.07, delays=0.01/0/0/0.06, dsn=4.3.0, status=deferred (host > mail01.domain.com[private/dovecot-lmtp] said: 451 4.3.0 < > user_on_mail02 at domain.com> Can't handle mixed proxy/non-proxy destinations > (in reply to RCPT TO command)) > > I was wondering if there was another way of handling this, for example > by triggering an immediate queue lookup from postfix or forwarding a > copy of the mail to the other server. Note that the postfix > "queue_run_delay" was increased to 15min on purpose, so I cannot change > that.It would be possible to change the code to support mixed destinations, but it's probably not a simple change and I have other things to do.. Maybe you could work around it so that LMTP always proxies the mails, to localhost as well, but to a different port which doesn't do proxying at all.