LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-29-2002, 04:51 AM   #16
xanthium
Member
 
Registered: Apr 2001
Location: Bombay ( INDIA )
Distribution: RedHat 7.x
Posts: 218

Original Poster
Rep: Reputation: 30
procmail wont work with ur settings!


Hi UnSpawn ,

Well with the option that u mentioned .. ie;

SHELL=/bin/sh
DROPPRIVS=yes

Procmail would not deliver messages ... nothing much was displayed in the log file. I guess it has something to do with the shell ( /bin/sh )?

Also could not solve the regex problem with procmail .. stil trying out ur sugesstions.

Regards ,
Xanthium.
 
Old 08-29-2002, 06:30 AM   #17
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Weird. Procmail should drop it's privileges as started by root (is it setuid root?) and use the $USER's shell w/o probs...
I'll try the regex myself and see what comes up.
 
Old 08-29-2002, 07:09 AM   #18
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
ok, this works for me

This direct entered one will do:
:0
* ^Subject:.*credit.*card
$SPAMBOX

---
this filters out my bogus test subjects like
"credit card"
"Get a free credit card"
"Where are my stolen credit card's?"
"cardiology frequent flyer credits for hospitalization on welfare chipcard"
"Cre d it\nca rd scredit\ncard"

and passes tru
"credit to those who deserve credit"
"Credita fornaccio matriculata"
---
* for "Cre d it\nca rd scredit\ncard" to work like it should (echo -e) you should have a multi-line regex, man procmailex for more.
* also I haven't tested caps, if it doesn't work try ".*(c|C)ard"
 
Old 08-29-2002, 08:19 AM   #19
xanthium
Member
 
Registered: Apr 2001
Location: Bombay ( INDIA )
Distribution: RedHat 7.x
Posts: 218

Original Poster
Rep: Reputation: 30
thats the problem

hi UnSpwan ,

The solution u have mentioned is the ONE iam using right now however the trouble is that iam having too long a list of such words ( a lot many porno words and others spam related .. due to certain reasons i cant use spam tools ) so i needed to group together all such words in a single file for easy mgmt !
Any more suggestions ? ( regarding procmail )

am checking out procmailex now ...

Hey thanks for your help and efforts.

Regards ,
Xanthium.
 
Old 08-29-2002, 08:46 AM   #20
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
holy howlin hyena's!

Soz, I totally forgot that you need to match multiline subjects...
Procmail can include other rc files, so if you make one and could try if this works? I know, it ain't a very "elegant" solution wrt mgmnt, but if it works while you sort out how to use egrep and non-fixed regexes...

:0
* ^Subject:.*(credit.*card\
|more.*spam\
|spam\s+me\
|you.ve.*won.\
|winner.)
$SPAMBOX
 
Old 08-29-2002, 10:44 AM   #21
xanthium
Member
 
Registered: Apr 2001
Location: Bombay ( INDIA )
Distribution: RedHat 7.x
Posts: 218

Original Poster
Rep: Reputation: 30
Hi,

He he he .. its definately not what i expected ... but anyway thanks for your efforts.. i will experiment further.

Regards ,
Xanthium
 
Old 08-30-2002, 08:13 AM   #22
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Wild frolickin' wrathfull weasels! Hold on, I'm not done yet :-]

Ok. Here's the procmail rule what I tried:
:0
* ? ( formail -zxSubject: | egrep -i -f $MAILDIR/EGREP )
HIT

These are the contents of $MAILDIR/EGREP:
credit.*(card|free)
free.*(pron)

These are the message subjects:
credit card
Get A Free Credit Card
Where are my stolen credit card's?
credit to those who deserve credit
Credita fornaccio matriculata
cardiology frequent flyer credits for hospitalization on welfare chipcard
Cre d it\nca rd scredit\ncard
it's prone to errors
free pron
Card Credits Here!
Credit on demand for free!
Free bird feeders
Freeware now!

This passed tru:
Subject: credit to those who deserve credit
Subject: Credita fornaccio matriculata
Subject: it's prone to errors
Subject: credit to those who deserve credit
Subject: Freeware now!
Subject: Free bird feeders
Subject: Card Credits Here!

This hits:
Subject: Get A Free Credit Card
Subject: Where are my stolen credit card's?
Subject: credit card
Subject: Credit on demand for free!
Subject: Cre d itnca rd screditncard
Subject: cardiology frequent flyer credits for hospitalization on welfare chip
Subject: free pron

Hmm, maybe I should just redirect to the Procmail tips pointer...
 
Old 08-30-2002, 11:25 PM   #23
xanthium
Member
 
Registered: Apr 2001
Location: Bombay ( INDIA )
Distribution: RedHat 7.x
Posts: 218

Original Poster
Rep: Reputation: 30
Thanks

Hi ,

Hey THANKS a lot .. this SURE helped me a lot.
Certainly what i was looking for.

Just a small suggestions :
Why dont you people have "Hall-Of-Fame" for most valuable suggestions/tips ....it sure would help a lot of people.
It can be on the tune of portico.org except you people yourself decide which suggestion/solution by a reader was a beauty.

Regards ,
Xanthium.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Procmail question satimis Linux - Software 3 09-07-2005 04:18 AM
small question. bruse Linux - Newbie 9 04-11-2005 07:22 AM
Procmail and spamassassin question Liberator Linux - Software 5 08-13-2004 03:24 PM
procmail question jhildebrand Linux - Networking 0 04-17-2003 08:13 AM
Small question Ed-Slack Linux From Scratch 1 01-08-2003 08:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration