[SOLVED] Need help filtering messages in .procmailrc
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
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.
I need some guidance on setting .procmailrc. I subscribe to the samba maillist, which is prolific. I want to see responses to messages I have submitted (by subject), and have those, and all others directed to a mail folder for archival purposes. I've set up my procmail as shown below where '/var/spool/mail/mfoley' is my personal MBOX mailbox. The problem is, ALL messages go to the archive folder (/user/mfoley/mail/$YEAR/sambaList) and none go to my personal mailbox. What am I doing wrong?
Code:
:0c:
* ^Subject:.*\[Samba\] What does a domain member
! /var/spool/mail/mfoley
:0c:
* ^Subject:.*\[Samba\] How to track attempted breakins
! /var/spool/mail/mfoley
:0c:
* ^Subject:.*\[Samba\] Are some Group Policies broken
! /var/spool/mail/mfoley
:0c:
* ^Subject:.*\[Samba\] How to change Domain password as normal user
! /var/spool/mail/mfoley
:0:
* ^Subject:.*\[Samba\]
/user/mfoley/mail/$YEAR/sambaList
You don't need the "!" in front of the path to the to your mbox:
Code:
:0c:
* ^Subject:.*\[Samba\] What does a domain member
/var/spool/mail/mfoley
:0c:
* ^Subject:.*\[Samba\] How to track attempted breakins
/var/spool/mail/mfoley
:0c:
* ^Subject:.*\[Samba\] Are some Group Policies broken
/var/spool/mail/mfoley
:0c:
* ^Subject:.*\[Samba\] How to change Domain password as normal user
/var/spool/mail/mfoley
:0:
* ^Subject:.*\[Samba\]
/user/mfoley/mail/$YEAR/sambaList
That appears to have worked! Not sure why I had the ! in there in the first place. That character for an action line says to forward to the specified mail addresses, but I've specified my mail folder. Hmmm, if I did specify "! mfoley" as the action line, would it deliver to my system mail folder or would it attempt to re-process through .procmailrc?
That appears to have worked! Not sure why I had the ! in there in the first place. That character for an action line says to forward to the specified mail addresses, but I've specified my mail folder. Hmmm, if I did specify "! mfoley" as the action line, would it deliver to my system mail folder or would it attempt to re-process through .procmailrc?
If you use !mfoley it will deliver it to mfoley.
Now if that .procmailrc recipe is in ~mfoley you're going to have a loop.
If you use !mfoley it will deliver it to mfoley.
Now if that .procmailrc recipe is in ~mfoley you're going to have a loop.
The .procmailrc recipe is in $HOME/mfoley/.procmailrc and mfoley's system mbox file is in /var/spool/mail/mfoley. I think I would have a loop. I'll leave it the way I have it now set from your original suggestion.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.