HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Virtual Users with Postfix/Courier/Amavis etc...Quarantine? (http://www.howtoforge.com/forums/showthread.php?t=16369)

volksman 21st October 2007 03:32

Virtual Users with Postfix/Courier/Amavis etc...Quarantine?
 
Hello All!

I have finally deployed my server into the wild and am happily sending and receiving mail. However I would like to know where the spam/virus quarantine directory is located?

According to the howto it is set in /etc/amavis/conf.d/20-debian_defaults and is set to $QUARANTINEDIR = "$MYHOME/virusmails";

Where is $MYHOME?

Also back in the day I ran spamassassin and was able to a) train it with already received spam and b) setup my own regexs in files to alter the filtering. Is this still possible? if so any pointers on where the files exist?

volksman 21st October 2007 03:34

scratch the first part....found it in /var/lib/amavis....I think I need a break here... :)

volksman 21st October 2007 03:38

I just keep answering my own questions here. But this is weird. I ran sa-learn --dump magic and it barfed saying there was an error and to run with -D. So I did and get this:

[8802] info: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": use_dcc 1
[8802] info: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": dcc_path /usr/bin/dccproc
[8802] info: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": dcc_add_header 1
[8802] info: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": dcc_dccifd_path /usr/sbin/dccifd
[8802] info: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": pyzor_add_header 1
[8802] dbg: rules: __MO_OL_9B90B merged duplicates: __MO_OL_C65FA
[8802] dbg: rules: __XM_OL_22B61 merged duplicates: __XM_OL_A842E
[8802] dbg: rules: __MO_OL_07794 merged duplicates: __MO_OL_8627E __MO_OL_F3B05
[8802] dbg: rules: __XM_OL_07794 merged duplicates: __XM_OL_25340 __XM_OL_3857F __XM_OL_4F240 __XM_OL_58CB5 __XM_OL_6554A __XM_OL_812FF __XM_OL_C65FA __XM_OL_CF0C0 __XM_OL_F475E __XM_OL_F6D01
[8802] dbg: rules: FH_MSGID_01C67 merged duplicates: __MSGID_VGA
[8802] dbg: rules: FS_NEW_SOFT_UPLOAD merged duplicates: HS_SUBJ_NEW_SOFTWARE
[8802] dbg: rules: __FH_HAS_XMSMAIL merged duplicates: __HAS_MSMAIL_PRI
[8802] dbg: rules: __MO_OL_015D5 merged duplicates: __MO_OL_6554A
[8802] dbg: rules: __MO_OL_91287 merged duplicates: __MO_OL_B30D1 __MO_OL_CF0C0
[8802] dbg: rules: KAM_STOCKOTC merged duplicates: KAM_STOCKTIP15 KAM_STOCKTIP20 KAM_STOCKTIP21 KAM_STOCKTIP4 KAM_STOCKTIP6
[8802] dbg: rules: __XM_OL_015D5 merged duplicates: __XM_OL_4BF4C __XM_OL_4EEDB __XM_OL_5B79A __XM_OL_9B90B __XM_OL_ADFF7 __XM_OL_B30D1 __XM_OL_B4B40 __XM_OL_BC7E6 __XM_OL_F3B05 __XM_OL_FF5C8
[8802] dbg: rules: __XM_OL_5E7ED merged duplicates: __XM_OL_D03AB
[8802] dbg: rules: __MO_OL_22B61 merged duplicates: __MO_OL_4F240 __MO_OL_ADFF7
[8802] dbg: rules: __MO_OL_812FF merged duplicates: __MO_OL_BC7E6
[8802] dbg: rules: __MO_OL_25340 merged duplicates: __MO_OL_4EEDB __MO_OL_7533E
[8802] dbg: rules: __MO_OL_58CB5 merged duplicates: __MO_OL_B4B40
[8802] dbg: rules: __DOS_HAS_ANY_URI merged duplicates: __HAS_ANY_URI
[8802] dbg: rules: __XM_OL_C7C33 merged duplicates: __XM_OL_C9068 __XM_OL_EF20B
[8802] dbg: rules: __MO_OL_72641 merged duplicates: __MO_OL_A842E
[8802] dbg: rules: __MO_OL_5E7ED merged duplicates: __MO_OL_C7C33
[8802] dbg: rules: __MO_OL_F475E merged duplicates: __MO_OL_FF5C8
[8802] dbg: rules: __MO_OL_4BF4C merged duplicates: __MO_OL_F6D01
[8802] dbg: conf: finish parsing
[8802] dbg: plugin: Mail::SpamAssassin::Plugin::ReplaceTags=HASH(0x91c 7cd4) implements 'finish_parsing_end', priority 0
[8802] dbg: replacetags: replacing tags
[8802] dbg: replacetags: done replacing tags
[8802] dbg: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
[8802] dbg: config: score set 1 chosen.
[8802] dbg: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
ERROR: Bayes dump returned an error, please re-run with -D for more information

