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.

learn more… | top users | synonyms

1
vote
1answer
59 views

Comparison of methods to send Postfix emails to Procmail

I want to begin using Procmail in order to perform filtering on specific accounts in virtual domains as received by Postfix on my Centos 7 server. In various articles it seems that there are two ...
0
votes
2answers
23 views

Procmail recipe with capturing group

Trying to direct email based on a regex match. I know I can do this: echo | mail -s test1 me-route2 with this recipe: * ^To:.*me-route2\@ :0: /home/me/folder-route2/afile What I'd like to do is ...
1
vote
1answer
94 views

postfix/procmail - preventing duplicate email in procmailrc

I've postfix on my server, I'm using procmail and customized shell script to process incoming emails for one of user accounts on my local domain/machine. (work@domain.com) Everything was just working ...
0
votes
1answer
39 views

Procmail multipart message / content type

I have a procmailrc file that is collecting some variables from mail headers, then echo'ing those variables into the message body. Like this: :0bfw | echo Subject_ "${SUBJECT_}" ; echo From_ ...
0
votes
1answer
25 views

Procmail: Inject sender address into the message body

How do I inject the sender's address, or any other header, into the message body using procmail? I've already found how to inject a static string into the message body, which works fine: :0bfw | ...
2
votes
1answer
100 views

Need linux milter solution to log email body into database

We exchange emails with various clients and vendors. I am trying to implement a solution where all the email communications between our rep and the client or vendor is saved in our database so in our ...
0
votes
1answer
150 views

Deliver fetchmail messages to two different MDA's

I'm running fetchmail on a AntiSpam server to get messages on user's junk folder to feed SpamAssassin bayesian filtering. It's been running nicely with the -m option in fetchmail to deliver the ...
0
votes
0answers
133 views

Move spam from dovecot public folders

I have set up Dovecot with public folders on a CentOS 6-server, with sendmail and spamassassin. I'm getting a lot of spam in both public folders and in the users inboxes. I want spamassassin / ...
0
votes
1answer
241 views

Sendmail.mc: alias all incoming e-mails to one account

I need to alias all mail coming from another SMTP server to this one account "myinbox". The system in question is to receive all e-mail on the domain, if that's any help. ...
-2
votes
3answers
367 views

Procmail or/and dovecot? [closed]

At my class project I'm asked to install and configure a mail service, to do that I have to : Install and configure postfix Install and configure Procmail Configure postfix authentification with ...
0
votes
0answers
287 views

DROPPRIVS=yes & procmail: Program failure (75) of “/usr/lib/dovecot/deliver”

When I set up DROPPRIVS=yes I get in the procmail logfile procmail: Program failure (75) of "/usr/lib/dovecot/deliver" what is procmail trying to tell me ? UPDATE tail -f ...
0
votes
1answer
124 views

check with procmail if a file exists and set a option

