HowTo: MailScanner 4.24 for Exim 4.24

UPGRADE INFO

Wondering about the best way to upgrade this installation as the following versions are available:

MailScanner 4.34
ClamAV .80 (major release)

My mail is working wonderfully.. no spam and no viruses since installing and tweaking this over 6 months ago but I am currently running MailScanner-4.28.6-1 and clamav-0.70-1.

Just trying to stay on top of things without having to resetup all of my config again. Thoughts?
 
Download the latest stable rpm version from the MailScanner site.
The installer will install the latest binaries and create a MailScanner.conf.rpmnew
In order to upgrade and not break anything you need to run the upgrade script.
Go into the MailScanner directory and run the upgrade script - it will prompt you and you can follow the instructions.
I'll do a proper howto on my blog when I get some time :)
 
jjma said:
Will this work with the latest version of spamblocker?

Thanks

Jon
They are two separate things
MailScanner is a mature full email filtering system that can protect your users from viruses, spam, phishing attacks and content.
 
jjma said:
Will this work with the latest version of spamblocker?
SpamBlocker is buillt in to the latest exim.conf file used by DA; by default it's available on every DA installation.

It should not interfere any other additions to exim.conf.

Jeff
 
blacknight said:
They are two separate things
MailScanner is a mature full email filtering system that can protect your users from viruses, spam, phishing attacks and content.

Yes I was aware that they are two seperate things and what they both have to offer but I was directing my question towards their compatability and whether they could coincide with each other. It appears from jeff's comments that you can add mailscanner to exim.conf. If so I'll be adding clamav to use with mailscanner....

regards

Jon
 
Hello,

This installation is run on my server but now i want to shut off the spamassassin in mailscanner setting because i want my user configure their spamassassin in control panel. If i change that :

*********************************
Configure MailScanner
*********************************
#pico -w /etc/MailScanner/MailScanner.conf

and change theses settings:

Use SpamAssassin = yes
Always Include SpamAssassin Report = yes

By :

*********************************
Configure MailScanner
*********************************
#pico -w /etc/MailScanner/MailScanner.conf

and change theses settings:

Use SpamAssassin = no
Always Include SpamAssassin Report = no

And restart my MailScanner. The spamassassin integrated in directadmin will run ? And my user would configure their spamassassin in their control panel ? Thanks. Bye.
 
user_prefs in MailScanner

I want to use de user_prefs (the file wich changed by DA) in MailScanner.conf
How do I this?

I mean it must a setting on de next value:
-MailScanner.conf:
# The per-user files (bayes, auto-whitelist, user_prefs) are looked
# for here and in ~/.spamassassin/. Note the files are mutable.
# If this is unset then no extra places are searched for.
# If using Postfix, you probably want to set this as shown in the example
# line at the end of this comment, and do
# mkdir /var/spool/MailScanner/spamassassin
# chown postfix.postfix /var/spool/MailScanner/spamassassin
# NOTE: SpamAssassin is always called from MailScanner as the same user,
# and that is the "Run As" user specified above. So you can only
# have 1 set of "per-user" files, it's just that you might possibly
# need to modify this location.
# You should not normally need to set this at all.
#SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin
SpamAssassin User State Dir =

but I don't now what!

Koos
 
Avenueduweb said:

And restart my MailScanner. The spamassassin integrated in directadmin will run ? And my user would configure their spamassassin in their control panel ? Thanks. Bye.
Not exactly.
You'll need to turn on spamd in exim as well.
 
Re: user_prefs in MailScanner

koos said:
I want to use de user_prefs (the file wich changed by DA) in MailScanner.conf
How do I this?

Koos

Could you explain a bit more clearly what you are trying to do?
 
Re: UPGRADE INFO

americanintel said:
Wondering about the best way to upgrade this installation as the following versions are available:

MailScanner 4.34
ClamAV .80 (major release)

My mail is working wonderfully.. no spam and no viruses since installing and tweaking this over 6 months ago but I am currently running MailScanner-4.28.6-1 and clamav-0.70-1.

Just trying to stay on top of things without having to resetup all of my config again. Thoughts?
I've posted a brief howto on upgrading MS on my blog:
http://www.mneylon.com/blog/archives/2004/10/30/upgrading-mailscanner-rpm-based-system/
 
jjma said:
Yes I was aware that they are two seperate things and what they both have to offer but I was directing my question towards their compatability and whether they could coincide with each other. It appears from jeff's comments that you can add mailscanner to exim.conf. If so I'll be adding clamav to use with mailscanner....

regards

Jon
You can put them side by side, but you should have a very long look at the configuration options in both. If you are blocking based on RBLs in one it would be a bit pointless to use the same RBL in the other and vice versa.
 
Re: Re: user_prefs in MailScanner

koos said:
I want to use de user_prefs (the file wich changed by DA) in MailScanner.conf
How do I this?

