[Dovecot] Dovecot Virtual Users with Sendmail

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Thu Jan 3 09:29:37 EET 2013

Hash: SHA1

On Wed, 2 Jan 2013, DormitionSkete at hotmail.com wrote:

> On Jan 2, 2013, at 11:12 AM, Andrzej A. Filip wrote:
>> On 01/02/2013 06:53 PM, DormitionSkete at hotmail.com wrote:
>>> [...]
>>> This is the mail header from the mqueue:
>>> [...]
>>> MDeferred: dovecot mailer (/usr/local/libexec/dovecot/dovecot-lda) exited with EX_TEMPFAIL
>>> [...]
>> Check dovecot's logs
>> If it does not help the push delivery of messages ni sendmail's queue in
>> verbose mode: "sendmail -Am -v -q"
> Well, the logs showed this:

Note, sendmail started the /usr/local/libexec/dovecot/dovecot-lda, but the 
LDA failed temporarily. Where does Dovecot LDA log to??
I suppose that the LDA is executed with permissions, that does not allow 
to write to the mail storage or that the LDA does not have permission to 
access the userdb. Maybe it's the same problem as in the thread "From 
Sendmail to Dovecot mdbox, what is missing.".

I suggest to replace the "P=" in the Dovecot mailer with a wrapper script, 
you get all the necessary information with:

================ wraplda.sh

( date ; id
   echo "$@"
   /usr/local/libexec/dovecot/dovecot-lda "$@"
   echo exit code: $rc
   exit $rc
) >> /tmp/lda.log 2>&1

Put it into your "smrsh" directory.

> So I put this in my /etc/hosts file:
> localhost
> And I added DOVECOT to my /etc/hosts line.  This cleared the queue, but now all of the mail for the virtual users bounces with this:

No! That's against the idea of the placeholder "DOVECOT". You see that the 
sendmail part works, because the Dovecot LDA was started.

> The original message was received at Wed, 2 Jan 2013 11:16:27 -0700 (MST)
> from openindiana [IPv6:::1]
>   ----- The following addresses had permanent fatal errors -----
> <hacwebstore at localhost>
>    (reason: 550 5.1.1 User unknown)
> hacwebstore at DOVECOT
>    (reason: 550 5.1.1 User unknown)
>    (expanded from: <hacwebstore at localhost>)

>   ----- Transcript of session follows -----
> 550 5.1.1 hacwebstore at DOVECOT... User unknown
> 550 5.1.1 <hacwebstore at localhost>... User unknown

Because the LDA returns EX_TEMPFAIL, the messages stays in the queue until 
the temporary failure is fixed or the maximum queue stay time (usually 5 
days) is reached. But in this case, the error message should be different, 
IMHO. I don't think that this error is from the latest test.


- -- 
Steffen Kaiser
Version: GnuPG v1.4.11 (GNU/Linux)


More information about the dovecot mailing list