Skip to main content

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.

Filter by
Sorted by
Tagged with
28 votes
2 answers
3k views

Is it safe to use procmail in 2017?

I just discovered that procmail website (http://www.procmail.org/) is down. I did some research about its status and it appears that the development of procmail has been dead since 2001. Even the old ...
JooMing's user avatar
  • 835
14 votes
6 answers
16k views

Is there a way to filter mails in remote IMAP account?

Situation: mail server with IMAP only access. Problem: I want to be able to filter mails (put some mails to various folders, mark them as read and so on). Most new email clients have this ability, ...
user avatar
6 votes
1 answer
6k 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 ! [email protected] But..now I need to change the From: header in the mails that ...
datadevil's user avatar
  • 535
6 votes
1 answer
935 views

procmail insists in writing to /var/mail in macOS Sierra

I'm trying to configure fetchmail and procmail with a Google account. This is my $HOME/.fetchmailrc: poll imap.gmail.com protocol IMAP user "<email>" is jviotti here password '<...
jviotti's user avatar
  • 173
4 votes
2 answers
2k views

Setting up procmail to ignore auto-responders and bounces

I'm using procmail to receive email messages and then forward them on to a script for handling. Sometimes this will even mean generating an email (for example, forwarding the message to another user, ...
Jordan Reiter's user avatar
4 votes
1 answer
422 views

How to make clamassassin prepend the X-Virus-* headers instead of appending them?

The email virus filter wrapper for ClamAV, clamassassin, appends its headers to the message headers. X-Virus-Status: No X-Virus-Checker-Version: clamassassin 1.2.4 with clamscan / ClamAV 1.0.3/27134/...
Esa Jokinen's user avatar
  • 50.2k
4 votes
0 answers
66 views

Was Procmail's "dropped F" bug ever fixed? If so, when?

For well over a decade, SpamAssassin has provided a sample procmailrc file that includes the following workaround for a Procmail bug: # Work around procmail bug: any output on stderr will cause the "...
Psychonaut's user avatar
4 votes
2 answers
3k views

Setting up Procmail Filtering for Spam on Postfix/Courier+MySQL Virtual Users

I've been searching for a resource on how to do this but not having much luck. I am running a working MTA/MUA that is based on Postfix and Courier with MySQL as a backend for virtual users. I based ...
AJ.'s user avatar
  • 342
3 votes
3 answers
28k 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 ...
starfry's user avatar
  • 611
3 votes
1 answer
2k views

Procmail recipe, mail owned by root

I'm using a combination of Postfix and Procmail to handle inbound email on one of my servers. Each user has a local account and I've been using the below /usr/local/etc/procmailrc successfully for ...
USD Matt's user avatar
  • 5,391
3 votes
3 answers
3k views

Change allowed mail size quota

The email server on my ubuntu machine can only receive mails up to 10 megabytes in size. I would like to change that value, but I'm so blind I can't figure out where to change it. Could not be ...
Jelle De Loecker's user avatar
3 votes
1 answer
4k views

procmailrc - change email subject

I want to change subject for all subscription list emails by adding [BULK] to its. Looks like global /etc/procmailrc file is the best place to do it. But this filter also drops all headers for some ...
aranel's user avatar
  • 111
3 votes
3 answers
2k views

Is it possible to reject certain emails in procmail? [In SMTP session rejects based on email content]

Let's assume a typical setup where procmail is called from sendmail to filter incoming emails into correct mailboxes. Is that done while the incoming SMTP connection to sendmail is still active or is ...
Greg's user avatar
  • 198
3 votes
1 answer
963 views

Where does an unconfigured procmail put incoming mails?

When restarting my postfix with a slightly wrong config, a few mails that were waiting in the mail-queue were apparently delivered via procmail mail.log.0:Dec 26 00:53:38 h2229778 postfix/local[27243]...
gmyny's user avatar
  • 53
3 votes
1 answer
7k views

Best Practical RT, sorting email into queues automatically using procmail

I'm trying to get incoming e-mail to automatically go directly into whichever queue/ticket they are related to or create a new one if none exist and the right queue e-mail setup in the web interface ...
user52095's user avatar
3 votes
1 answer
1k views

Email, forwarded by procmail, rejected by Gmail

EDIT Let's ignore for a while all that I have written below and refrase the question: If you have your own domain name and you want to get email for that domain into your Gmail inbox (not Google Apps)...
Amedee Van Gasse's user avatar
2 votes
3 answers
13k 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 -...
tacos_tacos_tacos's user avatar
2 votes
2 answers
1k views

What is the purpose of -a "$EXTENSION" in the procmail / postfix integration?

The suggested integration method for procmail into postfix recommends the following: mailbox_command = /some/where/procmail -a "$EXTENSION" All it says about $EXTENSION is EXTENSION The ...
rrauenza's user avatar
  • 585
2 votes
2 answers
3k 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 ...
Chris H's user avatar
  • 133
2 votes
2 answers
852 views

Procmail on Postfix - delivering Email to Inbox

I have setup a Postfix mail server, and my goal was to pipe incoming emails to a script. I did this via Procmail. The script is getting run without any issues. my issue is: I want to deliver a copy of ...
Zareh Kasparian's user avatar
2 votes
2 answers
5k views

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 ...
FabianW's user avatar
  • 21
2 votes
1 answer
3k 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 ...
r.j.bumble's user avatar
2 votes
2 answers
4k 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 ...
user avatar
2 votes
1 answer
1k views

Procmail script for autoreplier with constraints

How would I set up procmail so it replies to all emails with a standard message, provided the emails: Have the word "AAA" in the subject Have the word "BBB" in the text Do not have the words "CCC" or ...
user36547's user avatar
  • 121
2 votes
2 answers
311 views

Spam daily report on servers using sendmail

we'd like to implement a daily spam report to our users like Dreamhost does. Basically we need to send a daily mail (at midnight for example) to inform a single user of all the emails currently in his ...
user avatar
2 votes
1 answer
64 views

Sane Spam Strategy [closed]

Right now I'm using spamd to score spam and then procmail to put it in user's .Spam Maildir folder and then manually running sa-learn on .LearnAsSpam and .LearnAsHam and then also manually just ...
squarewav's user avatar
  • 140
2 votes
1 answer
820 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 ...
Thom's user avatar
  • 35
2 votes
1 answer
2k 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 ...
user2626702's user avatar
2 votes
1 answer
3k 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 ...
cnst's user avatar
  • 14.4k
2 votes
1 answer
1k 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 ...
user119720's user avatar
2 votes
1 answer
739 views

Postfix .procmailrc mail bounce loops

I tried to search and find similar topics but I couldn't find anything that quite addresses my issue. Basically, I help administer a server for a student group, and most users forward their mail off ...
Ibrahim's user avatar
  • 394
2 votes
2 answers
1k views

Error with procmail script to use Maildir format

I have this code in /etc/procmailrc: DROPPRIVS=yes DEFAULT=$HOME/Maildir/ :0 * ? /usr/bin/test -d $DEFAULT || /bin/mkdir $DEFAULT { } :0 E { # Bail out if directory could not be created ...
bradlis7's user avatar
  • 363
2 votes
1 answer
1k views

Procmail Filtering From and Body

I have a script generated e-mail which comes in hourly. I do not need to see it except under certain conditions, and so I just want it filtered to its own mailbox. The message comes from cron, and I ...
David's user avatar
  • 43
1 vote
2 answers
674 views

Procmail and thunderbird: folder/maildir created with root as owner

I have a mailserver configured(spamassassin+procmail+sendmail+dovecot) I want all spam mails redirected to spam folder I set /etc/procmail DEFAULT=/var/spool/mail/$LOGNAME/new ORGMAIL=/var/spool/mail/...
elbarna's user avatar
  • 348
1 vote
1 answer
286 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 1338840057.Vfe02I2a6f1M483134....
elitalon's user avatar
  • 209
1 vote
1 answer
2k 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 DEFAULT=...
Mike B's user avatar
  • 12.1k
1 vote
1 answer
964 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 SUBJECT="^(XX-)?...
stderr's user avatar
  • 881
1 vote
2 answers
2k views

Procmail rules with regexp

here are my procmail recipes: :0 * ^Subject: [JIRA] (EDRV-*) *$ .JIRA.edrive/new :0 * ^Subject: [SPAM] *$ .SPAM/new :0 * ^X-Spam-Status: Yes .SPAM/new :0 * .* new I want to put my messages with [...
Green Root's user avatar
1 vote
1 answer
926 views

IMAP server can't read (open) mails using fetchmail, procmail & dovecot

I'm trying to setup a mail server ! Everything seems to be ok (after some loooong days) but when I tried to read mail with IMAP server : Apr 18 17:38:48 sd-84941 dovecot: imap(dlp): Error: open(/...
partout's user avatar
  • 21
1 vote
1 answer
1k 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. ([email protected]) Everything was just working ...
atari83's user avatar
  • 141
1 vote
1 answer
8k 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 [email protected] and I want the exact email forwarded outside mydomain.com to ...
joshu's user avatar
  • 811
1 vote
1 answer
2k 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: * ^(...
KAction's user avatar
  • 111
1 vote
3 answers
1k 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= ...
Halfgaar's user avatar
  • 8,234
1 vote
1 answer
2k 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 ...
dummzeuch's user avatar
  • 607
1 vote
1 answer
5k views

Procmail lock failures and errors while writing

I'm setting up a mail server on an embedded linux system. When sending mail to a local user I get the following error from procmail: procmail: Lock failure on "/home/mail/ktos/.mailspool.lock" ...
user avatar
1 vote
1 answer
3k views

Procmail: Pipe to Program, Otherwise Return Error to Sender

I'm trying to use procmail to send all messages for a certain domain to RT (Request Tracker). This is more of a question about the .procmailrc file, though. Here's my current .procmailrc file: #...
bradlis7's user avatar
  • 363
1 vote
1 answer
323 views

Procmail not bouncing emails

I have a catch-all email address for my domain, however I want to block certain addresses from receiving mail. Before, I was doing it like this: :0 * ^(X-Original-To): [email protected] /dev/null ...
Mike's user avatar
  • 689
1 vote
1 answer
853 views

Procmail not execute shell command

i need launch a script when receive an email with specific subject, i've try fetchmail + procmail, this my configuration .fetchmailrc set no bouncemail defaults: antispam -1 batchlimit 100 poll ...
stecog's user avatar
  • 1,005
1 vote
1 answer
904 views

How do you match a forwarded gmail address with procmail

When Gmail forwards an email to an external address, it apparently inserts the forwarded address into the FROM line. So an email being forwarded to [email protected] by [email protected] becomes: ...
Daniel Kocevski's user avatar
1 vote
1 answer
3k views

Procmail seems not being executed when fetching emails with fetchmail

I have the following problem: I got a new working PC (Debian testing, codenme: stretch) recently and had to reinstall fetchmail and procmail in order to read my emails with mutt. Now, fetchmail works ...
user avatar