"TS" == Timo Sirainen <tss@iki.fi> writes:
TS> On Fri, 2007-02-23 at 17:52 +0100, Matthieu Vogelweith wrote:
>> I'm using Postfix/LDAP with virtual domains and Dovecot 1.0rc15 as
>> LDA=20 with sieve plugin. The sieve plugin works fine except
>> vacation. How can I increase the log level of deliver to see
>> what's the matter ?
The sieve plugin implements vacation by invoking /usr/lib/sendmail. If you have mail_debug=yes in dovecot.conf this will result in /usr/lib/sendmail being invoked in an environment with MAIL_DEBUG set which also causes the Postfix's 'sendmail' to invoke debugger_command as set /etc/postfix/main.cf. If debugger_command is not set it will crap out and no mail will get sent.
Before invoking sendmail libsieve has made the following checks. These are done in libsieve/bc_eval.c shouldRespond() and a response won't get generated if any of the following are true
- Auto-Submitted: header exists with any value except 'no'
- Precedence: header exists with value 'junk', 'bulk' or 'list'
- the 'envelope' sender and 'envelope' recipient are the same
- the 'envelope' recipient is not found in the message To: CC: or BCC: fields
The 'envelope' sender is taken from a Return-Path: header in the message. The 'envelope' recipient is taken from -d option passed to deliver. If it is a bare username is gets 'canonicalised' by the libsieve code to '<username>@unspecified-domain' this means it is highly unlikely to pass the last test in the list above.
Note that these tests occur in the libsieve and if they indicate that no response should be sent then neither of src/sieve-cmu.c autorespond() nor src/sieve-cmu.c send_response() will ever get invoked thus no duplicate checking will occur i.e. none of the Dovecot LDA plugin code even gets a look in.
I am currently successfully running dovecot LDA for virtual users with at least a basically working sieve vacation using the following configs snippets
/etc/dovecot/dovecot.conf:
[...]
protocol lda {
hostname = fqdn.hostname.example
postmaster_address = postmaster@herald.ox.ac.uk
mail_plugins = cmusieve
}
auth default {
[...]
socket listen {
master {
path = /var/run/dovecot/auth-master
}
}
}
/etc/postfix/main.cf:
[...]
debugger_command = (strace -p $process_id 2>&1 | logger -t postfix/debug -p mail.info;) & sleep 5
[...]
virtual_transport = dovecot:
dovecot_destination_recipient_limit = 1
virtual_minimum_uid = 1000
virtual_mailbox_maps = ldap:/etc/postfix/virtual.mailbox.ldap.cf
virtual_uid_maps = ldap:/etc/postfix/virtual.uid.ldap.cf
virtual_gid_maps = static:100
[...]
/etc/postfix/master.cf:
[...]
dovecot unix - n n - - pipe
flags=ODRhu user=dovecotlda argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
I can't remember exactly which of these settings are essential but note flags=...R... to ensure a Return-Path: header and -d ${recipient} where Postfix will expand this into a _full_, i.e. user@domain address.