MailScanner User / Domain prefs

stardot

Verified User
Joined
Nov 25, 2008
Messages
17
MailScanner User / Domain prefs : Not working

Hello,


I have had mailscanner working. It scans email for spam and uses the settings set in the MailScanner.conf file (i.e. Score of 6 = Spam).


However, when in Directadmin for a particular domain, I would like to set different threshold's for different domains within the "Spamassassin Setup" area.


I have set a different score setting for a particular domain, (for example a score of "5" is spam) and sent a test spam email and it still is using the main default of "6" in the main mailscanner.conf file.

Is there something I am missing? I would like clients to tailor the spam score setting to suit their particular needs instead of having a blanket setting that applies to all.

If anyone can help , it would be appreciated.
 
Last edited:
For example i have the following in my ~/.spamassassin/user_prefs file :

header L_TO_ME ToCc =~ /me\@my-email\.com/
describe L_TO_ME Email addressed to me
score L_TO_ME 0.010


When i send email to a domain within directadmin from "my-email" (outside the directadmin network) , the above setting has no effect.
 
Another example is i set a test domain as "blacklist" within the user_prefs / spamassassin setup within directadmin , and it didnt even take effect and still accepted email from that domain.
 
Sorry for so many replies, i've been pulling my hair out over this one.

The configuration entry in /usr/local/etc/MailScanner/MailScanner.conf (FreeBSD 7.1 fyi) :

Code:
# 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 =


Is blank. Is it looking in the right place? /home/DIRECTADMIN_USERNAME/.spamassassin/user_prefs )
 
You restarted Mailscanner after making the changes right? And I think restarting Mailscanner also restarts exim but make sure exim gets restarted too.
 
Yes i have restarted mailscanner + exim several times during my tests.

In some cases , using only the mailscanner.conf spam score settings may be appropriate ,but on a system where there are 100s of different users, it would be ideal to have an environment where everyone can adjust the settings themselves.
 
To clarify, incoming mails for any particular domain are not reading the "~/.spamassassin/user_prefs" file.


For example. I added [email protected] as a blacklist in directadmin's spamassassin setup area. My user_prefs looks like this :


Code:
required_hits   5.0
rewrite_subject 1
subject_tag     *****SPAM*****



report_safe     1

blacklist_from *@hotmail.com


Unfortunately , when i send an email from my hotmail account to said domain with the user_prefs , not only does the mail arrive , it indicates that its not even checking the user_prefs :


Code:
X-mydomain-MailScanner-Information: Please contact the ISP for more information
X-MailScanner-ID: 1LJDca-000Ao4-3C
X-mydomain-MailScanner: Found to be clean
X-mydomain-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
     score=-0.38, required 6, BAYES_00 -2.60, TVD_SPACE_RATIO 2.22)
X-mydomain-MailScanner-From: [email protected]
X-Spam-Status: No
 
MailScanner has never been an official part of DirectAdmin, and it's possible no one here has enough information or experience with it to help.

Why do you use MailScanner instead of the facilities built into the official exim.conf script?

Jeff
 
well, does the built in direct admin functionality offer virus protection as well? I was under the impression that it only offered spamassassin protection and if you wanted clamav, the recommendation around these forums was to use mailscanner, as there was many threads on the subject.

I will try to figure it out myself i guess.
 
Thanks -- i'll try that out. It seems pretty straightforward.


If i revert back to the original exim configuration, directadmin should be fine with utilizing spamassassin ?
 
Back
Top