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

168 questions
0
votes
1 answer

strange behaviour of procmail when piping content to c++ executable

I have a working procmail config. this is the rc.filters : :0 w :a.lock * ^From:(.*\<)?(try@gmail\.com)\> | $HOME/executable/a.out this file compiles and works, procmail delivers the mail, and the executable writes the content to the output…
Stasv
  • 105
  • 1
  • 10
0
votes
1 answer

Procmail sends an extra email

I use procmail to forward certain 'From' to a Gmail account /home/user/.procmailrc :0c * !^FROM_MAILER * ^From: .*aaa | bbb | ccc.* ! ^X-Loop: user@gmail\.com | formail -k -X "From:" -X "Subject:" \ -I "To: user@gmail.com" \ -I "X-Loop:…
dstonek
  • 867
  • 1
  • 17
  • 28
0
votes
1 answer

Creating SMTP Account and Receiving mail using PHP

I was wondering if during the time of my User Registration for my site, I can create an SMTP account something like : username@mydomain.com for that user using PHP? And also, some method of receiving/fetching the mails using PHP into my DB so that…
Sankalp Singha
  • 4,223
  • 5
  • 36
  • 54
0
votes
1 answer

Multiple line processing by SED to change incoming e-mail sender and keep their e-mail within bugzilla comments

I am using Bugzilla also to process publicly reported bugs. But I do not want to create account for anybody who may send a bug report. It is easily done by changing the From SMTP header. But of course I would like to keep the Sender e-mail to be…
0
votes
1 answer

Cleaning a text-mail after/before a procmail process in order to have a print of that mail

I've to clean some mails in order to print only their body with procmail : :0: # printing mail with bb in the subject to bbprinter * ^Subject:.*bb | lpr -Pbbprinter How should I make that ? Any idea-help welcome
dbourrion
  • 19
  • 3
0
votes
1 answer

inject an email into another user's procmail

I use a second account to archive mailing lists and make my business email remotely available via pop3. I have it working now with a procmail rule that copies to the second email address. Doing it this way causes the email to be reprocessed by…
0
votes
0 answers

Procmail, Plancake, and MySQL working together

I've got a script running when a certain email address receives an email, procmail pipes to a PHP script, which is then parsed by Plancake, not many problems there. I've got an if statement on strpos, depending on if the body contains a certain…
dcclassics
  • 886
  • 1
  • 11
  • 34
0
votes
1 answer

Procmail setup, to execute PHP script

I've got a procmail setup working pretty well, seems to be executing my PHP script no problem when it receives an email. Here is an example of the .procmailrc file: #BEGIN PROCMAIL SCRIPT FOR MAIL…
dcclassics
  • 886
  • 1
  • 11
  • 34
0
votes
1 answer

Procmail split mailing list answer

The common ethicete about mailing lists is to answer to a human, and CC the mailing list, like this: To: help-volounter@dev.full Cc: some-program@mailing-list.com Subject: Re: Describtion of the problem Problem is that I get two copies of such…
KAction
  • 1,931
  • 13
  • 30
0
votes
2 answers

How do I use Procmail with PHP?

I'm trying to use procmail to send emails to a PHP script so the script will check a MySQL database and edit the subject line based on the sender email. I believe I've got a working procmail to do this: :0: * ^To:.*@barrett.com !…
0
votes
2 answers

How to determine which pattern in a file matched with grep?

I use procmail to do extensive sorting on my inbox. My next to last recipe matches the incoming From: to a (very) long white/gold list of historically good email addresses, and patterns of email addresses. The recipe is: # Anything on the goldlist…
Lester Buck
  • 737
  • 6
  • 7
0
votes
1 answer

Adding headers to mail coming via exim4

I've got a Debian Etch system running Exim4-daemon-heavy. The system is open to the internet, but the intention is that it will only receive legitimate mail coming from a spam-filtering service, which runs as a proxy ahead of it. (I can't just…
user14038
0
votes
1 answer

Sendmail/procmail - get mail sender and mail subject, utf8 encoding issues

My .procmailrc (really simple): :0c | $HOME/send_sms.sh "`formail -xFrom:`" "`formail -xSubject:`" So, sender named "mail@domain.com" sends message with subject "Subject test ąść". The script "send_sms.sh" receives: Sender: …
user1209216
  • 5,410
  • 7
  • 45
  • 95
0
votes
1 answer

php imap headesr message_id to FT_UID or in_reply_to to FT_UID

Is there any way that I can find message FT_UID if I have raw message_id (bfd14a45-88ef-4404-b7fd-dbbf8ec8241b@domain.com)? Or in_reply_to raw id (20120717101453.4074313004BD@zumance.pregmatch.org) to FT_UID? Or is there any way that I can pipe…
pregmatch
  • 2,235
  • 5
  • 23
  • 60
0
votes
1 answer

How to forward emails to PHP script?

I'm trying to figure out how I can forward (or pipe) an email to a PHP script using fetchmail. I've never done this and am not even sure if I'm on the right track. From what I've read I think I need to use an MDA to forward the mail. I'm using…
ctown4life
  • 729
  • 1
  • 8
  • 22