Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-29-2012, 11:53 PM   #1
LQ Newbie
Registered: Oct 2008
Posts: 26

Rep: Reputation: 1
SpamAssassin setup help

Hi all.

I have followed Falko's excellent 'Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.10)' tutorial. I now have a mail server up and running serving various domains. Top job Falko. Thanks.

Most of my accounts use IMAP, so the mail stays on the server. What I would like to be able to do is tell SpamAssassin to go though the Junk folders of all the mail accounts on my server and learn what has been tagged as junk/spam, and possibly also go though all read mail and learn what is ham. Is this possible.

I am actually running Ubuntu 11.04 rather than 9.10.
My SpamAssassin is V2.02-beta13, Postfix V2.8.5, Courier Imap 4.8.0-3
I'm not really sure how the mail is stored on the server let alone how to get SpamAssassin to read though it and learn whats spam and whats ham. Its all stored under one user, split in to sub folders for domain, then again for each mail account. Any help on getting this automated via a cron job or similar would be much appriciated.


Old 07-03-2012, 01:35 AM   #2
Registered: Apr 2009
Posts: 214

Rep: Reputation: 44
I am using perl to achieve this. The Mail::IMAPClient and Email::Address modules are good for stepping through the folders and checking the message headers - then use system calls to the spamassassin tools to learn or unlearn as appropriate.
Old 07-03-2012, 09:58 PM   #3
LQ Newbie
Registered: Oct 2008
Posts: 26

Original Poster
Rep: Reputation: 1
Thats great. Thanks for the info. I do have one question though.

I am marking all my spam with Thunderbird and having it transfer everything to a junk folder on the account. Apart from apearing in the folder, how can I tell its spam. I have looked though a couple of spam emails, marked as such with thunderbird but don't see any x-spam like info in the header. I have also checked two copies of the same email, one marked as spam and one not, and diff reports not difference. How does thunderbird keep track ? Can thunderbird add this info to the headers or does it use a different method to mark the message ? I havn't been able to find any info on this.....

Thanks again for your help.


Last edited by robsbots; 07-03-2012 at 09:59 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to setup Mailscanner, ClamAV, Postfix, SpamAssassin (my notes) squintr Linux - Software 2 05-31-2012 02:10 PM
[SOLVED] How to setup automatic update for spamassassin + clamav Antivirus mail4vijay Linux - General 6 11-13-2009 07:28 AM
Spamassassin setup with Postfix, Dovecot and Amavisd snurckle Linux - General 2 04-07-2005 01:16 PM
spamassassin setup draggin Linux - Software 1 01-31-2005 02:00 PM
SpamAssassin setup - good documentation tensigh Linux - Software 5 04-22-2004 11:32 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration