[Dovecot] Sieve Vacation
Hi,
I'm using Postfix/LDAP with virtual domains and Dovecot 1.0rc15 as LDA 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 ?
Cheers,
-- Matthieu VOGELWEITH Linbox - Free&Alter Soft 152, rue de Grigy 57070 Metz tel : +33 (0)3 87 50 87 97 web : http://www.linbox.com
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 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 ?
Well there isn't much more. If the vacation really gets executed in the Sieve script, I think there are two possibilities:
- The reply is already found from duplicates file (try deleting ~/.dovecot.lda_dupes)
- Sending the mail failed. It should have logged an error.
Have you tried if redirect/reject works? They're also sending mails.
Timo Sirainen wrote:
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 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 ?
Well there isn't much more. If the vacation really gets executed in the Sieve script, I think there are two possibilities:
- The reply is already found from duplicates file (try deleting ~/.dovecot.lda_dupes)
All works fine after removing ~/.dovecot.lda_dupes. Thx.
- Sending the mail failed. It should have logged an error.
Have you tried if redirect/reject works? They're also sending mails.
-- Matthieu VOGELWEITH Linbox - Free&Alter Soft 152, rue de Grigy 57070 Metz tel : +33 (0)3 87 50 87 97 web : http://www.linbox.com
"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.
On Thu, 2007-03-01 at 21:00 +0000, pod wrote:
- 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
I added this list and your explanations to http://wiki.dovecot.org/LDA/Sieve
You forgot however the list of special sender address checks.
participants (4)
-
Matthieu Vogelweith
-
Matthieu VOGELWEITH
-
pod
-
Timo Sirainen