hello
since plesk9 and 4psa spamguardian spamguardian runs in another mode and i dont have the option to move spam tegged mails to a subfolder.
its possible to do that with qmail-scanner or other rpms on asl easy for every user on the server?
thanks
zeki
move spam to imap subfolder
Re: move spam to imap subfolder
http://forum.parallels.com/showthread.php?t=85449 might do the trick...
-
- Atomicorp Staff - Site Admin
- Posts: 8355
- Joined: Wed Dec 31, 1969 8:00 pm
- Location: earth
- Contact:
Re: move spam to imap subfolder
An addition to that thread, this is how I do it with mailfilter instead of procmail:
cat .qmail
| true
|/usr/bin/maildrop .mailfilter
cat .mailfilter
if ( /^Subject:.*\*\*\*\*SPAM\*\*\*\*/ )
{
to ./Maildir/.Spam/
}
cat .qmail
| true
|/usr/bin/maildrop .mailfilter
cat .mailfilter
if ( /^Subject:.*\*\*\*\*SPAM\*\*\*\*/ )
{
to ./Maildir/.Spam/
}
Re: move spam to imap subfolder
scott wrote:An addition to that thread, this is how I do it with mailfilter instead of procmail:
cat .qmail
| true
|/usr/bin/maildrop .mailfilter
cat .mailfilter
if ( /^Subject:.*\*\*\*\*SPAM\*\*\*\*/ )
{
to ./Maildir/.Spam/
}
Hi,
I have tried exactly this but when I modify the 2 files mails stops being delivered to my Inbox, or Spam folder. I am not sure what I am doing wrong... Doesn't anyone know where I can look to find out what is going wrong?
If I put the contects of .qmail back to:
| true
| /usr/bin/deliverquota ./Maildir
Everything works fine (except the spam is not being filtered).
Re: move spam to imap subfolder
Make sure that the files are readable by the Plesk mail user. I think it's "popuser"...
Re: move spam to imap subfolder
Also make sure you have the maildrop rpm installed!
In case it helps anyone:
The contents of .qmail should be as follows:
| true
|/usr/bin/maildrop .mailfilter
This says when you get incoming mail, run maildrop and look at the commands in .mailfilter
The contents of .mailfilter should look something like this:
if ( /^Subject:.*\*\*\*\*SPAM\*\*\*\*/ )
{
to ./Maildir/.Spam/
}
Except 4psa SpamGuardian looks at a folder called junk_learn, not Spam.
So you really need it to look like this:
if ( /^Subject:.*\*\*\*\*SPAM\*\*\*\*/ )
{
to ./Maildir/.junk_learn/
}
You also need to make sure that the Subject line matches what you have set in SpamGuardian. Remember that the if () line is a regular expression. In the example above, it is expecting FOUR "*"s. If you have set it differently, you'll need to modify that.
And just as biggles says, you need the files to be popuser.popuser and definitely not root.root.
Faris.
In case it helps anyone:
The contents of .qmail should be as follows:
| true
|/usr/bin/maildrop .mailfilter
This says when you get incoming mail, run maildrop and look at the commands in .mailfilter
The contents of .mailfilter should look something like this:
if ( /^Subject:.*\*\*\*\*SPAM\*\*\*\*/ )
{
to ./Maildir/.Spam/
}
Except 4psa SpamGuardian looks at a folder called junk_learn, not Spam.
So you really need it to look like this:
if ( /^Subject:.*\*\*\*\*SPAM\*\*\*\*/ )
{
to ./Maildir/.junk_learn/
}
You also need to make sure that the Subject line matches what you have set in SpamGuardian. Remember that the if () line is a regular expression. In the example above, it is expecting FOUR "*"s. If you have set it differently, you'll need to modify that.
And just as biggles says, you need the files to be popuser.popuser and definitely not root.root.
Faris.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
Re: move spam to imap subfolder
I'm definitely doing something wrong .
Maildrop is installed:
# yum list maildrop
fedora 100% |=========================| 2.1 kB 00:00
atomic 100% |=========================| 951 B 00:00
primary.xml.gz 100% |=========================| 136 kB 00:00
atomic : ################################################## 374/374
freshrpms 100% |=========================| 2.1 kB 00:00
updates 100% |=========================| 2.3 kB 00:00
Installed Packages
maildrop.i386 2.0.4-7.fc7.art installed
***
The two files are in the correct place with the correct owner/permissions:
-rw------- 1 popuser popuser 53 may 3 18:11 .mailfilter
-rw------- 1 popuser popuser 41 may 3 18:16 .qmail
***
Subject line of typical spam message:
****SPAM**** HIGH * Acai Diet, lose weight without gadgets or joining expensive programs
***
Contents of .mailfilter:
if ( /^Subject:.*\*\*\*\*SPAM\*\*\*\*/ )
{
to ./Maildir/.Spam/
}
***
Contents of .qmail:
| true
|/usr/bin/maildrop .mailfilter
***
(even tried it with the space after the second "|", neither worked)
| true
| /usr/bin/maildrop .mailfilter
***
If this is set up, when I send an email to myself it never gets delivered. If the .qmail file is like this:
| true
| /usr/bin/deliverquota ./Maildir
all mail goes straight to my inbox (spam included).
Anyone know what logs I can look at to see why maildrop isn't delivering the mail as expected?
Maildrop is installed:
# yum list maildrop
fedora 100% |=========================| 2.1 kB 00:00
atomic 100% |=========================| 951 B 00:00
primary.xml.gz 100% |=========================| 136 kB 00:00
atomic : ################################################## 374/374
freshrpms 100% |=========================| 2.1 kB 00:00
updates 100% |=========================| 2.3 kB 00:00
Installed Packages
maildrop.i386 2.0.4-7.fc7.art installed
***
The two files are in the correct place with the correct owner/permissions:
-rw------- 1 popuser popuser 53 may 3 18:11 .mailfilter
-rw------- 1 popuser popuser 41 may 3 18:16 .qmail
***
Subject line of typical spam message:
****SPAM**** HIGH * Acai Diet, lose weight without gadgets or joining expensive programs
***
Contents of .mailfilter:
if ( /^Subject:.*\*\*\*\*SPAM\*\*\*\*/ )
{
to ./Maildir/.Spam/
}
***
Contents of .qmail:
| true
|/usr/bin/maildrop .mailfilter
***
(even tried it with the space after the second "|", neither worked)
| true
| /usr/bin/maildrop .mailfilter
***
If this is set up, when I send an email to myself it never gets delivered. If the .qmail file is like this:
| true
| /usr/bin/deliverquota ./Maildir
all mail goes straight to my inbox (spam included).
Anyone know what logs I can look at to see why maildrop isn't delivering the mail as expected?