Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
qmail + spamassassin + maildrop...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Kulfaangaren!
Apprentice
Apprentice


Joined: 11 Jan 2003
Posts: 176
Location: Borås, Sweden

PostPosted: Mon Apr 07, 2003 4:36 am    Post subject: qmail + spamassassin + maildrop... Reply with quote

...does anyone have it working ?
I changed my $HOME/.qmail and wrote a $HOME/.mailfilter and it works.....if the only thing I have in it is 'to $DEFAULT', as soon as I use anything else for example 'logfile $HOME/maildrop.log' everything stops working and the mails remains in the qmail in-queue.
It is the same when I try to use the xfilter cmd to filter the mail through spamc...everything grinds to a halt.

I would very much appreciate if someone could point me in the right direction or even solve the mystery for me :) SInce I can't even add the logfile cmd I can't see what happens that way either :(

.qmail file:
Code:
| /usr/bin/maildrop -d user1 /home/user1/.mailfilter


.mailfilter file:
Code:
##############################
# Variable definitions.
#
DEFAULT="${HOME}/.maildir/"
MAILDIR="${DEFAULT}"

JUNKMAIL="${DEFAULT}.Spam/"

#logfile /home/user1/maildrop.log

#
##############################
# Spam filter.
#
#exception {
#       xfilter "/usr/bin/spamc -f"
#}

#if ( /^X-Spam-Status: *Yes/ ) {
#       to $JUNKMAIL
#}

#if ( /^X-Spam-Flag: *Yes/ ) {
#        to $JUNKMAIL
#}

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

to $DEFAULT


// Fredrik
Back to top
View user's profile Send private message
indros
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2002
Posts: 139

PostPosted: Thu May 08, 2003 3:57 pm    Post subject: Reply with quote

Have you ever solved this issue? I am having the same issue, and am pulling my hair out.
Back to top
View user's profile Send private message
Kulfaangaren!
Apprentice
Apprentice


Joined: 11 Jan 2003
Posts: 176
Location: Borås, Sweden

PostPosted: Thu May 08, 2003 6:15 pm    Post subject: Reply with quote

indros wrote:
Have you ever solved this issue? I am having the same issue, and am pulling my hair out.


Sorry no...noone seemed to be able to help.
I'm contemplating writing my own filtering sotware :cry:
procmail is a bitch and I can't get it to work and maildrop doesn't work at all!
Back to top
View user's profile Send private message
Praxxus
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 193
Location: Indiana, US

PostPosted: Thu May 08, 2003 8:07 pm    Post subject: Reply with quote

Well, I'm not using maildirs, but here's a snippet of my .mailfilter file. Note that maildrop is really bitchy about spaces & blank lines:

Code:
[ed@mail ~]$ cat .mailfilter
if (/^X-Spam-Status:.Yes,*/)
    to mail/SPAM

if (/^Subject:.*failure.notice.*/)
    to "mail/Failure Notices"

if (/^From:.*System.Anti-Virus.Administrator.*/)
    to "mail/Virus Warnings"

if (/^Subject:.*\[(u|U)sers\].*/)
    to "mail/FreeSWAN Users"
else
    to .mbox


You can run maildrop manually, in verbose mode, to debug it:

1) create a bogus e-mail message in a file (named foo in this example):
Code:

From:  luser@luserland.com
To:  you@your.maildrophost.com
Subject:  Fooooooooo!
Date: Thu, 08 May 2003 11:08:21 -0800


This is stupid.


2) send it through maildrop (assuming you have a .mailfilter file)
Code:

cat foo | maildrop -V 3


"-V 3" is the 'verbose level.' 3 looks pretty good, but I know it goes at least as high as 9.
_________________
My glaucoma just got worse!
Back to top
View user's profile Send private message
Kulfaangaren!
Apprentice
Apprentice


Joined: 11 Jan 2003
Posts: 176
Location: Borås, Sweden

PostPosted: Fri May 09, 2003 1:27 am    Post subject: Re: spamassassin + maildrop + ... Reply with quote

Thanks...i'll try it tonight, right now I need to get some sleep before I have to go to work at 7 (it's 3:30am now :)
Back to top
View user's profile Send private message
indros
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2002
Posts: 139

PostPosted: Fri May 09, 2003 2:04 pm    Post subject: Reply with quote

Thanks for the tip. It now seems to be working.

As for my .qmail file, it simply contains:

Code:
| maildrop
Back to top
View user's profile Send private message
Kulfaangaren!
Apprentice
Apprentice


Joined: 11 Jan 2003
Posts: 176
Location: Borås, Sweden

PostPosted: Wed May 14, 2003 8:20 am    Post subject: Reply with quote

Soo...there...now I have tried it and been very conservative with spaces and **** it ! It WORKS ! :)

Seems the problem with my .mailfilter was the use of {'s on the same line as the if's, for example:

Code:
if (/^X-Spam-Status:.*Yes/) {


...when it should have been:

Code:
if (/^X-Spam-Status:.*Yes/)
{
   to $DEFAULT
}


Thanks for the help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum