[Procmail](http://procmail.org/) 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.

learn more… | top users | synonyms

-3
votes
1answer
26 views

Fetchmail doesn't recognize my procmail binary

My problem: after running fetchmail I get this error: /Users/User/.fetchmailrc:7: syntax error at -d My .fetchmailrc file looks like this: set daemon 300 set nobouncemail set invisible poll ...
1
vote
1answer
148 views

Problem extracting email attachment using munpack

I have fetchmail running perfectly to fetch emails from Gmail, and then I am using procmail to store them in $HOME/Mail/Inbox. In my .procmailrc, I added this code which pipes to munpack to extract ...
1
vote
1answer
465 views

Mail filtering with procmail in a postfix/dovecot system with virtual users

I had a postfix/dovecot system with mail users working. After unsuccessfully following a few tutorials online to enable procmail, now I have an unusable system. What I want is to enable procmail ...
2
votes
2answers
127 views

procmail save into a dir and execute a script?

I'm using procmail with Maildir/ and easy rules like the one below to save incoming emails into directories: :0: * ^X-Spam-Status: Yes Spam/ Now I would like a desktop notification on new emails in ...
5
votes
3answers
109 views

How to grab the oldest unread message from `mail` in a script?

In a script I am trying to finish writing now, I need to get the oldest unread message from the current user's mailbox (specifically, I need the subject line for this project). After extracting the ...
0
votes
1answer
106 views

Job started by procmail does not appear in ps-output and cannot be stopped, even not after reboot

For testing purposes I called procmail by my .forward file |/usr/bin/procmail and by the rules in .procmailrc it started a job named "start", which was simply an infinite loop while true do ...
2
votes
1answer
69 views

How to debug ~/.forward

How can I debug ~/.forward file or see errors logged by mail agent on it without root privileges? I'm trying to process my mail with procmail. When I invoke procmail manually with procmail < ...
1
vote
1answer
54 views

Selectively forward email based on domain?

I have an alias on my mail server, call it splitusers. Based on which domain (a couple are run off one mail server) is used, I would like the mail forwarded to a different user account. Eg: ...
1
vote
1answer
264 views

Use /etc/init.d/fetchmail with the personnal ~/.fetchmailrc

Now, I have two users in my system using fetchmail with a personal ~/.fetchmailrc and syncing there mails with the command fetchmail -kv --uidl -m '\''/usr/bin/procmail -d %T'\ (In a cron but this ...
2
votes
2answers
53 views

procmail recipe with a regex doesn't work

In my ~/.procmailrc I have the following lines: :0 \* ^Subject:.*(O|o)pen( \|)(S|s)(onic|urge) $MAILDIR/OpenSurge/ As you see, I would like to put any mail containing “Open Surge” (or any variant ...
1
vote
1answer
212 views

What's the safest way to pipe an email to a script via procmail?

I have a simple procmailrc recipe that hands mail off to a script: LOGFILE=/home/foouser/procmail-log VERBOSE=yes MAILDIR=/var/spool/mail/foouser DEFAULT=/var/spool/mail/foouser SHELL=/bin/sh ...
2
votes
2answers
193 views

Why does procmail send a copy of an inbound message to sender if it encounters an exit code?

I have a very simple procmail process that takes an inbound email and redirects it to a script: LOGFILE=/home/foo/procmail-log VERBOSE=yes MAILDIR=/var/spool/mail/foo DEFAULT=/var/spool/mail/foo ...
0
votes
0answers
112 views

filter cron emails through procmail?

I'm using postfix/mutt/procmail on a Linux/Debian and I've some trouble filtering cron emails with procmail, I just want to move them to the cron/ maildir directory, but no lucky till now. I've ...
0
votes
1answer
262 views

Processing multiple mails in a Postfix mailbox by making cronjob run per second-is that considered good practice?

I need to process at least three thousand incoming emails an hour that are received in a postfix mailbox. Processing involves extracting email attachments and sending the content of an email ...
3
votes
1answer
386 views

Restricting who can send to an email address

I'd like to do so that only certain From: addresses can send to an email address (mailing list) on an Ubuntu system running Postfix. Understanding the Postfix the manuals are requires a lot of ...
2
votes
2answers
294 views

How can I use procmail to modify the body of an email and then forward it to an external address?

I'm struggling to get procmail to first transform, and then forward, a received email. Here's what I'd like to do: :0 f | ~/bin/encryptemail.pl | mail foobar@gmail.com That is, I want to run the ...
2
votes
1answer
47 views

Procmail standard base path for directory delivery

I had trouble with procmail not wanting to deliver my mail to a specific folder. I had: DEFAULT=/home/vmail/${ER_DOMAIN}/${ER_USER}/ :0 * ^To:.*my-email * ^Subject:.*some-filter .the-dir/ But got ...
3
votes
1answer
590 views

Procmail: Denying special privileges for “/etc/procmailrcs/default.rc”

I'm trying to setup postfix, dovecot and procmail to work together with virtual users. In the end I want to have virtual users and the possibility to add rules to sort incoming rules. For the last ...
3
votes
2answers
2k views

How to stop Fetchmail marking messages as read

When fetchmail checks my IMAP inbox, it downloads any unread messages and removes the message 'unread' flag on the mail server. Is there a way to have fetchmail download new messages without marking ...
3
votes
0answers
931 views

Using Munpack to extract attachments of specific file type (Debian/Squeeze)

I configured Munpack on my Debian/Linux to extract attachments from incoming emails. (For additional context, Getmail fetches the emails and pipes it to Procmail. A Procmail recipe then pipes it to ...
4
votes
1answer
428 views

Modify an incoming mail from text/plain to text/html

I'm using mutt to process my mail. There is one sender which declares the wrong content type. The mail arrives with Content-Type: multipart/alternative; boundary=--… and has two parts. They are ...
3
votes
1answer
691 views

Savings emails as individual files using Procmail

I installed Getmail to retrieve emails from another email server and Procmail to filter the incoming emails. (I am running Debian/Squeeze.) The recipe I created has this code: :0: * ...
1
vote
1answer
49 views

How to silence spam or unwanted email from email-lists with Procmail?

I joined an email-list. I found it low-quality and I don't have time to follow their discussions. Then I informed the head to remove my email but they haven't done it. How can I can silence their ...
3
votes
2answers
315 views

Do procmail recipes have an alternator “or” operator?

Given the following procmail recipe: :0: * ^Subject:.*viagra.* * ^From:.*viagra.* /dev/null Procmail would only delete emails that were both from viagra, and had viagra in the subject. Is it ...
6
votes
3answers
2k views

How can I apply my procmail filters to my maildir inbox?

Last night I subscribed to a mailing list, and discovered this morning that my procmail filter didn't apply to many of the mailing list messages. Now I have loads of less-important mailing list ...
2
votes
1answer
368 views

How to use whitespace in procmailrc recipe destination path?

I use Mutt Maildir for storage mails. I created one mailbox like this Stack Exchange/. (whitespace between Stack and Exchange here) procmailrc recipe: :0 * From: .*Stack\ Exchange Stack Exchange/ ...
1
vote
1answer
317 views

Customized Work Emails and Signatures with Each Firm, perhaps with Mutt and Procmail to look Professional?

CompanyA sends mail, I want to respond to them with me@companyA.com and signatureA. When CompanyB sends mail, I want to respond to them with me@companyB.com and signature B. Etc. 1. How can I do a ...
3
votes
1answer
369 views

Sendmail/procmail/Exchange truncating mail

The level of enlightenment by a colleague to find a pattern in this has saved me from a new depth of madness. My hope is that the brain trust here can now tell me why... The Scene: We have several ...
7
votes
4answers
2k views

Receive Pop/IMAP email and then forward as encrypted to gmail

Basically, I have an email account I can access as POP3 or IMAP. I want to take all incoming emails, encrypt them, and then forward the encrypted version to my gmail account (so I can see the ...
1
vote
1answer
2k views

Why is procmail not being run?

I'm running Fedora 13 Linux, and sending mail to myself using mutt, and I can't seem to get procmail to run. Below is what my .procmailrc, ~/Procmail/rc.testing, and .forward files all look like. As ...