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

(Copied from Stack Overflow's procmail tag info page.)

123 questions
1
vote
2 answers

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 Spamassassin to go in a dedicated folder for each user…
Flackou
  • 111
  • 3
1
vote
1 answer

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 "Hello world" | netcat localhost 12345 RANCID…
SimonJGreen
  • 3,195
  • 5
  • 30
  • 55
1
vote
1 answer

procmail recipe to forward email is rejected by recipient

This is the first time using procmail and I've got the following…
joshu
  • 771
  • 3
  • 12
  • 28
1
vote
1 answer

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 1234564@example.com. Note There are no accounts on…
joshu
  • 771
  • 3
  • 12
  • 28
1
vote
1 answer

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 second both should have mails in maildir format. How…
Lasantha
  • 11
  • 1
1
vote
1 answer

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 1338840057.Vfe02I2a6f1M483134.example.com:2,S ... And also, what's the criteria to…
elitalon
  • 209
  • 5
  • 15
1
vote
1 answer

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: * ^(To|From):.*foo@mail.ru QObject/ :0: *…
KAction
  • 111
  • 4
1
vote
1 answer

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 DEFAULT=/var/spool/mail/foouser SHELL=/bin/sh :0 !…
Mike B
  • 11,570
  • 42
  • 106
  • 165
1
vote
2 answers

What is a Quick and Understandable PROCMAIL Way of Allowing POP Mailbox users to turn on and off Vaction AutoReply

I've just inherited an Undocumented Linux File and Mail Server. In the past week, I audited and discovered several things that had been neglected for a while (logins still active but for long gone employees, etc). I fixed and documented these.... …
CMB
  • 113
  • 3
1
vote
3 answers

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= user=vmail argv=/usr/bin/zarafa-dagent…
Halfgaar
  • 7,921
  • 5
  • 42
  • 81
1
vote
1 answer

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 SUBJECT="^(XX-)?Subject: ?" # in user defined procmailrc…
stderr
  • 871
  • 6
  • 15
1
vote
2 answers

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) { :0c: ${DEFAULT} # :0 fwh …
user119720
  • 380
  • 3
  • 6
  • 19
1
vote
1 answer

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 email address: :0 c ! somebodyelse@example.com It…
dummzeuch
  • 607
  • 1
  • 8
  • 18
1
vote
1 answer

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 the local delivery agent, and the system is some…
David M
  • 604
  • 4
  • 14
1
vote
2 answers

Postfix - don't generate "unknown user" bounces if message is Spam

We receive a a lot of spam addressed to (random) non-existing users. This causes postfix to generate "unknown user" bounces to the fake sender. As a workaround I use a catch-all to redirect any mail to myself and manually forward mail in cause of…
FabianW
  • 11
  • 1
  • 3
1 2 3
8 9