Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 6th July 2006, 04:58
thelorax thelorax is offline
Junior Member
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs down fetchmail + procmail + spamassassin setup help

First off, I know that bits and pieces of this have been covered elsewhere, but I'm apparently not smart enough to figure it all out, so please be patient.

Here's what I would like to do: I have a catchall account that gets LOTS of spam (hundreds a day) but there are occasionally some important messages that I would like to get (and Thunderbird's filter just isn't cutting it). What I would like to do is retreive the messages from this account via fetchmail, and have procmail run them through spamassassin (or bogofilter, clamscan, whatever) and then place the messages in a local mailbox with good stuff in inbox and spam in a spam folder (or even just mark it as spam in the header so I can filter in the mail client).

I have tried setting up .fetchmailrc and .procmailrc files but seem to be failing miserably

.fetchmailrc
Code:
#set filter = /usr/bin/procmail -m $HOME/.procmailrc
set daemon 180
poll pop.server.com with proto POP3
    user ‘[username]’ there with password ‘[password]’ is ‘[me]’ here
.procmailrc
Code:
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin
MAILDIR=$HOME/.maildir      #you'd better make sure it exists
LOGFILE=$MAILDIR/from   #recommended

# Use maildir-style mailbox in user's home directory
DEFAULT=$HOME/.maildir/
SHELL=/bin/sh

:0fw
| /usr/bin/spamassassin

Any detailed advice in how to set this up would be greatly appreciated. I'm running Ubuntu 6.06 if it matters.

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 6th July 2006, 06:55
freedog96150 freedog96150 is offline
Junior Member
 
Join Date: Jul 2006
Location: Nevada
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I know that this is not a direct reply to your question, but I have an easier suggestion.

Why not figure out the exact accounts that are used for the "important" emails, create those email boxes and set your catchall to /dev/null.

My experiences are that the catchall will always be OVERLOADED with spam because all the spambot has to do is sub in name-after-name-after-name@yourdomain.com and ALL that spam is guaranteed to get delivered. At least with explicit email box addresses, the spam has to be addressed to an existing user, anything else gets dumped.

As far as sifting through the morass of emails left, I use the following combo of packages:
MailScanner+ClamAV+Spamassassin+DCC+Vipul's Razor

I found the installation of these packages to be very straighforward and had everything installed in running with an evenings worth of tweaking. Start with MailScanenr as they have an optional file at http://www.mailscanner.info/downloads.html in the "other downloads" section that will install ClamAV and Spamassassin in one shot all preconfigured for MailScanner. Make sure that you also read the appropriate sections on the MailScanner documentation that refer to your specific MTA [i.e., Postfix, Exim, sendmail, Procmail, etc]. After that, DCC and Razor are just simple installs with minimal configuration to get them working with MailScanner and Spamassassin.

Without starting any wars (no flames please), I go this route versus the procmail filter route because I found that I could not stay on top of all the rules that I needed to create to block all the *new* ways that spammers find to flood your inbox every day. With the above tools, much of that is done for you and updated automatically....less work for me :-)

Hope some of that helps!
Brian
Reply With Quote
  #3  
Old 7th July 2006, 10:24
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Quote:
Originally Posted by thelorax
Any detailed advice in how to set this up would be greatly appreciated. I'm running Ubuntu 6.06 if it matters.

Thanks
You must pipe the emails from fetchmail to Postfix which then delivers the mails to the appropriate mailboxes. And in the users' homedirs you can then use procmail to scan the emails.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
plenty of procmail/trashscan processes ZyanKLee Installation/Configuration 10 27th December 2005 20:09
procmail <defunct> ZyanKLee Installation/Configuration 1 19th December 2005 00:58
customized procmail setup jmroth Installation/Configuration 4 5th December 2005 21:20
procmail supposed to be in main.cf? Smitty Installation/Configuration 4 5th December 2005 10:10
Attempting The Perfect Setup (To Some Extent) PsyVision HOWTO-Related Questions 3 3rd November 2005 11:50


All times are GMT +2. The time now is 00:37.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.