[Dovecot] Using getmail with sieve
Orr, Steve
sorr at rightnow.com
Wed Mar 28 00:38:19 EEST 2012
I'm trying to setup a personal "mailmover" where I use getmail to retrieve remote IMAP server mail and load it into my local Dovecot then filter all email on the Dovecot server side with sieve. (I'm using Dovecot v. 2.0.9 with IMAP/Maildir.)
1) From the docs I gather that Dovecot sieve will not work as mail is loaded by getmail and I need to refilter the email after it has been loaded with getmail, right?
2) In http://wiki2.dovecot.org/HowTo/RefilterMail it says, "This HOWTO helps you create a folder for mail that needs refiltering..." But contrary to the doc I don't see any actual instructions about creating said folder. The HOWTO assumes mail already exists in a folder called "REFILTER' but doesn't say how this folder was populated. "How to?"
3) As a test I manually created the "REFILTER" folder and put my inbox mail in it (with Thunderbird) then following the HOWTO I ran my getmail script and my sieve script performed as expected.
4) How do I automate this? I tried a new getmail script to run against the inbox and tag new email so a subsequent getmail script could move it into the REFILTER folder for later sieve processing. This seems like way too much work. The HOWTO doc seems incomplete or presumes other knowledge, especially for an IMAP server and email sieve nubie.
TIA,
D. B.
----------------------------------------------
$ dovecot -n
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-131.0.15.el6.i686 i686 Red Hat Enterprise Linux Server release 6.1 (Santiago)
log_path = /var/log/dovecot
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date
mbox_write_locks = fcntl
passdb {
driver = pam
}
plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
}
postmaster_address = test at host1
protocols = imap lmtp
service lmtp {
user = test
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
driver = passwd
}
protocol lmtp {
mail_plugins = " sieve"
}
protocol lda {
mail_plugins = " sieve"
}
More information about the dovecot
mailing list