Questions tagged [procmail]

Procmail is a powerful Mail Delivery Agent (MDA) capable of sorting and filtering mail based on rulesets called recipes. It's rather *nix-centric, terse, mature, and proven. However, it is now unmaintained.

Procmail is a versatile mail delivery agent (MDA) for Unix-like systems. If features a simple language for articulating delivery rules (aka recipes) to sort, forward, manipulate, and otherwise process incoming email messages.

Procmail was created in the early 1990s by Stephen R. van den Berg. After his involvement waned, Philip Guenther took over as maintainer, and published some new versions at http://procmail.org/. However, this site is now dead, and as of 2010, Guenther recommends users to switch to alternative tools such as maildrop.

In spite of its age and security issues, Procmail remains popular in some environments.

Resources

172 questions
1
vote
2 answers

Regular expression for strings not containing brackets

I am trying to edit my .procmailrc file to get rid of junk. The account is from the CS departments at my school, all the emails within the department have subjects with brackets in them for instance: [Majors] Some Subject or: [Undergrads] Another…
easyxtarget
  • 95
  • 1
  • 1
  • 10
1
vote
1 answer

Discard kernel-ML patch-mails which are not from me, send to me or as response on my mails?

as the linux kernel mailing list is really noisy, I want to discard all mails which are send to my mailbox from the LKML, but which are not from me, to me or as answer to one of my mails. I do already do some filtering and redirect all patch-mails…
musicmatze
  • 4,124
  • 7
  • 33
  • 48
1
vote
1 answer

How do I specify another procmail script other than .procmailrc?

I am trying to set up two different environments (development and test) on a single machine where I am using fetchmail/procmail. How would I specify a procmail script other than .procmailrc?
GregH
  • 12,278
  • 23
  • 73
  • 109
1
vote
1 answer

How to match any whitespace in body of mail in procmail?

I tried to use such rule: :0 B * Something[[:space:]]+whatever but it doesn't work. When I change [[:space:]] to literal space character: :0 B * Something +whatever it works. It also works in case of: :0 B * Something[ ]+whatever I must be doing…
user80168
1
vote
2 answers

procmail find first 3 upper case chars in subject

I am new to procmail and struggling to understand the syntax. What I want to do is to check the subject line to see if it begins with 3 upper case chars followed by a colon, and if it does, remove the colon from the end and perform and action…
crankshaft
  • 2,607
  • 4
  • 45
  • 77
1
vote
1 answer

How to change ownership of extracted attachments (postfix, procmail, uudeview)?

I have managed to extract all attachments from emails being delivered to a certain email to a public folder on my linux server (using postfix->procmail->uudeview). Unfortunately the files themselves are saved with the permissions restricted to the…
Toffix
  • 51
  • 3
1
vote
1 answer

using sylfilter with procmail

I have been using sylfilter for over a year now (it is available from http://sylpheed.sraoss.jp/sylfilter/) and it works great as a filtering tool (no complaints). However, I have been trying to use procmail with sylfilter, but have been having a…
user3236841
  • 1,088
  • 1
  • 15
  • 39
1
vote
1 answer

How to filter messages in Procmail that have specific words in hyperlinks

Is it possible to create a Regular Expression in Procmail to filter out a link containing certain words? For example, I would like to filter all emails that have a hyperlink with the word "unsubscribe" in it (it may not be the only word though).…
Laurence Cope
  • 403
  • 7
  • 20
1
vote
1 answer

procmal recipe to pass values to my Python script

I have never used procmail before but I believe (from my R&D) that it is likely my best choice to crack my riddle. Our system receives an email, out of which I need 3 values, which are: either a 4-digit or 5-digit integer from the SUBJECT line.…
1
vote
1 answer

Don't forward if from certain address

I have a procmail recipe which stores email and forwards it, after changing a header: :0c ${DEFAULT} :0fhw | formail -i "From: changedemail@address.com" :0 * !^From:.*\ { ! other@recipient.net # That's exclamation…
Maarten
  • 4,643
  • 7
  • 37
  • 51
1
vote
2 answers

How can I send an automated reply to the sender and all recipients with Procmail?

I'd like to create a procmail recipe or Perl or shell script that will send an auto response to the original sender as well as anybody that was copied (either To: or cc:) on the original email. Example: bob@example.com writes an email to…
jchong
1
vote
1 answer

print out variable in procmail

I have a procmail recipe to filter incoming mail such as below: :0 *^Subject:.*(test) * ? egrep -is -f /root/Procmail/whitelist.txt { :0 fwb | formail -I "" :0 myfolder/ } The above recipe function is to filter…
newbie.my
  • 341
  • 2
  • 3
  • 13
1
vote
2 answers

procmail recipe to remove footer

I've encountered some problem when doing the procmail recipe. Here what I have get so far : :0 * ^X-Loop: myemail@gmail\.com /dev/null :0 # filtering email by number 60 * ^Subject:.*(60) { :0c: …
newbie.my
  • 341
  • 2
  • 3
  • 13
0
votes
1 answer

"OR" rules in .procmailrc with body search

According to http://lipas.uwasa.fi/~ts/info/proctips.html#orrules , you can make basic "or" rules in .procmailrc with something like: :0: * ^From:.*reriksso@([-a-z0-9_]+\.)*helsinki\.fi|\ ^From:.*era@iki\.fi ${DEFAULT} Normally, you can make a…
Marquis Wang
  • 10,878
  • 5
  • 30
  • 25
0
votes
2 answers

Put email multiple folder in case of multiple recipients using procmail

I'm going to build an email system at home and I'm subscribed to a lot of mailing list. The emails fetched to my local machine by fetchmail and filtered by procmail. But, there is a situation which is not possible to solve with my current knowledge.…
AndrasCsanyi
  • 3,943
  • 8
  • 45
  • 77