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
0
votes
2 answers

procmail disregards /etc/group?

sample procmailrc: SHELL=/bin/bash LOGFILE=$HOME/procmail.log VERBOSE=yes :0 * ^Subject: envdump please$ { LOG="`id`" :0 /dev/null } /etc/group file contains (note the other usernames are vain attempts to make this…
zzzeek
  • 72,307
  • 23
  • 193
  • 185
0
votes
2 answers

How to forward spam to SpamCop.net with procmail

From https://de.wikipedia.org/wiki/Procmail :0fw | /usr/bin/spamassassin :0H * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\* /dev/null :0H: * ^X-Spam-Status: Yes ./Spam I would like to complement the move to /dev/null with a forward to…
0
votes
1 answer

having issues downloading xls file using procmail

Any ideas why my xls attachment files aren't being downloaded? thanks This is a perl wrapper creating the procmailrc file for me. my $procmailrc =<
Gordon
  • 1,633
  • 3
  • 26
  • 45
0
votes
1 answer

How to prevent procmail from crashing the platform and make it run one process at a time?

I have the problem that I capture emails and they arrive in masses, the issue is that every time they arrive in masses the platform crashes, the question is how to make it go running the process 1 at a time, is it possible? because currently I…
alex spencer
  • 177
  • 1
  • 12
0
votes
1 answer

Procmail rule to change subject and forward a copy

I have an existing procmail recipe to forward a copy to my gmail account that is working well: :0c ! myAddress@gmail.com I have a second rule that is also working well (in limited testing) to prefix the subject with [OLD DOMAIN]: :0fwh *…
dawydiuk
  • 17
  • 3
0
votes
2 answers

Procmail recipe, pipe to Java stdin

I'm trying to run some custom parsing on incoming mail using procmail, and would like to call a java program to read in the headers and body of the message using the |pipe to stdin. There are plenty of examples of having your mail filtered using…
0
votes
1 answer

How to set variable in procmail as To email address

I have a Procmail rule that uses formail to parse the To: email header to determine the email address the email was sent to: TO_=`formail -XTo:` This isn't working, as I'd like ${TO_} to evaluate to "address@domain.com", but what I'm getting is…
dawydiuk
  • 17
  • 3
0
votes
1 answer

Procmail filtering by Date: field

I need to move away mails older than given time - let it be 24h = 86400s. I use old good procmail for multiple other purposes on that machine, so I wanted to use is as well for this purpose. It also behaves well under the load (~1 000 000 small…
0
votes
1 answer

Send a MIME file

i need to do some operation over each email i received on a specific adress, first a i made a rule in procmail and pipe the mail in a bash file | mybash.sh In the bash file i save the mail in a tmp folder, it seem's to be a MIME file that i can open…
Clem
  • 1
  • 1
0
votes
0 answers

procmail giving "no match" to every recipe

I've been using fetchmail and procmail on an old Red Hat server for years to retrieve emails from a POP account and dispatch them (to different recipients) on MS Exchange. It's worked great for many years but now that server is failing and I want to…
jgarbi
  • 1
0
votes
1 answer

How to correctly get body of email into scalar variable with procmail

I have the below procmail recipe that for years has faithfully worked (passed senders email and subject) to the perl script and saved the attachments. FROM="" :0 * ^FROM:.* * ^From:[ ]*\/[^ ].* { FROM=$MATCH } #grab the…
gatorreina
  • 864
  • 5
  • 14
0
votes
1 answer

Using Procmail/Formail/Regex correct an error in email headers

I am trying to remove an unwanted character > appearing in the "From " line in the headers of some old archived emails such as ">From" and am unable to do so by rewriting the From line using the Procmail recipe Error reproduced: >From…
0
votes
1 answer

procmail: getting procmail to exclude hostname while saving Maildir format messages

How do I get procmail to save messages in my Maildir folder, but not include the hostname in the file (message name)? I get the following message names in my new/ sub-folder: 1464003587.H805375P95754.gator3018.hostgator.com, S=20238_2 I just want…
user3236841
  • 1,088
  • 1
  • 15
  • 39
0
votes
1 answer

Mail attachment killfile - how to blacklist signature attachments by filename

How can one best implement a minimal serverside mail filtering system which does one thing: remove signature attachments by name. Some colleagues' every email contains an inline embedded "signature.gif" or "signature-nn.gif" (where nn appears to…
Chris Burgess
  • 3,551
  • 3
  • 29
  • 42
0
votes
1 answer

How can I log URLs that come in my incoming mailspool?

I have a mailspool on a UNIX system ... so, /var/mail/username ... and it is in mbox format. Once the email is stored in mbox format, the URLs that come in emails are chopped into 40 character lines with '=' or '=3D' separators, etc., and are just…
user227963
  • 221
  • 2
  • 6