|
Home > Archive > Unix questions > September 2005 > Procmail Question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Lekeas GK 2005-09-22, 7:50 am |
| Hi All,
I would like to know how do you tell procmail to deliver mail from certain
people to the mailbox - on our server, there is a spam detection mechanism
installed as well and messages from certain senders are classified as
spam.
I tried the following:
:0
* ^FROM.(test@test.com)
$MAILDIR
with no luck. Any suggestions?
I look forward to hearing from you soon.
Thanks in advance.
George
| |
| Philip Paeps 2005-09-22, 7:50 am |
| Lekeas GK <cj571@soi.city.ac.uk> wrote:
> I would like to know how do you tell procmail to deliver mail from certain
> people to the mailbox - on our server, there is a spam detection mechanism
> installed as well and messages from certain senders are classified as spam.
Something like this maybe:
:0:
* ? formail -x"From:" | fgrep -is -f $SPAMLIST
$MAILDIR
Where $SPAMLIST is the name of a file that contains a list of addresses (one
per line) that will go to the Maildir.
> I tried the following:
>
>:0
> * ^FROM.(test@test.com)
> $MAILDIR
And why do you think that should work? :-)
- Philip
--
Philip Paeps Please don't email any replies
philip@paeps.cx I follow the newsgroup.
BOFH Excuse #116:
the real ttys became pseudo ttys and vice-versa.
| |
| Lekeas GK 2005-09-22, 7:50 am |
|
>From: Philip Paeps <philip+usenet@paeps.cx>
>Date: 22 Sep 2005 11:51:50 GMT
>Subject: Re: Procmail Question
>
>Lekeas GK <cj571@soi.city.ac.uk> wrote:
>
>Something like this maybe:
>
>:0:
>* ? formail -x"From:" | fgrep -is -f $SPAMLIST
>$MAILDIR
Thanks, I will try it and let you know if it worked.
>
>Where $SPAMLIST is the name of a file that contains a list of addresses (one
>per line) that will go to the Maildir.
>
Well, that is telling procmail that everything from the address
test@test.com should go into the default, mailbox - isn't it?[vbcol=seagreen]
>
>And why do you think that should work? :-)
>
> - Philip
>
>--
>Philip Paeps Please don't email any replies
>philip@paeps.cx I follow the newsgroup.
>
> BOFH Excuse #116:
> the real ttys became pseudo ttys and vice-versa.
>
| |
| Alan Connor 2005-09-22, 7:50 am |
| On comp.unix.questions, in
<Pine.GSO.4.58.0509221244070.13683@vega.soi.city.ac.uk>, "Lekeas
GK" wrote:
> Hi All,
>
> I would like to know how do you tell procmail to deliver mail
> from certain people to the mailbox - on our server, there is a
> spam detection mechanism installed as well and messages from
> certain senders are classified as spam.
>
> I tried the following:
>
>:0
> * ^From.*(test@test.com)
> $MAILDIR
>
Depends on how your spam detection mechanism works. If it marks
the spam with a certain header, then:
#if you use spamassassin:
:0 f # filter the mail through:
| /usr/bin/spamassassin -options
:0
* ^Spam-Status: [5-9][0-5]
# for example
spam #relative to $MAILDIR
:0 # your blocklist
* ^From.*badboy@foo\.com|\
badgirl@foo\.net|\
badhomosexual@foo\.org
/dev/null # to really dump their mails
# (or Philip's suggestion, which is better if the list is
#+ a long one and needs frequent updating)
:0
* ^From.*test@test\.com #this being mail you want to get
mailbox
That's assuming your are using mbox format
mailboxes.
> with no luck. Any suggestions?
>
> I look forward to hearing from you soon.
>
> Thanks in advance.
>
> George
HTH,
AC
--
Homepage: http://home.earthlink.net/~alanconnor/
Fanclub: http://www.pearlgates.net/nanae/kooks/alanconnor.shtml
| |
| Lekeas GK 2005-09-22, 9:01 pm |
|
"Alan Connor" <i3x9mdw@j9n35c.invalid> wrote in message
news:slrndj58i4.4md.i3x9mdw@b29x3m.invalid...
> On comp.unix.questions, in
> <Pine.GSO.4.58.0509221244070.13683@vega.soi.city.ac.uk>, "Lekeas
> GK" wrote:
>
>
>
> Depends on how your spam detection mechanism works. If it marks
> the spam with a certain header, then:
>
> #if you use spamassassin:
>
> :0 f # filter the mail through:
> | /usr/bin/spamassassin -options
>
> :0
> * ^Spam-Status: [5-9][0-5]
> # for example
> spam #relative to $MAILDIR
>
> :0 # your blocklist
> * ^From.*badboy@foo\.com|\
> badgirl@foo\.net|\
> badhomosexual@foo\.org
> /dev/null # to really dump their mails
>
> # (or Philip's suggestion, which is better if the list is
> #+ a long one and needs frequent updating)
>
> :0
> * ^From.*test@test\.com #this being mail you want to get
> mailbox
>
> That's assuming your are using mbox format
> mailboxes.
The last one did not work. I assume it is an mbox format mailbox, as it runs
on a Unix IMAP server.
>
>
>
> HTH,
>
> AC
>
> --
> Homepage: http://home.earthlink.net/~alanconnor/
> Fanclub: http://www.pearlgates.net/nanae/kooks/alanconnor.shtml
| |
| Alan Connor 2005-09-22, 9:01 pm |
| On comp.unix.questions, in <dguhmf$icg$1@canard.ulcc.ac.uk>,
"Lekeas GK" wrote:
<snip>
>
> The last one did not work. I assume it is an mbox format
> mailbox, as it runs on a Unix IMAP server.
>
IMAP usually uses maildir format:
:0
* ^From...
mailbox/
But "spam" shouldn't have worked either.
man procmail procmailrc procmailex <-- examples
http://www.uwasa.fi/~ts/info/proctips.html
AC
--
"Outside of a dog, a book is probably man's best friend;
inside of a dog, it's too dark to read."
--Groucho
| |
| Lekeas GK 2005-09-23, 5:55 pm |
|
"Alan Connor" <i3x9mdw@j9n35c.invalid> wrote in message
news:slrndj63qq.18n.i3x9mdw@b29x3m.invalid...
> On comp.unix.questions, in <dguhmf$icg$1@canard.ulcc.ac.uk>,
> "Lekeas GK" wrote:
>
> <snip>
>
>
> IMAP usually uses maildir format:
>
> :0
> * ^From...
> mailbox/
This would only deliver mail to a folder called mailbox under mail/. I am
still trying to figure out how to get it to work.
>
> But "spam" shouldn't have worked either.
>
> man procmail procmailrc procmailex <-- examples
>
> http://www.uwasa.fi/~ts/info/proctips.html
>
>
> AC
>
> --
> "Outside of a dog, a book is probably man's best friend;
> inside of a dog, it's too dark to read."
> --Groucho
|
|
|
|
|