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

How to make procmail forward and BCC too

I'm trying to forward e-mails matching a certain pattern to a set of addresses, and BCC the same e-mail to some other e-mail addresses. From looking at my procmail log, it appears that all my rules are matching, yet the BCC recipient does not…
Michael
  • 9,060
  • 14
  • 61
  • 123
0
votes
1 answer

Procmail to automatically make new folders to store emails from new senders

I am learning how to use procmail but at this point, I am not even sure it's the right tool for what I am trying to do. So far, I have managed to get fetchmail to retrieve emails from a Google IMAP account and procmail to filter those emails into…
someuser
  • 13
  • 5
0
votes
1 answer

How to use procmail to save email body with email subject as the filename?

I am using procmail to save email body, something like this: :0: tmpProcmail.lock * ^From:.*(SOME EMAIL).* * ^Subject: SOME SUBJECT.* | cat > /SOME DIRECTORY/$(date +\%Y\%m\%d).txt I wonder if I can use the whole subject as my filename instead of…
sxzhangzsx
  • 65
  • 9
0
votes
1 answer

Munpack and Procmail - getting subject line

Im saving attachments in emails in a directory with munpack. This works but poses a problem for my application. The email is generated form a device and it ads its UID to the subject line. I need to somehow get the subject line from the email and…
Harry
  • 13,091
  • 29
  • 107
  • 167
0
votes
2 answers

Get procmail to reply to larger messages

I am trying to reply to messages larger than a certain size then forward to another user. Got this, but nothing happens. Its seem I am only able to add text to the end of the message. :0 * > 1000 { :0 fhw | cat - ; echo "Insert this text at the…
cmdln
  • 77
  • 2
  • 8
0
votes
3 answers

Is procmail chrooted or limited in using linux commands?

im using procmail to forward emails to different folders in my Maildir. I use these two lines to get the FROM and TO from the mail, which works pretty fine. FROM=`formail -x"From:"` TO=`formail -x"To:"` These two commands return the whole line…
NovumCoder
  • 4,349
  • 9
  • 43
  • 58
0
votes
1 answer

file extention filtering does not work in procmail

procmail will not download just .xls, .doc and .docx extentions. every condition i have found either downloads everything or nothing. i am using fedora 14 conditions i have tried that dont download anything are: *^[ ]* name:.*\.(xls|doc|docx) *^…
Bbbh
  • 321
  • 7
  • 20
0
votes
1 answer

Direct email to a local Maildir file without an MTA

I have an application that needs to write emails directly to local imap accounts. No MTA (Postfix,Sendmail etc.) in between so as to keep it simple to maintain, and no MTA vulnerability to worry about ,since there will be around 100K IMAP accounts…
Sharjeel
  • 290
  • 1
  • 7
  • 17
0
votes
1 answer

Procmail recipe returned column name and result

I use procmail to filter email which involves retrieve result from mysql, but Procmail recipe returned column name which I don't want and result. variable result is not declared or used before the line: Here is the line in my procmail: { …
Madz Lee
  • 51
  • 2
  • 5
0
votes
1 answer

take email photo and send it to twitter

An email arrives on the mail server with a foto attached (a motion warning from a security camera, for example) and I would like to forward that foto to a twitter account via a DM. I think I have all the tools necessary to do this, but I haven't…
lbutlr
  • 414
  • 6
  • 18
0
votes
0 answers

Virtualmin and Procmail - send incoming emails to PHP script

I'm running a CentOS 7 server with Virtualmin/Webmin and virtual hosts configured. I want to send all emails addressed to one specific email address hosted on this system (belonging to one virtual host) to a PHP script for processing. From…
Ryan Griggs
  • 2,457
  • 2
  • 35
  • 58
0
votes
1 answer

Procmail not forwarding using ![my email address]

I have an account on a Linux server, and I'd like to have a copy of each non-spam email that's sent to this count be forwarded to my Gmail account. I added these lines to my .procmailrc file: :0c: * . !sigils.email.address@gmail.com Here they are…
sigil
  • 9,370
  • 40
  • 119
  • 199
0
votes
1 answer

Setting the current date into a variable in a Script in bash

So for the life of me I cannot figure out why my script will not take my date command as a variable. I have a script that is run every time a message is received and procmail filters specific messages by their subject line. The script looks like…
0
votes
2 answers

How to store local copy of email before forwarding (in procmail)

This forwards emails to the address stored in the variable EMAIL_ADDR :0 * ^From ! $EMAIL_ADDR I would like to save a local copy of the email before it's forwarded. Not sure of the syntax to do that. I know this doesn't do it: :0 * ^From | tee…
murspieg
  • 144
  • 2
  • 14
0
votes
1 answer

How to write a recipe to get the real email sender

I am trying to send email back to the sender using sendmail -oi -t, but somehow it extracted MTA, how to write the receipt to get the real sender since the email return-path and first From in the email header is MTA, not the real sender? So sendmail…
Ann W.
  • 27
  • 1
  • 7