[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cyrus IMAP + Exim + Mutt + Fetchmail + Procmail + Spamassassin setup



Andy Saxena wrote:

Hi,

That's a long subject line, right? That's why I need some direction with
my goals here. I am currently using Fetchmail + Procmail + Spamassassin
+ Mutt + Exim to read and deliver email via POP using my ISP account.

What I would like to do is setup a local IMAP server (possibly Cyrus) to
which I will download the email from my ISP account. If I could somehow
run Procmail & Spamassassin before the mail is sent to the IMAP folders,
that would be terrific! I would also like to take the MBox formatted
email that I currently have and put them on the IMAP server.

Then I would like to use Mutt to read the email. To send email, it would
have to be via my ISP's SMTP server, with a copy stored in the IMAP
folder.

I have a very similar setup, using Cyrus. I just have fetchmail set up
in crontab to run periodically.  My .fetchmailrc looks like this:

poll pop.mindspring.com proto POP3 user keithmur pass mypassword fetchall nokeep noflush mda "/usr/bin/procmail USER=keithmur"

My .procmailrc looks like this:

PMDIR=$HOME/
LOGFILE=$PMDIR/mail.log
VERBOSE=on

#:0fw
#| spamc -s 100000

# Spam Assassin spam flag from above
#:0
#* ^X-Spam-Status: Yes
#| /usr/sbin/cyrdeliver -a $USER -m SPAM $USER

# Spam Assassin spam flag (used on Debian lists, at the least
:0
* ^X-Spam-Flag: YES
| /usr/sbin/cyrdeliver -a $USER -m Trash $USER

# Eliminate duplicates
:0 Wh: msgid.lock
| formail -D 8192 msgid.cache

<bunch of other filters follow>

You can see above how cyrdeliver is used to deliver mail to different Cyrus IMAP mailboxes.

Note that I've commented out the SpamAssassin stuff, because, even though it worked, I believe, it sure slowed things down.

Notice I've got the logging turned on. Makes for a big log, but I delete it periodically from crontab. I like to know how things got the way they got.

That's about all: get the products, set them up, and tailor .fetchmailrc and .procmailrc, as well as crontab.




Reply to: