Use Spamassassin for better SPAM detection
The Linux operating system is typically immune to viruses attached to email. But it is not immune to SPAM. Left unfiltered your inbox would quickly fill up with more SPAM than you care to delete. What is worse is owning a mail server and not protecting your users from a barrage of SPAM.
By employing Spamassassin you can set up an outstanding SPAMÂ filter system that will protect your users. It's not as simple as double clicking an .exe file to install, but the end results will be worth the time and effort.
Installing the tool
This portion of the task is simple. Open up your Add/Remove utility, do a search for "spamassassin" (no quotes), select the results, and apply the changes. After you have installed the package you need to take a few steps to finish up the installation.
Now you are going to need a local.rc file. You can open up the /etc/mail/spamassassin/local.rc file for hand editing, or you can use this handy web-based tool to set it up for you. This tool was written by Michael Moncur and makes the setup of Spamassassin much easier. Once you have selected all your options click the Generate button and then click the Download button. You will need to place this file in /etc/mail/spamassassin in order for it to be used.
It's time to start the daemon. Issue the command /etc/init.d/spamassassin start (or /etc/rc.d/init.d/spamassassin start - depending upon your distribution.)
Test the install
Spamassassin comes with a sample file you can run through the filter for testing. In modern installations this file is located in /usr/share/doc/spamassassin-*/sample-spam.txt. To test this issue the command:
spamc -R </usr/share/doc/spamassassin-3.2.5/sample-spam.txt
You should see results like this:
Content analysis details:Â Â (1000.0 points, 5.0 required)
pts rule name             description
---- ---------------------- --------------------------------------------------
-0.0 NO_RELAYSÂ Â Â Â Â Â Â Â Â Â Â Â Â Informational: message was not relayed via SMTP
1000 GTUBEÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â BODY: Generic Test for Unsolicited Bulk Email
-0.0 NO_RECEIVEDÂ Â Â Â Â Â Â Â Â Â Â Informational: message has no Received headers
As you can see, this sample scored 1000 points. Only 5 points are required for an email to be considered SPAM. It's safe to say this is SPAM and safe to say Spamassassin is working.
Using Spamassassin with Procmail
You will need to set up Procmail (or another MTA) in order to deliver mail. What we want to do is set this up globally so you don't have to deal with each users ~/.procmailrc file. To do this you will edit the /etc/procmailrc file. All you need to do is add the following lines:
DROPPRIVS=yes
:0fw
| /usr/bin/spamc
Spamassassin should now be working.
Training spamassassin
At first you might not notice much of a drop in SPAM. This is because Spamassassin has to have a period of training. There is a built-in tool for this called sa-learn. What you need to do is create two folders, one for SPAM and one for HAM. In the SPAM folder collect 100 or so emails that are definately SPAM. In the HAM folder collect 100 or so valid emails. Once you have those folders collected issue the following commands:
sa-learn --spam /PATH/TO/SPAM/FOLDER
sa-learn --ham /PATH/TO/HAM/FOLDER
Where /PATH/TO/SPAM/FOLDER and /PATH/TO/HAM/FOLDER are the explicit paths to these folders.
You can also set up a cron job to help Spamassassin train frequently if you need.
Final Thoughts
If SPAM is clogging up your Linux mail server you will be wise to employ a tool like Spamassassin. Your users and your IT staff will thank you for it.

You said that Outlook isn’t your main email client, so which is your main one?
I think its thunderbird
It is Mozilla Thunderbird.
Awesome! This actually solved my problem… what a stupid bug.
If this is the same bug that I’ve encountered, there may be another fix: (1) hover over open Outlook item in Taskbar, cursor up to hover over Outlook window item, and right-click; (2) this should give you Restore / Move / Size / Minimize / Maximize — choose Move or Size; (3) use your cursor keys, going arbitrarily N/S/E/W, to try to move or size the Outlook window back into view. Basically, the app behaves as though it were open in a 0x0 window, or at a location that’s offscreen, and this will frequently work to resize and/or move the window. Don’t forget to close while resized/moved, so that Outlook remembers the size/position for next time.
THANK YOU Claude!!! I could get the main window to launch but could not get any other message window to show on the desktop. You are my hero!!!!
Solved my issue! 6 years later and this is still problem…
Fantastic. Thank you. Size did the trick.
This solved my Outlook problem, too. Thank you. :)
Thank you so much, this started happening to me today and was causing big problems. You are a life saver, I hope I can help you in some way some day.
You are a god – thank you!
thanks a lot…. work like charm.. :-)
Yah…thanks Claude. I’ve been having the same problem and tried all the suggestions…your solution was the answer. It had resized itself to a 0/0 box. Cheers
Excellent post. This had me baffled even trying to accurately describe the problem. This fixed it for me.
Thank you
Thanks a lot for the article. Don’t know why it happenend, don’t know how it got fixed, but it was really annoying and now it works :-)
Thanks a lot. I was facing this issue from past 3 week. I tried everything but no resolution. The issue was happening intermittently and mainly when I was changing the display of screen ( as i use 2 monitors). The only option i had was to do system restore. But thanks to you.
I’ve been tried to sole this problem for 12hours. Your comment about changing the display of screen helped me a lot!! Thanks!!
Thank you…don’t know why this happened but your instructions helped me fix it. Running Windows 10 and office pro 2007
Great tip! Thanks!
Worked for me, too – thank you!!!
It’s Worked for me, too
thank you very much!
I had a similar issue with Outlook 2013 on Windows 10 and this helped me to fix it. Thank you very much!
Thank you so much. Solved!
Considering you published this in 2012, incredible not been debugged by Microsoft.
Thank you again. M
This problem was faced by only one user logging to TS 2008 r2 using outlook 2010.The issue was resolved.
Thanks.
Great tip. Thank you!!!! If it helps, I had to use the Control Key and the arrow keys at the same time to bring my window back into view. Worked like a charm.
Thank you, this worked !!!!
Man, you are a fucking god. Thanks a lot, what an annoying bug!!
Awesome, this post solved the issue. Many thanks!