Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Something to the effect of (but I know is probably wrong)
No it isn't wrong. If the destination is the same you can group all sorts of filter criteria, just like you showed.
Alright, I will give that a shot... I didn't realize it was as simple as listing each criteria right under each other like that was ok. My first impression of that is that the filter would be looking for all criteria to be met betwen :0 and /dev/null before it would attempt to place filter it properly.
Alright, I will give that a shot..
If you're going to experiment you best set stuff like VERBOSE=on and LOG=/some/file in your resource file and test it with delivered email. Save this as procmailtest.rc:
Now open up your mailbox in vi or any text editor and cut a single message to file (say procmailtest.msg) to make sure you preserve all headers. Change the "From:" header if necessary. Now run it like this:
Now procmailtest.log and/or procmailtest1.log should show delivery info w/o you fscking up already working email delivery ;-p
the filter would be looking for all criteria to be met betwen :0 and /dev/null before
Procmail also has two often overlooked man pages: procmailrc and procmailex...
I don't recall if I have verbose on or but I didn't turn the log on (Which I should have done)but created a test .procmail file to replace my original (of course after making a backup).
I grouped one of the filters that I know gets used a lot to see how it would work and it didn't work. The messages came to my inbox instead of the mailbox that I had it filtered to. I will give it another shot tomorrow and turn the log on so I can paste log info if its relevant.
I did take another look at google and it looks like procmail uses pipes to separate individual filters that go to the same inbox. Here is the snipet I got from a site:
--------------------
# put any mail from newdream or dreamhost in the folder 'junk'
# (we don't recommend that you actually use this one, of course)
:0
* ^From:.*(newdream\.net|dreamhost\.com)
.junk/
You're right. Filtering using multiple rules depend on the return value of the one before, so if the first one doesn't match then the rest is skipped, so the stringing together (newdream\.net|dreamhost\.com) should work but maybe better use spamassassin.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.