Using Procmail to filter local cron email messages

Hal Burgiss hal at burgiss.net
Tue Jul 7 16:21:30 UTC 2009


On Tue, Jul 07, 2009 at 04:54:22AM -0700, Keith wrote:
> Hi,
>   I use fetchmail with postfix & procmail to retrieve my email from mail 
> servers and procmail to my Ubuntu 9.04 Linux box. The problem that I 
> encounter is that when cron runs it generates and sends a email to the
> local user account. When this email is sent it is not filtered with
> procmail and stays in my INBOX /var/mail/USERNAME . Is there a way
> to call procmail from postfix to filter messages? In fetchmail I use
> wants mda /usr/bin/procmail to call procmail to filter email messages.
> 
> # Configuration created Sat Jun 13 11:40:27 2009 by fetchmailconf 1.54 $Revision: 5165 $
> poll mail.pop3server.net with proto POP3 auth password and options uidl
> user 'USERNAMETHERE' there with password 'secret' is 'USER' here 
> options keep ssl
>   mda '/usr/bin/procmail -d %T'
> 
You can set postfix to deliver via procmail. In main.cf: 

  mailbox_command = procmail -a "$EXTENSION"

Then reload postfix. AFAIK, that is workin on my home system.

-- 
Hal




More information about the ubuntu-users mailing list