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.)

129 questions
0
votes
1 answer

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... Mail server: CentOS 7.3, running as guest VM on…
0
votes
2 answers

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 sender's domain is not from somecompany.com, then I…
0
votes
1 answer

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. Here's the exact message from the admin: You're…
SarathMS
  • 101
  • 1
0
votes
0 answers

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 specific permissions, but without file ownership,…
EML
  • 423
  • 4
  • 12
0
votes
1 answer

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 normal users can and the imap server is otherwise…
simpleuser
  • 274
  • 1
  • 4
  • 14
0
votes
2 answers

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 something like this: *…
jsf80238
  • 127
  • 5
0
votes
1 answer

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_ "${FROM_}" ; echo To_ "${TO_}" ; echo CC_ "${CC_}" ; echo…
ricksebak
  • 101
  • 1
  • 6
0
votes
1 answer

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 | echo "I have inserted this line into the message." ;…
ricksebak
  • 101
  • 1
  • 6
0
votes
0 answers

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 / procmail to move the email marked as SPAM in a folders…
Andy
  • 11
  • 3
0
votes
1 answer

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. http://william.shallum.net/random-notes/sendmailredirectallmailfordevelopment…
Angus
  • 13
  • 6
0
votes
3 answers

LDA for Exim+SA

I have a mail server running Exim and Dovecot, backed by MySQL for virtual users. Spamassassin is configured and seems to be working reasonably, but sending flagged spams to a "spam" dir for the recipient is not configured. We are using the maildir…
0
votes
1 answer

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 { DROPPRIVS=yes }
Max Muster
  • 337
  • 2
  • 6
  • 27
0
votes
2 answers

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: @domain.tld …
Jimmy Koerting
  • 151
  • 1
  • 8
0
votes
2 answers

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 and editing before they go to the script for…
jfreak53
  • 163
  • 1
  • 4
  • 27
0
votes
1 answer

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* /dev/null Or if I wanted to move to a folder, will…
Peter
  • 1,450
  • 2
  • 17
  • 27
1 2 3
8 9