procmail filtering postfix deliveries
On Monday 06 Sep 2010, Chris G wrote:
> On Mon, Sep 06, 2010 at 09:36:42AM +0100, David Fletcher wrote:
> > This is driving me nuts so I thought I'd ask here.
> > The email arrangement on my server used to be to use fetchmail to download
> > over POP3 which passed messages to procmail using /etc/procmailrc which
> > filtered out any rubbish I don't want to see from certain well defined
> > sources then delivered into mail boxes. This worked OK but was messy.
> > I now have my MX record pointing to my server at home. Messages are sorted
> > into maildir boxes by postfix using the aliases and it works beautifully.
> > using dovecot-imapd to access my mail.
> > What I cannot now get to work is filtering using procmail. With a
> > ~/.procmailrc file it either doesn't work or produces an email loop.
> > I'm using plain Ubuntu Lucid Server with no desktops on this machine.
> > I would like to know, does anybody here have the MX->postfix->procmail
> > arrangement working, and if so could they please let me have an example or
> > two of what they have done or some tips I can use?
> Don't you just set up a .forward file in your home directory so that
> postfix delivers the mail to procmail? I have this sort of a set up
> except that it doesn't use procmail it uses a python script I wrote
> Set up postfix to deliver your mail normally (i.e. don't tell it to
> use procmail) and create a .forward file to feed the mail into
> procmail. My .forward file is simply:-
> | /home/chris/bin/filter.py
> I guess yours would need to be:-
> | /usr/bin/procmail
> Chris Green
Yes, I've got a .forward file containing the following that I found in various
help pages found with Google:-
"|IFS=' '&&exec /usr/bin/procmail -f-||exit 75 #dave"
but it results in this stupid mail looping. Every time it receives a message
with this activated the hard drive in the server thrashes away until I
deactivate (change the name of) .forward.
What delivery recipe do you folks use to get procmail to put mail into a
recipient's maildir? I assume it needs to have a recipe for delivery
otherwise as far as I know the message will just drop off the end of
the .procmailrc and vanish into oblivion.
ubuntu-users mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users