View previous topic :: View next topic |
Author |
Message |
Kulfaangaren! Apprentice

Joined: 11 Jan 2003 Posts: 176 Location: Borås, Sweden
|
Posted: Mon Apr 07, 2003 4:36 am Post subject: qmail + spamassassin + maildrop... |
|
|
...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 |
|
 |
indros Tux's lil' helper

Joined: 27 Sep 2002 Posts: 139
|
Posted: Thu May 08, 2003 3:57 pm Post subject: |
|
|
Have you ever solved this issue? I am having the same issue, and am pulling my hair out. |
|
Back to top |
|
 |
Kulfaangaren! Apprentice

Joined: 11 Jan 2003 Posts: 176 Location: Borås, Sweden
|
Posted: Thu May 08, 2003 6:15 pm Post subject: |
|
|
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
procmail is a bitch and I can't get it to work and maildrop doesn't work at all! |
|
Back to top |
|
 |
Praxxus Apprentice


Joined: 26 Nov 2002 Posts: 193 Location: Indiana, US
|
Posted: Thu May 08, 2003 8:07 pm Post subject: |
|
|
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 |
|
 |
Kulfaangaren! Apprentice

Joined: 11 Jan 2003 Posts: 176 Location: Borås, Sweden
|
Posted: Fri May 09, 2003 1:27 am Post subject: Re: spamassassin + maildrop + ... |
|
|
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 |
|
 |
indros Tux's lil' helper

Joined: 27 Sep 2002 Posts: 139
|
Posted: Fri May 09, 2003 2:04 pm Post subject: |
|
|
Thanks for the tip. It now seems to be working.
As for my .qmail file, it simply contains:
|
|
Back to top |
|
 |
Kulfaangaren! Apprentice

Joined: 11 Jan 2003 Posts: 176 Location: Borås, Sweden
|
Posted: Wed May 14, 2003 8:20 am Post subject: |
|
|
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 |
|
 |
|