[Dovecot] Sieve/pigeonhole with Exim and Dovecot LDA

Sebastian Arcus shop at open-t.co.uk
Mon May 20 19:02:44 EEST 2013


On 20/05/13 16:12, Sebastian Arcus wrote:
> I am trying to configure my Dovecot installation to provide
> Vacation/Out-of-the-office emails using the Sieve plugin. My setup is a
> little bit peculiar:
>
>
>      Internet                           Internet
>         |                                  ^
>         V                                  |
>    Provider's POP3 server         Provider's SMTP server
>         |                                  ^
>         V                                  |    --------------
>      getmail                               |     my server
>         |                                  |
>         V                                  |
>    Dovecot LDA ---> Sieve/vacation -----> Exim
>         |
>         V
>      Dovecot                                     my server
>                                                ---------------
>
>
> Sorry for the ASCII art above - I thought it would be quicker than
> trying to explain.
>
> The trouble I'm having is getting the Dovecot LDA to send successfully
> through the local exim instance out-of-office replies back to the
> provider's smtp server - when receiving fresh email from the provider
> (through getmail). Dovecot LDA tries to send the replies - but Exim
> freezes them because they don't contain the sender data in the format
> Exim wants it. Exim can either receive sender info:
>
> 1. On the command line, after the "-f" command line switch (but only
> when called by root or other users passed under "trusted_users" in
> exim.conf).
> 2. In the header of the email - in the "From:" field - but only,
> apparently, if it was called with the "-t" switch. Full exim command
> line documentation here:
> http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html
>
>
> I can't figure out what command line options the Dovecot LDA is using
> when calling exim. I also couldn't find a way to get Dovecot LDA to pass
> extra options to exim, when trying to send email. The exim log has the
> following:
>
> 2013-05-20 15:35:15 1UeRBB-0001xc-Ar Frozen (message created with -f <>)
>
> I've inspected the frozen message - and it has the correct sender in the
> "From:" field - but it seems that exim isn't using that, because it
> wasn't called with the "-t" option.
>
> In dovecot.conf, I have the following for Dovecot LDA and sieve:
>
> protocols = imap sieve
>
> protocol lda {
>    log_path = /var/log/dovecot/dovecot-deliver.log
>    info_log_path = /var/log/dovecot/dovecot-deliver-info.log
>    postmaster_address = admin at mydomain.co.uk
>    hostname = mydomain.co.uk
>    mail_plugins = sieve
>    mail_plugin_dir = /usr/lib/dovecot
>    sendmail_path = /usr/sbin/exim
> }
>
> service managesieve-login {
>     inet_listener sieve {
>       port = 4190
>     }
> }
>
> plugin {
>     sieve = ~/.dovecot.sieve
>     sieve_dir = ~/sieve
> }
>
> Dovecot LDA is called by getmail using the vmail user - and using the
> same user it is trying to call exim to deliver the out-of-office replies.
>
> I'm using Dovecot 2.2.1 with pigeonhole 0.4.0.
>
> I can post the rest of dovecot.conf if it would help. I've read through
> the stuff at dovecot.org - but all the Dovecot LDA and exim info refers
> to Exim passing email to Dovecot using Dovecot LDA - not Dovecot LDA
> sending email out using Exim.

I have done a bit more testing, and it seems Dovecot LDA uses the 
following command options when sending out email through Exim:

exim -i -f <> -- recipient at address.com

The problem with the above is that it sets an empty address for the 
"Sender" field in the message envelope. The message "From" header is set 
correctly - but the envelope "Sender" field is empty. As I use exim in 
smart relay mode, exim can only use the "Sender" field from the envelope 
to authenticate against the provider's SMTP server (Exim doesn't seem to 
have any variable expansion for the "From" field in the header to be 
used during SMTP authentication) - thus the authentication fails and the 
message can't go away.



More information about the dovecot mailing list