This is a discussion on Postfix with procmail, using a per-user .procmailrc file to forwardthrough gmail within the mailing.postfix.users forums, part of the Mail Servers and Related category; I tried posting this question on linuxforums.org but havn't had a reply in two days. Hopefully someone here ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I tried posting this question on linuxforums.org but havn't had a
reply in two days. Hopefully someone here can help with this. I'm trying to set up a filter on our server to check the headers of incoming email to see if it is being forwarded from gmail, and if not, forwarding the message to gmail where gmail can act as a spam filter and forward the mail back. This method is talked about at a few sites that I've listed at the end of this message. It seems like the best option because it doesn't require too many changes to existing mail retrieval, and should be a simple setup and removal if necessary. I'm a little new to using linux command shell and am having some trouble getting the configurations right to get this to work (server is running Redhat Enterprise Linux 4ES, I'm using the web-based shell through Webmin). We are using postfix, and appear to have procmail installed, but it isn't being used. Those tutorials mention using procmailrc to set up the filter, but if there is another option let me know! Replacing MYUSERNAME and USER with their respective values: .procmailrc file put into root/home/MYUSERNAME/ Code: ------------------------------------------------------------ DEFAULT=/var/spool/mail/MYUSERNAME MAILDIR=$HOME/mail PMDIR=$HOME/.procmail LOGFILE=$PMDIR/log SHELL=/bin/sh # forward to gmail account for spam filtering :0 * !X-Forwarded-For: USER@gmail.com { :0fw | formail -IDelivered-To :0 ! USER@gmail.com } ------------------------------------------ This is supposed to enable procmail? .forward file put into root/home/, I tried renaming as .forward and .forward.postfix Code: ----------------- "|/usr/bin/procmail -t" --------------- Nothing at all seemed to change when I tried this. Incoming emails continued to be sent as normal and I don't know how to check if it was even being forwarded through procmail and if there was a problem with the .procmailrc. Can anyone help? From the mail server configs, our mail storage type is 'mbox', mail file directory style is 'mail/username', mail file in home directory is 'mbox', user mail file location is '/var/spool/mail', and user forward files set to '$z/.forward.$w:$z/.forward' if that's relevant. Links relating to this: Using Gmail as a Spam Filter http://mboffin.com/post.aspx?id=1636 Double-Pass Spam Filtering with Gmail - http://wiki.dreamhost.com/index.php/...ing_with_Gmail Make GMail’s Spam Filter Work For You http://blog.rafferty.org/2008/01/02/...-work-for-you/ Spam Filtering using Google's GMAIL http://galileo.phys.virginia.edu/res...filtering.html |
![]() |
| Thread Tools | |
| Display Modes | |
|
|