LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 02-12-2008, 02:29 AM   #1
rcase5
Member
 
Registered: Apr 2004
Distribution: Fedora & Debian
Posts: 38
Thanked: 0
Unhappy Qmail + Maildrop spam filtering with no vpopmail


[Log in to get rid of this advertisement]
Hi all,

I just recently completed an upgrade of my mail system. The system was just a plain qmail server, and it worked pretty well except it had no spam filtering; something many of my clients were clamoring for.

With the upgrade, I now have SpamAssassin and ClamAV. I'm very happy with the results, but I would like to have the server actually filter the spam, not just identify and brand it. In fact, one of my clients using SquirrelMail exclusively, so server-side filtering is really a must.

For the upgrade, I followed the QmailRocks formula for the most part. But during the upgrade, I discovered that vpopmail would have required that the users that use an MUA to change the way they log into their system. This was a headache I didn't want to deal with. Also, vpopmail requires that all mail be stored in one spot on my system instead of in the home directories of my users, which is the way my system has always worked. There are also some other reasons why I prefer mail be stored in the users's home directories, some logistical and others having to do with my comfort zone. So I excluded vpopmail from my configuration. It took some doing, but it does work!

Now I need to figure out the filtering. I've tried to configure maildrop to take all messages identified as SPAM into a folder called "SPAM". But everytime I try to put things in place, I don't get any messages at all. I take out the changes, and I get all of the message (in the INBOX, of course).

Here are the key files:

/etc/maildroprc:
Code:
import SENDER
DEFAULT=$HOME/Maildir/
~user/.qmail:
Code:
|preline /usr/local/bin/maildrop -d $USER ./.mailfilter
~user/.mailfilter
Code:
if ( /^Subject: :SPAM:/)
{
	to "$HOME/Maildir/.SPAM"
}
In the 'to "$HOME/Maildir/.SPAM"' line, I've also tried the following:
Code:
        to "$MAILDIR/.SPAM"
        to "Maildir/.SPAM"
        to "Mail/SPAM"
All to no avail.

Every solution that I've found that remotely resembles the QMR solution involves vpopmail. I DO NOT WANT TO USE VPOPMAIL! I'm hoping someone else has done what I'm attempting and can give me a few pointers. I don't understand why this is not working. Anybody have any ideas?

Thanks in advance,

Robert...
rcase5 is offline  
Tag This Post
Reply With Quote
Old 02-14-2008, 04:04 PM   #2
roreilly
Member
 
Registered: Aug 2006
Posts: 40
Thanked: 0
Hi Robert,

I use the qmr install myself, but I use procmail to filter & move spam.

Here's an example of my setup:

my .qmail:

| /usr/bin/procmail -m /home/vpopmail/domains/dna13.com/roreilly/.procmailrc


And the relevant section of my .procmailrc:

Comments at the end of lines are for you, not part of my script.



# this recipe moves all spam that needs to be learned
# by spamassassin back into the spam monitoring folder
#

:0
* ^Subject:.*SPAM
{
foldername=SPAM

:0c
.$foldername/ # stores in .$foldername/new/

:0
* LASTFOLDER ?? /\/[^/]+$
{ tail=$MATCH }

TRAP="mv $LASTFOLDER .$foldername/cur/$tail:2,S"

HOST
}


:0:
*
$MAILDIR/new

# EOF

What happens here is that any messages with the subject line SPAM get moved into the spam folder designated, and marked as read (I don't bother checking the spam folder very often)

Any message that should be delivered is put in my inbox.

Hope this helps.

R.
roreilly is offline  
Tag This Post ,
Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
qmail/vpopmail not putting mails in /home/vpopmail/domain/$USER/Maildir kikola Slackware 0 10-10-2006 09:52 AM
trouble filtering mail with maildrop phil.d.g Linux - General 1 04-26-2005 04:18 PM
Spam Filtering in Qmail Joey.Dale Linux - Software 5 12-05-2004 02:29 PM
filtering spam in Qmail? IceNineJon Linux - Software 2 07-05-2003 03:35 PM
Sendmail Spam filtering and Virus filtering MrJoshua Linux - General 2 04-03-2003 11:12 AM


All times are GMT -5. The time now is 12:54 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration