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
2 votes
2 answers
237 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 ...
user avatar
0 votes
1 answer
26 views

Procmail autoresponse to a single sender (or few ones)

I've been looking some similar examples and slight changes to them to perform that but unsuccessfully. This is the first recipe at $HOME/.procmailrc of the user "me". Mail is received by ...
user avatar
0 votes
1 answer
41 views

How to filter and deliver a message in Procmail

I rewrite the subject line for certain incoming mails depending on TO: field: :0fhw * ! ^TO_user@domain\.com\> * ^TO_[^<>@ ]+@domain\.com\> * ^Subject:\/.+ | /usr/local/bin/formail -I"...
user avatar
0 votes
1 answer
48 views

procmail rewrite subject line if email recipient user fails match test

I have a local procmail user "bob". If an email arrives and matches bob@domain.com, then no action should be taken. However, if an email arrives and is [anything_else]@domain.com then I ...
user avatar
0 votes
1 answer
77 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): username@example.com /dev/null ...
user avatar
  • 669
0 votes
1 answer
68 views

Can Procmail be configured to get rid of mail after it is passed to a script?

I have Postfix installed and configured to pass mail to Procmail. I have Procmail configured to pass the email to a Python script. I also notice that Procmail is placing a copy of the same email into ...
user avatar
  • 135
0 votes
1 answer
365 views

How to pass original recipient by Postfix to Procmail

Is there a way to identify the original recipient of the email, in procmail and not via header? The recipient can be in Bcc and can also be in one of the To / Cc and I am looking for how to get the ...
user avatar
0 votes
0 answers
131 views

have postfix bounce all but procmail related non-delivery notification

Pardon me for reposting on serverfault; I mistakenly posted it originally on stackoverflow before, and was kindly reminded to post here..... Problem: I experience every now and then non-delivery ...
user avatar
  • 33
-1 votes
1 answer
159 views

Procmail recipe - If no dkim signature then forward to .spam

Having read through the documentation at http://pm-doc.sourceforge.net/doc/ i cannot find an answer. I want to use procmail to place mail without dkim into user's spam folder. I have found many ...
user avatar
  • 121
-1 votes
2 answers
388 views

Log INCOMING mail to server

I have a mailbox on my server, mailbot, that is working fine. Mail to mailbot@example.com works and per the procmailrc file, sends back an autoresponder text file. But I should be able to send to ...
user avatar
  • 1,077
1 vote
0 answers
239 views

smrsh cannot stat procmailrc

