![]() I am a happy camper.I first installed then updated spamassassin using spam.sh. I add this email to Junk and the next identical spam message will always have a higher score until it is recognized correctly. When a spam messages gets through, the headers will explain why, usually because spam score is not high enough. The items I modified are: %org-name% = - Max Children = 3 Always Include SpamAssassin Report = yes Multiple Headers = add Place New Headers At Top Of Message = yes Log Spam = yes Log Non Spam = yesĪnd now after running a while the results are much better. Also nice to know, logging for the mail server is sent to and not /var/log. So get your self a cup of coffee and use your favorite editor to update the file /var/packages/MailServer/target/etc/template/mailscanner.template, there are hundreds of options. But be careful changing this file, on next reboot it will be overwritten bij de config template. You can find these in /var/packages/MailServer/target/etc/MailScanner. I also found that the Mailscanner has 5 running instances on my Synology all taking about 50 Mb of memory, I have only limited mails coming in every day so I need to tone this down, the Synology only has 512 Mb… Okay lets dig into this and find the config files for SpamAssassin and Mailscanner. I found that some messages have a line X-Mailscanner-Spamcheck: not spam, SpamAssassin (not cached, score=3.6, required 5, BAYES_99 3.50, RDNS_NONE 0.10) but others do not. ![]() If you use your mail client to look at messages you can see there are added headers in the format of: X-Mailscanner. Hmm BIG disappointment! Lets dig further. About a month later I had a few hundred but was not seeing all my spam being detected. Having 20 Junk mail messages is not good enough for bayesian statistics. chmod u+x /opt/spamscan.sh chmod g+x /opt/spamscan.sh chmod o+x /opt/spamscan.sh And I schedule this using /etc/crontab: 0 */2 * * * root /opt/spamscan.sh > /var/log/spam_learn.log Wow, now all ready and done. Use chmod on the script file to allow executing. The tool is called sa-learn and is called in the following way: /var/packages/MailServer/target/bin/sa-learn -siteconfigpath /var/packages/MailServer/target/etc/spamassassin -dbpath /var/spool/MailScanner/spamassassin/ -spam /volume1/homes/*/.Maildir/.Junk// echo "Updating SpamAssassin DB" perl -T -Mlib=/var/packages/MailServer/target/lib/perl5/5.8.6 /var/packages/MailServer/target/bin/sa-learn -siteconfigpath /var/packages/MailServer/target/etc/spamassassin -dbpath /var/spool/MailScanner/spamassassin/ -sync echo "Backing up SpamAssassin DB" perl -T -Mlib=/var/packages/MailServer/target/lib/perl5/5.8.6 /var/packages/MailServer/target/bin/sa-learn -siteconfigpath /var/packages/MailServer/target/etc/spamassassin -dbpath /var/spool/MailScanner/spamassassin/ -backup > /opt/spamassassin_backup.bak date Now when new spam mail comes in and is not detected a user only needs to mark it as spam on his iphone, the mail is moved to Junk and the server indexes this every 2 hours or so to prevent this spam from coming in again. On the mail server we regularly schedule to update a bayesian index on every users Junk folder. The solution is simple, each user on the mail server need to have a standardized Junk email folder in their IMAP store. How to you manage spam as a mail user without needing to access a mail server. One that solves another of my long wished for features. I was amazed to find on the web that spamassassin is bundled with some amazing tools. Well as I have found before, Synology is a looker but often not a performer. Just go into Settings and enable auto learning? The engine did not catch much… Okay maybe it needs further setup. Just go into the UI and check “Enable SpamAssassin filter engine” and boom, no spam. This should be a problem easily tackled on the Synology I thought. After a few days I was again receiving spam messages, something I had overcome on the previous mailserver using assp. Maybe a project for a rainy day, a nice virtual image with the Synology software would be nice!īut now the subject at hand. But how do I do this, I do not have a spare Synology to try this on. I really need to check if I can restore this backup easily. What I do find scary is the backup facility. I must say I am impressed with the result. Getting a running mail server converted to Synology went quite well and quickly. I use a setup with IMAP accounts for storing all my emails. Recently I converted my mail server to the Synology mailserver.
0 Comments
Leave a Reply. |