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
2
votes
1 answer

fetchmail/procmailrc filter by date

I have fetchmail grab my email from a pop account and send it to procmail. I have 'keep' set in my fetchmailrc file because i also use the email for outlook and i cant have fetchmail taking all my emails. My problem is i want to download just todays…
Bbbh
  • 321
  • 7
  • 20
2
votes
1 answer

Check whether at least two out of three procmail conditions are true

How do I check in procmail whether at least two out of three spam filters see the mail as spam? I don't want to have duplicate code due to multiple checks on the spam headers. # Invoke bogofilter :0 fw | bogofilter -C -d…
duxsco
  • 331
  • 2
  • 17
2
votes
2 answers

Saving HTML email with inline images to PS or PDF with Procmail

I need a little advice/push in the right direction. I have written some small scripts that takes an incoming HTML email, converts it to PostScript and then sends it to a designated printer via CUPS. Printers are based on the recipient of the email.…
Soddengecko
  • 65
  • 1
  • 10
2
votes
1 answer

procmail lockfile utility and NFS

Has anyone used the lockfile utility that ships with procmail in conjunction with NFS mounted directories? The lockfile man page states that "Lockfile is NFS-resistant and eight-bit clean."
Rob Wells
  • 36,220
  • 13
  • 81
  • 146
2
votes
3 answers

Process mail bursts one at a time

we receive bursts of mails from our IDS that we are postprocessing to create incident reports, forward them to request tracker, etc. Right now, we have one script that does all the postprocessing that is called by procmail according to rules in…
Drasha
  • 37
  • 4
2
votes
1 answer

Using procmail to forward inline

I would like to use procmail to forward a message to another email address. Both the headers and body of the incoming message should be in the body of the outgoing message (inline forwarding). Example incoming message: From: outside@example.com To:…
tater
  • 171
  • 8
2
votes
1 answer

redirecting email text from procmail into bash script

I am trying to redirect emails that match a particular pattern to a shell script which will create files containing the texts, with datestamped filenames. First, here is the routine from .procmailrc that hands the emails off to the script: :0c: *…
Glenn Becker
  • 21
  • 1
  • 3
2
votes
1 answer

procmail not piping e-mail content to a file

I have a postfix server and procmail installed and working. The problem is when I try to output the content of an e-mail to a file. I have the following script: /var/log/user1/fooscript.sh #!/bin/bash echo "Trying to get e-mail" > success.txt echo…
Stasv
  • 115
  • 1
  • 10
2
votes
2 answers

Transactional Email and Meteor

I have an app written in PHP that I am porting to Meteor. This question is really two parts: 1) Currently, my server forwards all email to a PHP script that parses out the response and inserts it into a database, allowing users to respond to message…
wdhilliard
  • 135
  • 11
2
votes
1 answer

Pipe email from procmail to python script that parses body and saves as text file

I'm building a data loggerr and I've spent a lot of time trying to get this right, every forum takes me in a different direction and I think a weekend of googling warrants submitting a question here. I'm running Ubuntu 12.10, I use fetchmail to…
user2037800
  • 21
  • 1
  • 2
2
votes
1 answer

Moving IMAP mail to Gmail and retaining correct times

I am trying to use gmail to manage mail from an email account I have that is imap only. My strategy was to use (getmail to retrieve mail from the server and pass it through to procmail for forwarding. This almost works. It successfully retrieves…
CJ F
  • 835
  • 2
  • 8
  • 22
2
votes
1 answer

Filter email by containing my name in "To" using procmail

Using procmail, I want to move any incoming mail that does not contain my name ("John Doe") in the "To" field to the "Junk" folder. However, the following rule does not seem to have any effect, even though I have tested the regular expression…
Donald T
  • 10,234
  • 17
  • 63
  • 91
2
votes
1 answer

How to setup procmail to send all incoming mail to two, three or more scripts and leave a copy in mailbox?

How can I force .procmailrc for each incoming email: leave this email in my mailbox as if nothing happened. Give mail to script1.sh through stdin Give mail to script2.sh through stdin Give mail to script3.sh through stdin Give mail to script4.sh…
Stepan Yakovenko
  • 8,670
  • 28
  • 113
  • 206
1
vote
1 answer

converting base64 encoded mail subject to text

Set out to write a simple procmail recipie that would forward the mail to me if it found the text "Unprovisioned" in the subject. :0: * ^Subject:.*Unprovisioned.* ! me@test.com Unfortunately the subject field in the mail message coming from the…
Bharath K
  • 2,109
  • 1
  • 14
  • 18
1
vote
1 answer

Other than procmail what Unix tools can "read" an email via pipe?

Other than procmail what Unix tools can "read" an email via pipe? I have a client that wants to develop an app on a university managed (read squeamish IT dept) server. Procmail is not installed and neither is PHP's IMAP extension. What other…
jerrygarciuh
  • 21,158
  • 26
  • 82
  • 139
1
2
3
11 12