I want to check with procmail if a file exists and depending on this set DROPPRIVS=yes if its not true stay with DROPPRIVS=no Why is this not working? :0 w * `test -f $HOME/mail/.procmailrc` ?? 1 { ...
1
vote
1answer
281 views

procmail is ignoring user settings

I use procmail for filtering emails in combination with postfix. procmail is triggered by postfix via the in the main.cf mailbox_command mailbox_command = /usr/bin/procmail -t -a "$EXTENSION" but ...
0
votes
2answers
172 views

using sendmail with only non system users

I need to use sendmail without any system users. The only problem that still exists in my configuration is that FEATURE(virtusertable) wants a final systemuser on RHS in my virtusertable like this: ...
1
vote
2answers
191 views

Fixing intermittent file locking issue in Procmail

Has anyone seen the following issue with procmail file lock timeouts when writing to a mbox file? This occurs every couple of weeks for a user with the following procmailrc: :0 c: #copy all ...
2
votes
1answer
539 views

Decrypt incoming pgp mail with procmail

Currently I have a running Postfix server which delivers incoming mail through procmail. That works fine but now I want to decrypt any incoming mail which is encrypted with pgp automatically. So I ...
0
votes
0answers
240 views

Procmail (permission related) - delivery fails: “process exited returning 77”

Procmail fails to deliver any mail to local users. Bounce message I receive is following: Diagnostic-Code: x-pmta;Error running "/usr/bin/procmail -t -Y -d james": process exited returning 77 ...
0
votes
2answers
248 views

Procmail - Replace From with text from within email

I am trying to use Procmail to filter through mail that goes to my ticket channel in WHMCS. It works fine as far as piping goes. But emails from the Zopim live chat module on the site need filtering ...
0
votes
1answer
220 views

Procmail to delete mail from senders

I'm looking to delete all mail addressed from "root@", where the address could originate from any domain. Am I right in thinking the line below would achieve this? [using sendmail] :0 * ^From.root* ...
1
vote
2answers
708 views

Configuring Postfix, Spamassassin and Procmail to put spam in a dedicated folder

I'm not sure if SF is the good place for that, so sorry if it's not the case. I'm administrating a Debian server for our company's emails and I'm trying to have the emails flagged as spam by ...
1
vote
1answer
409 views

How to use procmail to get a message into a variable

I'm trying to get changes logged by our RANCID install to be logged and sent to an internal comms broadcasting system we have. I can talk to this directly via netcat, for example this will work: echo ...
0
votes
1answer
427 views

procmail recipe to forward email is rejected by recipient

This is the first time using procmail and I've got the following recipe, SENDMAIL=/opt/zimbra/postfix/sbin/sendmail SHELL=/bin/sh PATH=$HOME/bin:/usr/bin:/bin:. MAILDIR=/opt/zimbra/procmail/ ...
1
vote
1answer
2k views

Zimbra outgoing email forwarding/ redirecting from internal to external domain

How can I automatically forward outgoing emails to a different domain? As an example, a user sends an email to 1234564@fax.mydomain.com and I want the exact email forwarded outside mydomain.com to ...
1
vote
3answers
6k views

how to configure postfix to send local mail to another local server?

I have a pair of mail servers that are comprised mainly of Postfix, Procmail and Cyrus-IMAP and they both work fine. The IMAP servers are configured in a simple master/replica pair. All 'normal' mail ...
0
votes
4answers
513 views

Stopping incoming spam with sendmail [duplicate]

I am having an issue due to a "smart" sysadmin that made some choices while I was away for two months: Spam. I manage probably close to 10,000 web/mail sites. He decided to allow all mail to ...
2
votes
1answer
976 views

How to enable maildir in Dovecot deliver with Sendmail local_procmail

There is documentation around on how to make /usr/local/bin/procmail work with delivering to a maildir. However, it is my understanding that it is also possible to avoid procmail altogether, and have ...
1
vote
1answer
229 views

procmail recipe to filter email to multiple folders

Currently my procmail recipes are as below: FROM_=`formail -c -x"From "| awk '{ print $1 }'` SUBJ_=`formail -c -x"Subject:" | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'` :0 *^Subject:.*(60) { :0 ...
0
votes
1answer
130 views

Dynamic procmail filters

i need procmail to place incoming mail into specific folder depending on some set of rules. I know how i can accomplish this, but i need to write static set of rules in a specific file. What i really ...
1
vote
1answer
207 views

procmail to deliver mail to 2 maildir locations

Now I am having Postifx --> procmailrc---> maildire---> dovecot and I need to have another maildir in another folder inside /root as a backup at the same time having /$home/maildir ? First and ...
1
vote
1answer
1k views

Store and forward mail but change FROM header in forwarded mail

I need a procmail recipe which stores the mail and forwards it to another address. The following works fine: :0c ! addressto@forward.to But..now I need to change the From: header in the mails that ...
-1
votes
1answer
175 views

Procmail Postfix issue

Our server is using CENTOS uses postfix: Nov 1 11:31:52 webserver postfix/smtpd[30424]: 822A91872F: client=unknown[5.133.168.42], sasl_method=PLAIN, sasl_username=ashley@website.co.uk Nov 1 ...
1
vote
1answer
145 views

What's the meaning of suffixes that procmail assigns to mail filenames?

I am running a Postfix server and I would like to know the meaning of suffixes that mail filenames have. For instance: 1338839258.Vfe02I2a6f0M572204.example.com:2,S ...
1
vote
1answer
392 views

Mutt integration with procmail

I use following procmailrc with fetchmail: PATH=/bin:/usr/bin:/usr/local/bin VERBOSE=off LOGFILE=$HOME/.procmaillog DEFAULT=$HOME/mail/ MAILDIR=$HOME/mail/ # Recipes below this comment: :0: * ...
1
vote
1answer
765 views

How can I configure procmail to pass an email to a script if (and only if) it's from a whitelisted sender?

I want to pass emails from specific senders to a shell script via procmail. Here's my original starter script: LOGFILE=/home/foouser/procmail-log VERBOSE=yes MAILDIR=/var/spool/mail/foouser ...
0
votes
1answer
325 views

prevent procmail from adding Return-path

I'm storing and forwarding (to google apps) emails using the following procmail recipe: # set vars USERNAME=local_username LOCALPART=realemaillocalpart :0 # Avoid email loops * ! ^X-Loop: ...
0
votes
3answers
136 views

Perform an exact match on the email address in From: header using procmail

I have found a lot of examples for procmail to match on the From: header with wilcards, but I'd like to do an exact match, in order to prevent From:.*jgordon@example.com matching both ...
2
votes
2answers
2k views

How to create default subfolders using procmail with Maildir (and postfix) that work with MUA's?

I have a procmail setup and want to have a Spam folder that works with MUA's. I found this tutorial http://www.cyberciti.biz/faq/how-do-i-move-spam-mail-to-spam-folder/ but it doesn't work as ...
1
vote
3answers
488 views

Use procmail to deliver to stdout and a second server

I would like a Postfix server to deliver each message to a certain transport as well as relay to a second server. In master.cf, I have the following transport: zarafa unix - n n - 10 pipe flags= ...
-1
votes
1answer
909 views

filter body of incoming email in procmail [closed]

I've encountered some problem when configuring my linux machine. We are configuring fetchmail and procmail in order to receive the email from the external mail server.The problem start when we want ...
1
vote
1answer
260 views

Procmail variable to command

Maybe stupid question, but I can't find it anywhere. I have a variable in procmail (eg $SUBJECT) and I need to push it to some shell command. Something like: # in /etc/procmailrc ...
1
vote
2answers
105 views

Procmail recipes to accept numbers in subject

I want to ask regarding the procmail recipes. Here is my recipe so far: :0 * ^X-Loop: myemail@gmail\.com /dev/null :0 * ^Subject:.*(mytext) # * ^Subject:.*(phonenumber) ...
0
votes
1answer
211 views

Passing at-sign character to procmail in virtusertable

The FAQ tip at http://www.sendmail.org/faq/section3#3.29 seems to rely on the fact that the following entry in virtusertable: @domain.com user+%1 will cause $1 in the .procmailrc config, e.g.: ...
1
vote
3answers
4k views

Postfix + procmail - delivery fails because “can't create user output file” - on CentOS 6.2

I verified that my postfix installation / relaying setup worked. Now I am having trouble with procmail. I have it wired to postfix with the following command: mailbox_command = /usr/bin/procmail -f ...
0
votes
1answer
767 views

spamassassin via procmail: .procmailrc moves spam messages, but /etc/procmailrc doesn't

I am trying this example to set up spamassassin via procmail globally. It successfully adds the X-Spam headers, but it does not move messages to the spam mboxes. However, using this example locally, ...
0
votes
1answer
114 views

Taking mail header order in consideration when filtering

My incoming mail server is checking SPF and adds a line in the headers accordingly. However sometimes previous servers are adding similar headers so there is multiple Received-SPF headers. ...
1
vote
1answer
536 views

why does forwarding to an external email address with procmail not work?

I am using the following recipe in my .procmailrc file to forward a copy of all email messages to another account: :0 c ! somebodyelse This works fine. But if I try to use forward to an external ...
2
votes
2answers
1k views

fetchmail/sendmail/procmail alternative

is there a program out there that can download mail from an imap account to a local machine for local reading with a program like mutt? I'm finding the whole fetchmail/sendmail/procmail pipeline setup ...
1
vote
1answer
271 views

controlling what user sendmail runs scripts in aliases

Suppose I have a line like this in my /etc/aliases: foo-bar: "|/etc/smrsh/some_script" some_script is being run as user mail, but I need it to be running as user nobody. I'm using procmail as ...
0
votes
2answers
923 views

Creating a global procmailrc file that forwards to an Exchange server

I need to forward all messages received on one server to another server (Exchange box). I know how to forward for an individual, but I am unable to forward for all addresses to their respective ...
0
votes
1answer
142 views

Assistance needed with a global procmailrc file [duplicate]

Possible Duplicate: Assistance needed with a global procmailrc file Creating a global procmailrc file that forwards to an Exchange server ++++++++++++++++++++++++++++++++++++++++ Please ...