[BUGS] Procmail - Anyone have experience with it?
Jerahmy Pocott
quakenet1 at optusnet.com.au
Tue Feb 5 23:13:51 EST 2008
As the saga continues...
I now have local user accounts and am using Dovecot to provide imap
access, which all seems to be working quite well!
But now I want to run procmail on all of the mail boxes and filter
stuff from all of them into a separate account (leaving a copy in the
original location). Dovecot stores users mail in their ~/mail/
directory in plain text (mbox format) in a file that is named by the
imap directory the mail is in, the inbox mail is left in /var/mail/
$username, how ever at this point I'm not interested in filtering mail
that ends up in the inbox, everything of interest will end up in an
imap directory.
So I end up with a bunch of ~/mail/ directories with mbox files named
by imap folder, the names are standard across all accounts. But
procmail needs to be run on those files directly rather than being
used as the MDA by sendmail and that's what I'm not sure about doing..
Since it needs to be continually run (which could be a cron job) but
it needs to not filter messages it processed the last time it was run,
only new ones and I want the processed mail to remain in the mail box.
I'm not really familiar with all the capabilities of procmail, maybe
it can do this? But if not it will need to be achieved with some
scripting (I'm happy to write a complete program if I have to, but I'm
pretty sure the existing tools are more than enough). So again any
thoughts on the matter would be appreciated =)
My thoughts are currently that if procmail can't do it alone, I could
write a script to separate the mail that has arrived since the last
run and just have it process that..
Anyway, cheers!
Jerahmy.
More information about the BUGS
mailing list