Originally posted by blacknight
Could you explain a bit more clearly what you are trying to do?
I think he is saying that he wants to configure MailScanner so that it takes into account the DA control panel end-user SpamAssassin Settings for
- whitelists
- blacklists
- subject rewrite
- score threshold
- and other settings


I am currently using SpamAssassin on my DA server and would also like to use MailScanner, but not if I have to take away the end-user control over their own whitelists/blacklists.

There is probably a way to integrate the DA control panel whitelists/blacklists with MailScanner but I'm not sure about the other settings.

The control panel saves the whitelist/blacklist data for the end-user in a text file
/home/username/.spamassassin/user_prefs

this text file has sections like this:

whitelist_from *@ecoms.com
whitelist_from *@maq.com
blacklist_from *@give-a-hint.com

However this format is not compatible with MailScanner.

I have MailScanner running on a different server (non-DA) and the whitelist for the server is in the file
etc/MailScanner/rules/spam.whitelist.rules

with lines like this

From: ecoms.com yes
From: maq.com yes

And it works similarly for blacklists

Looking in mailscanner.conf there are the following lines

# Spam Whitelist:
# Make this point to a ruleset, and anything in that ruleset whose value
# is "yes" will *never* be marked as spam.
# This can also be the filename of a ruleset.
#Is Definitely Not Spam = no
Is Definitely Not Spam = /etc/MailScanner/rules/spam.whitelist.rules



So in theory it should be possible to write some kind of shell script that looks for all the files
/home/[username]/.spamassassin/user_prefs
and grabs the data from the end of each line
whitelist_from *@ecoms.com
whitelist_from *@maq.com

and then adds the data to
/etc/MailScanner/rules/spam.whitelist.rules
in the format
From: ecoms.com yes
From: maq.com yes



I'm not sure how you would trigger this though... ideally when a user updates their SpamAssassin settings but I suppose you could just add the script to a cron job


There is also the issue that this would mean a single user's white/blacklist would apply to ALL the other user/domains on the server.

Or perhaps there is a way to configure MailScanner to allow individual user whitelists and blacklists.
 
Last edited:
Ok. I understand what you are trying to do :)
SA's white/blacklist is not the same as MS' one, so you would have to write it out each users preferences to a global file.
You rightly pointed out that:
From: ecoms.com yes
From: maq.com yes

would whitelist it for the entire server/system. The trick is to use combinations in your rules

To: *@xyz.com and From: abc.com yes

or whatever
which means the rule will only be applied when both conditions are met.

It's not an easy thing to integrate if you want to do it that way.
 
I can't get it to work.....

The server works super, but we wanted to have antivirus software on it, so I followed this guide:



http://www.directadmin.com/forum/showthread.php?threadid=1187&perpage=20&pagenumber=1



But when I send an E-mail it does not appear in the exim.in/input folder… and the E-mail is delivered as normal.



As I understand the setting’s:



queue_only = true
queue_only_override = false



in the exim.conf file would prevent the E-mail from even leaving the server. It looks to me that the setting’s in the /etc/exim.conf are being disregarded.



I have placed the setting just before the ACLs part like this:





UW PICO(tm) 4.6 File: /etc/exim.conf



tls_advertise_hosts = *

#auth_over_tls_hosts = *



spool_directory = /var/spool/exim.in

queue_only = true

queue_only_override = false

log_file_path = /var/spool/exim/msglog/%slog





######################################################################

# ACLs #

######################################################################



begin acl



# ACL that is used after the RCPT command

check_recipient:



# we accept if the source is local SMTP (i.e. not over TCP/IP).



^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos

^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text^T To Spell



I have stopped the mailscanner service and restarted the exim. But still no luck, the E-mail is just being treated as normal.

I use the latest version of MailScanner and ClamAV. DA is also the latest version.

I hope you understand what I mean, and that someone could help me out....

Cheers
 
I'm getting the following erros while trying to start MailScanner:

Starting MailScanner daemons:
incoming exim: [ OK ]
outgoing exim: [ OK ]
MailScanner: Can't locate MIME/Parser.pm in @INC (@INC contains: /usr/lib/MailScanner /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 . /usr/lib/MailScanner) at /usr/lib/MailScanner/MailScanner/MCPMessage.pm line 40.
BEGIN failed--compilation aborted at /usr/lib/MailScanner/MailScanner/MCPMessage.pm line 40.
Compilation failed in require at /usr/sbin/MailScanner line 73.
BEGIN failed--compilation aborted at /usr/sbin/MailScanner line 73.
[ OK ]
 
You're either missing the module or it simply can't find it.
You could try installing it manually or via CPAN.
 
Biggest PRoblem

Maybe im lost, but the threshold each user sets up, is not taking effect. Its using the default value, 6. I HAVE to have it use the users prefrence. Is there a way to accomplish this? i tried un-commenting the virus scanning part in the exim confs, but still default. Any ideas?
 
If you are talking about per user thresholds for spam blocking you will need to do quite a bit more.
I would recommend you have a look at the Mailscanner site in particular the mailing list.
 
Back
Top