Click to See Complete Forum and Search --> : procmail & forwarding


Nobody's Hero
01-16-2004, 11:19 PM
I set up a linux box as a mail server. I have multiple email accounts which are each polled by fetchmail every 3 minutes. Then I have procmail pipe the messages through spamassassin. I have ipop3d running so I can collect my mail with any pop3 client.

Here is the contents of .procmailrc

:0fw
| /usr/bin/spamassassin

What I want to do is forward all my mail (after it's been passed trough spamassassin) to another email address. The only catch is I still want a copy to be delivered locally. How can I forward a copy of the mail, but still leave a copy locally?

Thanks.

Nobody's Hero
01-17-2004, 12:42 AM
BTW, I tried using a .forward file but it didn't seem to work.

it looked like this:

<localuser>, <forwardingaddress>



i think i need to do it with procmail.

mdwatts
01-17-2004, 10:45 AM
Since I've never used Procmail or even forwarding with any MTA, I'll just point you to these G4L search results for 'procmail forwarding' (http://www.google.com/linux?hl=en&lr=&ie=ISO-8859-1&q=procmail+forwarding&btnG=Google+Search) in hopes it has the solution for you.

Nobody's Hero
01-18-2004, 08:31 PM
I figured out what I was trying to do. In case it helps anyone else, here it is...


### this passess all incoming mail through spamassassin
:0fw
| /usr/bin/spamassassin


## i trust spamassassin, so i just delete anything it thinks is spam
:0
* ^X-Spam-Flag: YES
/dev/null


## this forwards a copy of my mail to me@host, but also leaves a local copy (thats what the 'c' does).
:0c
! me@host