[Dovecot] Dovecot + Sieve
pod
pod at herald.ox.ac.uk
Wed Sep 5 22:16:38 EEST 2007
>>>>> "DM" == Daniel L Miller <dmiller at amfes.com> writes:
DM> I've tried manually compiling the script. I now have a "sieve"
DM> and a "sievec" in my mail folder, and the "sieve" variable in
DM> dovecot.conf (1.0.3) is set to /var/mail/%d/%u/sieve (The filename
DM> specified should be the script source, not the compiled version,
DM> correct?).
DM> I receive no errors from deliver using this method - but no
DM> evidence that the script is being followed, either. I thought I'd
DM> start with something simple - when that didn't work I added a
DM> global fileinto directive - still not doing anything. Do I need
DM> to set execute permissions or turn off world-readable permissions
DM> on the script or compiled version?
Create the following config file or something similar:
log_path = /dev/stderr
info_log_path = /dev/stderr
mail_debug = yes
mail_location = maildir:%h/tmp/Maildir
protocol lda {
postmaster_address = postmaster at example.org
mail_plugins = cmusieve
}
put it in, say, ~/tmp/dovecot.lda-debug.conf. Directly invoke deliver as
a regular user with the -c option pointing to this config file, e.g.
user at shell$ date | /usr/libexec/dovecot/deliver -c ~/tmp/dovecot.lda-debug.conf
Observe the output.
DM> require ["fileinto"];
DM> if header :contains ["From","To"] ["root at amfes.com","root at amfeslan.local"] {
DM> fileinto "System-Messages";
DM> }
DM> fileinto "System-Messages";
I think you ought to consider using an ADDRESS test rather than a HEADER
test for this sort of match, thus
if address :is :all ["from", "to"] ["root at amfes.com", "root at amfeslan.local"] {
# ... etc
}
which will do proper address matching (i.e. phrase or comment parts in
headers won't match) against a reasonable set of sender and recipient
headers (for example a CC header).
More information about the dovecot
mailing list