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
0 votes
1 answer
131 views

Is it possible to clean up this procmail filtering a little

I have this procmail filter which seems to work, but which I'm really not proud of. I'm convinced that we can do much more optimized and clean with nested sections, but I can't achieve any functional ...
Chris972's user avatar
0 votes
0 answers
35 views

Conditionally forwarding incoming mail to a different address

I have a task at hand that would involve grabbing incoming mail from an IMAPS server (Google Workspace), and then redirecting it to another address (for ingesting attachments from emails). Sadly, I ...
Satellite One's user avatar
0 votes
1 answer
64 views

Postfix should tempfail mail back to queue when local delivery fails

I'm running postfix on Debian 11, together with procmail as lda. Some users have a ~/.procmailrc which calls an external program, parsing the mail and doing things accordingly. This works as expected, ...
PoC's user avatar
  • 236
-1 votes
1 answer
98 views

Why is procmail saving my emails with a format like .{x}AA1?

I'm simply trying to save all incoming emails to a folder so that I can have a watchdog script comb through and parse the attachments in various ways as changes happen to the folder. We'll call this ...
Fiattarone's user avatar
0 votes
1 answer
90 views

procmail's logging helped me get one account's .procmailrc working, but two other accounts don't work and don't log); having difficulty diagnosing

As a site that has a number of users who are "technologically challenged", and as the system mangler, it's fallen on me to solve the spam problem for us all. So, SpamAssassin's doing a fine ...
Richard T's user avatar
  • 1,242
0 votes
1 answer
352 views

Is it possible to redirect (not forward) email in procmail?

I am using the following rule to forward email in .procmailrc # in .procmailrc * ^Subject.*something ! [email protected] The filtering and forwarding part works as intended. However, the email ...
knightrider's user avatar
0 votes
1 answer
143 views

How do i pass virtual usernames from postfix to procmail?

I'm trying to move spam mails to the junk folder automatically with a procmailrc file. Right now I've got postfix running with virtualmail, storing mailbox-settings etc in mysql: virtual_alias_maps = ...
Ratatouille1945's user avatar
2 votes
2 answers
693 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
0 votes
1 answer
93 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 ...
Daniel Franco's user avatar
0 votes
1 answer
297 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"...
user227963's user avatar
0 votes
1 answer
235 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 [email protected], then no action should be taken. However, if an email arrives and is [anything_else]@domain.com then I ...
user227963's user avatar
1 vote
1 answer
267 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
0 votes
1 answer
130 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 ...
Dave's user avatar
  • 165
0 votes
1 answer
950 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 ...
user1482800's user avatar
0 votes
0 answers
178 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 ...
luke's user avatar
  • 33
-1 votes
1 answer
207 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 ...
Derple's user avatar
  • 121
-1 votes
2 answers
640 views

Log INCOMING mail to server

I have a mailbox on my server, mailbot, that is working fine. Mail to [email protected] works and per the procmailrc file, sends back an autoresponder text file. But I should be able to send to ...
Eric's user avatar
  • 1,127
1 vote
0 answers
350 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 ...
Blob's user avatar
  • 11
0 votes
1 answer
100 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 ...
MikeColley's user avatar
0 votes
2 answers
467 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. ...
dstonek's user avatar
  • 233
1 vote
1 answer
803 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
  • 995
1 vote
1 answer
749 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 user[email protected] by [email protected] becomes: ...
Daniel Kocevski's 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 ...
user1118764's user avatar
0 votes
1 answer
49 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 ...
rs232's user avatar
  • 105
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
  • 575
0 votes
1 answer
108 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 ...
David 天宇 Wong's user avatar
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
  • 815
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,401
1 vote
0 answers
517 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 ...
th3penguinwhisperer's 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 ...
Adaberemchi Aja-Onu's 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......
William Seligman's user avatar
0 votes
2 answers
393 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 [email protected] If the ...
TheDarkKnight's user avatar
6 votes
1 answer
907 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
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
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
0 votes
1 answer
112 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. ...
SarathMS's user avatar
  • 101
4 votes
0 answers
64 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
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
0 votes
0 answers
753 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 ...
EML's user avatar
  • 433
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
0 votes
1 answer
1k 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 ...
simpleuser's user avatar
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
1 vote
1 answer
908 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
3 votes
1 answer
858 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
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
1 vote
2 answers
660 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
  • 328
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 [email protected] are turned into tickets by RT4. The process currently breaks down in the send mail step. My server is running fetchmail. The ...
Tiersis's user avatar
  • 11
1 vote
1 answer
802 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. ...
neubreed's user avatar
2 votes
1 answer
63 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
  • 121
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