[svlug] procmail (was: Some pretty serious parsing)

Steve Litt slitt at troubleshooters.com
Tue Nov 17 08:20:37 PST 2015


On Mon, 16 Nov 2015 20:51:27 -0700
Akkana Peck <akkana at shallowsky.com> wrote:
> 
> Ivan Sergio Borgonovo writes:

> > 
> > I never felt the need to stop fetchmail once I moved to sieve.
> 
> You run both fetchmail and dovecot? Do you set dovecot as fetchmail's
> mda? I'm not finding much with google about doing that -- mostly
> people asking on mailing lists. I had assumed that using dovecot
> would mean running it on the mail server, then accessing the folders
> using something like mailsync (is that still maintained?)

I do too.

I Imap grab mail from my 3 ISPs using Fetchmail. For each email,
Fetchmail has Procmail handle it, and procmail deposits the mailpiece
in the correct Dovecot directory.

Here's part of my .fetchmailrc:

================================================
set postmaster "slitt"
set bouncemail
set no spambounce
set properties ""
set daemon 180

poll pop.troubleshooters.com protocol IMAP:
	user 'slitt at troubleshooters.com' there is 'slitt' here
	pass 'IBPrivate'
	limit 50000000
	warnings 3200
	expunge 60
	ssl			
	sslcommonname "secure.coolisp.com"
	sslcertck
	mda "/usr/bin/procmail -d %T"
	fetchall;
================================================

Note the mda line that passes the message to procmail. And the following
is a recipe from my .procmailrc:

================================================

DEFAULT=$HOME/mail/Maildir/.INBOX/
MAILDIR=$HOME/mail/Maildir/
LOCKFILE=$HOME/mail/.lock
VERBOSE=no
LOGFILE=$HOME/procmail/log
GARBAGE=/dev/null

:0:
* ^Subject.*\[SVLUG\]
.svlug/

:0:
* ^List-Id:.*xubuntu-users.lists.ubuntu.com
.xubuntu/
================================================

In the preceding, the way I did it with svlug is the old, deprecated
method of depending on a string in the subject. The way I did it for
Xubuntu list is the new, correct way. In both cases, the directory is
relative to $MAILDIR, and ends in a slash to tell procmail it's putting
it in a maildir, not an mbox. In this case, the maildir is the maildir
belonging to my personal Dovecot email server. Hillary's not the only
one with a personal email server. :-)

SteveT

Steve Litt 
November 2015 featured book: Troubleshooting Techniques
     of the Successful Technologist
http://www.troubleshooters.com/techniques



More information about the svlug mailing list