Procmail Question
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix questions > Procmail Question




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Procmail Question  
Lekeas GK


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-22-05 12:50 PM

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





[ Post a follow-up to this message ]



    Re: Procmail Question  
Philip Paeps


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-22-05 12:50 PM

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.[/vbcol
]

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.
[vbcol=seagreen]
> 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.





[ Post a follow-up to this message ]



    Re: Procmail Question  
Lekeas GK


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-22-05 12:50 PM


>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 (on
e
>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.
>





[ Post a follow-up to this message ]



    Re: Procmail Question  
Alan Connor


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-22-05 12:50 PM

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





[ Post a follow-up to this message ]



    Re: Procmail Question  
Lekeas GK


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-05 02:01 AM


"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







[ Post a follow-up to this message ]



    Re: Procmail Question  
Alan Connor


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-05 02:01 AM

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





[ Post a follow-up to this message ]



    Re: Procmail Question  
Lekeas GK


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-05 10: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







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:53 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register