So it looks like my local.cf is busted and its looking to bayes_toks in the wrong place. Any ideas?

volksman 21st October 2007 18:58

Ok...so a nice long nights sleep has helped me answer some questions. Right off the bat I think there is a problem with the HowTo and:

bayes_path /var/lib/amavis/.spamassassin/bayes

needs to be added to the /etc/spamassassin/local.cf file for bayes to work. Unless I missed something but this removes any errors from sa-learn other than the DCC error. Still looking for an answer to that if anyone has one. These lines in particular are worrying to me:

[8802] info: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": use_dcc 1
[8802] info: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": dcc_path /usr/bin/dccproc
[8802] info: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": dcc_add_header 1
[8802] info: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": dcc_dccifd_path /usr/sbin/dccifd
[8802] info: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": pyzor_add_header 1

falko 22nd October 2007 13:43

What's in /etc/spamassassin/local.cf?

volksman 22nd October 2007 13:59

This is my current local.cf


# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
# Only a small subset of options are listed below
#
################################################## #########################

# Add *****SPAM***** to the Subject header of spam e-mails
#
rewrite_header Subject *****SPAM*****


# Save spam messages as a message/rfc822 MIME attachment instead of
# modifying the original message (0: off, 2: use text/plain instead)
#
# report_safe 1


# Set which networks or hosts are considered 'trusted' by your mail
# server (i.e. not spammers)
#
# trusted_networks 212.17.35.


# Set file-locking method (flock is not safe over NFS, but is faster)
#
# lock_method flock


# Set the threshold at which a message is considered spam (default: 5.0)
#
# required_score 5.0


# Use Bayesian classifier (default: 1)
#
# use_bayes 1


# Bayesian classifier auto-learning (default: 1)
#
# bayes_auto_learn 1


# Set headers which may provide inappropriate cues to the Bayesian
# classifier
#
# bayes_ignore_header X-Bogosity
# bayes_ignore_header X-Spam-Flag
# bayes_ignore_header X-Spam-Status

# dcc

use_dcc 1

dcc_path /usr/bin/dccproc

dcc_add_header 1

dcc_dccifd_path /usr/sbin/dccifd



#pyzor

use_pyzor 1

pyzor_path /usr/bin/pyzor

pyzor_add_header 1



#razor

use_razor2 1

razor_config /etc/razor/razor-agent.conf



#bayes

use_bayes 1

use_bayes_rules 1

bayes_auto_learn 1

bayes_path /var/lib/amavis/.spamassassin/bayes

volksman 22nd October 2007 21:14

An additional question. I want SPAM filtered e-mail to be delivered to my mailbox for further inspection. I belive I need to add something like:

$spam_quarantine_to = "spam-quarantine\@$mydomain";

to my conf but I'm confused on where. Do I add that to /etc/amavis/conf.d/20-debian_defaults?

falko 23rd October 2007 19:02

Not sure why you get the DCC/Pyzor errors... Are DCC and PYzor installed? Any other errors in your logs?
Quote:

Originally Posted by volksman
Do I add that to /etc/amavis/conf.d/20-debian_defaults?

Yes, I'd try it in that file.

volksman 23rd October 2007 19:17

DCC/Pyzor are both installed and in the locations defined in the config. The server has been quite good at catching spam too so it seems they are working. The only indication they aren't is from sa-learn debug dump. No other messages in any logs indicating a problem. Weird....

Thanks for the help Falko...!

tiscarabee 30th January 2008 11:53

Hi!
Volksman,i've the same problem than you... Do you clear it ? The answer interest me...
For the rest, very good howto for me.
Thank's !


***********

10 minutes later...
I found an answer seems to kill errors when reloading spamassassin... An answer of falko here :
http://www.howtoforge.org/forums/showthread.php?t=18041
resending here :
http://www.howtoforge.com/virtual-us...ubuntu-7.10-p4

a detail for howto, thinking to enabled spamassassin in /etc/defaults/spamassassin...

olé!


All times are GMT +2. The time now is 09:27.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.