View Full Version : SPAM folder
grungy
25th June 2009, 11:46
Some of the emails that were sent to me are marked as spam and not delivered. How can I tel spamassasin to put the mails on SPAM folder or to automatically create the spam folder if it does not exist?
TNX
till
25th June 2009, 14:35
ISPConfig uses amavisd as daemon and not spamassassin directly to scan for spam. If you want to filter emails, use the server side filters of the mail accounts.
grungy
26th June 2009, 22:07
Tnx for the reply.
I noticed virus and spam mails get quarantined in /var/lib/amavis/virusmails
My question was regarding the quarantine emails. Does amavis support user level quarantine folders? So that each user has it's own virusmail folder.
till
27th June 2009, 12:11
Amavis supports also user level quarantining. For details please atke a look at the amavisd documentation, you find it inside the amavisd-new tar.gz that you can download from the website of the amavisd-new project.
grungy
2nd July 2009, 20:54
Having trouble finding a howto on user level quarantining, can you provide with some links?
Mark_NL
3rd July 2009, 09:19
i was also looking for something like that, but haven't found a thing.
i did however found a web based tool to read the quarantine folder, pretty neat ..
http://sourceforge.net/projects/mailzu/
grungy
3rd July 2009, 09:50
I found a way for mails not to be stored in the quarantine folder but to be sent to a email per domain, which is not useful in my case but it is something.
If one is considering using a quarantine mechanism but wants a per-user (or perhaps per-subdomain) quarantines, this is not such a good idea, because quarantined files are not supposed to be directly visible or handled by recipients: to protect the privacy of the sender, some header pre-processing must be performed on a quarantined file before handing it over to a recipient.
The cleanest way to achieve per-user quarantine which may be directly accessible and/or manipulated by recipients is to turn on adding address extensions, and configure MTA and/or LDA to store such mail wherever necessary, either to a user's dedicated subfolder, or perhaps to some centralized dedicated set of malware mailboxes (per-user or perhaps per-subdomain).
If it is desired to reroute extension-tagged mail to some mailbox away from the usual LDA, the virtual alias mapping by MTA is the tool for the job. With Postfix, a pcre-based virtual map can specify for example:
/^(.*)\+spam@([^@]*)\.example\.com$/ spam-$2-box@example.com
which will collect all spam into one mailbox for each subdomain.
For the Postfix local(8) LDA, a presence of a file $HOME/.forward+spam can redirect mail for user+spam to some dedicated file. For the Postfix virtual(8) LDA, a virtual_mailbox_maps may contain entries like:
user1 mbxfile1
user1+spam mbxspamfile1
user2 mbxfile2
user2+spam mbxspamfile2
There is a script, which I have not tested yet:
split amavis's quarantine folder per domain
#!/bin/sh
QUARANTINE_PATH="/var/amavis/quarantine"
LOG_FILE="/var/log/spam-mapping.log"
PER_USER_QUARANTINE_PATH="/var/amavis/per-domain-quarantine/"
for i in `find $QUARANTINE_PATH -type f | grep "spam-"`
do
ENVELOPE_TO=`zcat "$i" | awk '/^X-Envelope-To: .*/ {print $2}' | head -1`
DOMAIN=`echo $ENVELOPE_TO | awk -F @ '{sub(/</,"")};{sub(/>/,"")};{sub(/,/,"")};{print $2}'`
FILE=`basename $i`
if [ ! -e "${PER_USER_QUARANTINE_PATH}${DOMAIN}" ]; then
mkdir ${PER_USER_QUARANTINE_PATH}${DOMAIN}
fi
if [ ! -e "${PER_USER_QUARANTINE_PATH}${DOMAIN}/${FILE}" ]; then
mv ${i} ${PER_USER_QUARANTINE_PATH}${DOMAIN}/${FILE}
fi
done
http://cms.jezek.ch/blog/archive/2009/01/
This is a cool plugin -Roundcube Amavis Spam Setting Plugin
http://www.chemlab.org/2009/04/22/roundcube-amavis-spam-setting-plugin
http://chemlab.org/wp-content/uploads/2009/04/roundcube_amavis.gif
grungy
3rd July 2009, 10:04
i was also looking for something like that, but haven't found a thing.
i did however found a web based tool to read the quarantine folder, pretty neat ..
http://sourceforge.net/projects/mailzu/
Oh man this program is really cool. Will try it out.
MailZu is a quarantine management interface for amavisd-new
( http://www.ijs.si/software/amavisd/ ).
It provides users and administrators access to email that is suspected to be
spam or contain banned contents and gives users the ability to release, request,
or delete these messages from their quarantine.
Users can access their personal quarantine by authenticating to various
pre-existent backends such as LDAP ( or Active Directory ) or any PHP PEAR
supported database.
Mark_NL
3rd July 2009, 10:24
thanks for the update, i'll have a look into it as well ;)
Nicke
9th February 2010, 14:17
Please tell me how to configure MailZu with ispconfig 3. I cant get it to work.
Thanks!
voltron81
10th February 2010, 12:03
It could be really nice to have this plugin working with roundcube 0.3...
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.