I am attempting to use procmail to route email for virtual users into different folders (specifically, I want to deliver to a user's spam folder if spam assassin assigns a high score). The MTA is ...
user avatar
  • 11
0 votes
1 answer
79 views

procmailrc recipe: turn on VERBOSE conditionally? [closed]

I would like a recipe for my procmailrc file to turn on VERBOSE only if an e-mail came in from one (and only one) particular e-mail address. My procmail spam filter is way too long (and old) and ...
user avatar
0 votes
2 answers
316 views

Why this email wasn't delivered by Postfix/Dovecot/Procmail?

During that day sender sent four other emails after this one. All of them were delivered as usual. These are the lines of maillog corresponding to that email that was not delivered to recipient. ...
user avatar
  • 223
1 vote
1 answer
655 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 ...
user avatar
  • 955
1 vote
1 answer
459 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 username@school.edu by username@gmail.com becomes: ...
user avatar
0 votes
1 answer
2k views

Procmail variables and recipe syntax

I'm trying to understand the procmailrc syntax. From documentation that I've read, I can set my own variables using VARNAME=value and then use them elsewhere by refering to $VARNAME I also understand ...
user avatar
0 votes
1 answer
45 views

emails from specific user folder to be zipped and forwarded to an external mailbox

What I'm trying to do is to forward all the emails that are stored (moved) into a specific user folder to a predefined email address e.g. Any new email stored in /home/mycooluser/mail/spam-mail to ...
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 ...
user avatar
  • 533
0 votes
1 answer
89 views

Setup a mail server on debian ONLY to redirect them to a parser script [closed]

I have a server (example.com) running on Debian that is not configured to receive emails (or at least I've never done any effort to do so). From what I understand I just need to create an MX DNS entry ...
user avatar
28 votes
1 answer
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 ...
user avatar
  • 805
3 votes
1 answer
1k 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 ...
user avatar
  • 5,321
1 vote
0 answers
454 views

Dovecot/sendmail migration from system to virtual users

I have a production mailing system in place. The initial setup was done with system users. Each domain has a system user and in the end all mail to the same domain goes to the same account (and later ...
user avatar
0 votes
1 answer
1k views

How can I setup Procmail to run a script from email subject

I'm setting up a website that allows users fill a form which sends an email to a server. The subject of the email is generated as a server script that I would like to run on the server command line in ...
user avatar
0 votes
1 answer
1k views

Permission difficulties with NFS-mounted /var/spool/mail for dovecot and procmail

My mail server setup worked for years. Recently I've started experiencing the following problem: Mail setup: sendmail+dovecot+procmail Host file server: CentOS 6.8, NFS exports mail directories to......
user avatar
0 votes
2 answers
333 views

Filter mail recipient by alias matching with sender's domain

I use an alias for each company that I provide an e-mail contact. So, for example, in /etc/aliases somecompany: myuser The address I supply to SomeCompany would be somecompany@mydomain.com If the ...
user avatar
6 votes
1 answer
805 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 '<...
user avatar
  • 173
3 votes
1 answer
3k 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 ...
user avatar
  • 81
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 ...
user avatar
  • 43
0 votes
1 answer
80 views

How to avoid getting matched by FROM_DAEMON on promail?

An admin of a service, which is primarily email based, complained that mails from my self-hosted email server gets matched by FROM_DAEMON on their procmail setup which ends up throwing away my emails. ...
user avatar
  • 101
4 votes
0 answers
59 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 "...
user avatar
1 vote
1 answer
2k 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
0 votes
0 answers
674 views

Sendmail/dovecot/procmail: Maildir permissions

I've just spent several hours in the middle of the night trying to migrate a Maildir setup from Centos 5.6 to Centos 7.2. I found dozens of hits on how to do this, all completely useless - a few gave ...
user avatar
  • 393
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 [...
user avatar
0 votes
1 answer
705 views

dovecot /usr/lib/dovecot/deliver fails only for root

After upgrading Ubuntu from 14.04 to 16.04, I can no longer use dovecot's deliver program in procmail for system deliveries as root, because it claims it cannot open the auth-userdb file, even though ...
user avatar
3 votes
3 answers
1k 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 ...
user avatar
  • 198
1 vote
1 answer
795 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(/...
user avatar
  • 21
3 votes
1 answer
658 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]...
user avatar
  • 53
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)...
user avatar
1 vote
2 answers
583 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/...
user avatar
  • 322
1 vote
0 answers
1k views

rt-mailgate not making tickets with fetchmail and procmail

I'm trying to use my mail so that any mail sent to support@mydomain.com are turned into tickets by RT4. The process currently breaks down in the send mail step. My server is running fetchmail. The ...
user avatar
  • 11
1 vote
1 answer
729 views

Emails corrupt and a winmail.dat file attachment added for only one mail box

I have one mailbox that's receiving emails from a particular company who use Outlook and all emails sent to that one address are stripped of their proper structure and a winmail.dat file is attached. ...
user avatar
2 votes
1 answer
62 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 ...
user avatar
  • 121
1 vote
1 answer
2k 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 ...
user avatar
0 votes
2 answers
351 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 ...
user avatar
  • 117
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. (work@domain.com) Everything was just working ...
user avatar
  • 141
0 votes
1 answer
590 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_ "${...
user avatar
  • 101
0 votes
1 answer
860 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 | ...
user avatar
  • 101
2 votes
1 answer
717 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 ...
user avatar
  • 35
1 vote
1 answer
713 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 ...
user avatar
0 votes
0 answers
281 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 / ...
user avatar
  • 1