2022 Developer Survey is open! Take survey.

Questions tagged [procmail]

Procmail (http://procmail.org/) 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
0 answers
50 views

Procmail with Postfix not working [closed]

We have configured a new Rocky Linux mail server using Postfix which we are happy with. We have installed Spamassassin, from what I can see the spam messages are being edited and left in the users ...
user avatar
1 vote
0 answers
35 views

Can procmail intercept incoming messages to a mailing list and modify it before letting it be delivered to the mailboxes of the members of the ML?

I have an email address (a mailing list actually) with a basic procmail setup enabled. Right now, the procmail just dumps incoming emails to fs. I have a use-case where I want to add a custom string ...
user avatar
1 vote
2 answers
54 views

procmail returning with exit code 0 even if it can't read its config file: How to prevent?

I am dealing with procmail the first time, so I apologize if the following question is stupid. Before I put procmail in production, I am doing a few basic tests. One of them yielded a totally ...
user avatar
  • 2,191
0 votes
0 answers
17 views

nmh: what I miss?

I'm trying to use nmh for mailing. I have created the dirs mkdir -p $HOME/Mail/{cur,tmp,new,inbox} then editing the $HOME/.procmailrc file PATH=/usr/local/bin:/usr/bin:/bin MAILDIR=$HOME/Mail DEFAULT=...
user avatar
  • 10.9k
-1 votes
1 answer
51 views

How can I set a simple forwarding procmail rule based on FROM?

Using Procmail, I would like to add a rule that dictates: If any email comes from this specific email address, in addition to delivering it locally, also forward it to this other email address. My ...
user avatar
1 vote
1 answer
28 views

Procmail: Send ticket numbers to an address named "ticket@domain"?

I am looking to do the following: User sends an email to 1234@domain Procmail recognizes 1234@domain as an email sent to ticket+1234@domain Procmail recipe handles ticket number and forwards email to ...
user avatar
0 votes
1 answer
99 views

What is the meaning of %F, %T, and %s in fetchmail's mda option?

Browsing through web pages around the World Wide Web, I often come across ~/.fetchmailrc examples such as: poll mail.example.com port 993 proto imap user "max123" password "...
user avatar
  • 1,832
1 vote
1 answer
152 views

How to run procmail in cmdline and provide .eml file as input?

Procmail failed while running my external python script on received email. After that I tried run that script manually and provide the same arguments as procmail - it passed without any problems, so I'...
user avatar
  • 115
0 votes
1 answer
71 views

How to get a filename of copied email by procmail and pass it to a script?

I'm trying to execute script when email arrives my server and pass its filename to that script. First part is done, procmail executes script each time an email arrives. Before executing script it ...
user avatar
  • 115
0 votes
1 answer
331 views

Invoke procmail on spool file using new .procmailrc?

I've recently configured new .procmailrc and .forward files to work with our Postfix mail server. I've tested it with new Emails, and the new .procmailrc is properly filtering and forwarding as ...
user avatar
  • 13
1 vote
1 answer
359 views

Procmail cyrillic conversion

I wrote a script for fetchmail to take mail from an account and pipe the messages to procmail for it to apply filters and save attachments. I used filter for Subject of the message, but I have ...
user avatar
  • 13
0 votes
0 answers
48 views

routing a copy of every mailing list posting to another server

I have a mailing list server running behind Postfix. I'm in the process of upgrading the ML software (on a separate VM) and would like to send it copies of production postings to make sure things are ...
user avatar
2 votes
2 answers
91 views

procmailrc-Killfile for recipient addresses?

I want to block mails with certain recipient addresses using procmailrc (temporary addresses that now only receive spam). I found a code sample for using a killfile/blacklist, but it only applies to ...
user avatar
  • 21
1 vote
1 answer
100 views

Procmail deleting body

I have a procmail recipe which sends the body of a mail to a script. Works well but procmail then sends the mail without the body to my default folder. :0 * ^Subject.*Telemetry rotate$ { :0 bf ! `/...
user avatar
  • 147
0 votes
1 answer
388 views

Postfix not accepting mail from procmail in Centos7?

I have a Centos 7 server setup with Postfix, Spamassassin and procmail. It works fine, it receives and sends email , it passes it to the spam filter and delivers it to the required user or external ...
user avatar
0 votes
0 answers
464 views

Procmail Couldn't create or rename temp file, not receiving mails

I cant receive any mail from outside, here all my settings and outputs: More informations are in the Procmail output, all the permissions is for the user and I dont see anything wrong here... Im ...
user avatar
  • 1
2 votes
2 answers
4k views

procmail save attachment with received date in filename

Every day we receive an e-mail from e.g. foo@example.tld with an attachment, the filename is e.g. report.xlsx How can I save the file with the received date? e.g. 20180131_report.xlsx and how can I ...
user avatar
  • 718
0 votes
2 answers
512 views

Making a Procmail regex recipe for malicious email body text

At work we recently began receiving emails with what looks like malicious code contained in the email body. I'm trying to create a procmail recipe that will use regex to match only the non-word ...
user avatar
  • 1
1 vote
1 answer
63 views

What is the scope of the special case `FLAG ??` override in procmail?

man procmailrc says: variablename ?? Match the remainder of this condition against the value of this environment variable (which cannot be a pseudo variable). A special case is if variablename is ...
user avatar
  • 2,593
2 votes
1 answer
2k views

Forward/Redirect email fetched via fetchmail to gmail

I am on a mac using terminal. I am trying to redirect email from a work email to gmail (the work email only allows IMAP and gmail can only fetch from POP - hence the workaround). I have successfully ...
user avatar
  • 23
0 votes
2 answers
2k views

Using procmail to forward to gmail

I am using fetchmail and procmail to forward email to a gmail account. I am using Mac Terminal. Here is my .fetchmailrc: set no bouncemail poll outlook.office365.com with protocol imap port 993 auth ...
user avatar
  • 23
0 votes
2 answers
365 views

postfix + procmail -- process serially, not in parallel

Trying to design a system that can filter incoming email messages from a syslog server. Need to drop if they appear to be duplicates (throttle them). Procmail pipes them to a perl script for ...
user avatar
1 vote
2 answers
1k views

Processing/sorting mail from a mailbox-file?

I got a mailbox-file ("Mboxrd") created by getmail, and I'd like to "process" it by sorting mail from various (groups of) senders, and move them to separate mailbox-files (I guess 3-5 for now). ...
user avatar
1 vote
2 answers
2k views

How do you use procmail mda to deliver files to be read by mh?

I'm using fetchmail to download email, and using procmail for delivery as the mda. I'd like them to be delivered for use with mh, but procmail seems to deliver them in a manner that mh doesn't ...
user avatar
  • 1,660
3 votes
1 answer
566 views

Procmail does not continue processing untill recipe is finished

Related question reference here Below is my procmail recipe which works fantastic ... :0bf * ^Subject.*register$ | /usr/bin/php -f /root/data/scripts/register.php However, the recipe/script above ...
user avatar
  • 147
0 votes
1 answer
626 views

Procmail error when piping body to php script

I have a procmail recipe that takes the body of a mail and sends it to a php script. However, procmail complains with an error. Here is how it works: The user that needs access to hardware parameters ...
user avatar
  • 147
1 vote
1 answer
562 views

Procmail: find email sent from and to the same address?

Is there a way with procmail (or something else?) to search for email where the from: and to: fields both contain the same address? And can it be done without needing to hardcode each and every email ...
user avatar
3 votes
1 answer
286 views

Why is procmail hanging?

I have a goofy sendmail aliases.local file set up to pass emails to procmail. This is a set up that was working on ancient Solaris systems. Now I am running it on a RHEL6 system: # cat /etc/redhat-...
user avatar
  • 2,103
6 votes
2 answers
7k views

How to create Procmail filter that checks both headers and body

I'm trying to create a Procmail rule based on all of From, Subject and a string in the body: :0 B: * ^From:.*root@example.com.* * ^Subject:.*fixed string in the subject line.* * .*fixed string in the ...
user avatar
  • 172
1 vote
1 answer
993 views

Produce bounce message when Sendmail fails

I'm trying to receive a bounce mail message when an outgoing message cannot reach smtp external server (due to my local internet connection problems). I send emails using: mutt (compose) - procmail - ...
user avatar
  • 91
0 votes
2 answers
278 views

procmailrc and php

This doesn't work. It's supposed to email me.(as a test; what we really want the php file to do is insert into a mySQL database table) The input is a payment notification message from PayPal. (A ...
user avatar
0 votes
3 answers
3k views

How to stop Procmail?

I had an instance that procmail has been running and taking up RAM. I am not using this. Is it possible to stop / uninstall this? I am running CentOS 6.4. Thank you!
user avatar
  • 65
3 votes
1 answer
6k views

how to use procmail as a MDA for postfix? (mailbox_command)

I am trying to setup procmail as a mail delivery agent (MDA) for postfix. I understand that I should use the mailbox_command option in postfix for this, but an internet search revealed contradicting ...
user avatar
  • 258
2 votes
0 answers
68 views

how to prevent procmail listening to the world [closed]

This is part of a larger effort to try and ensure my server is not infected and spamming the internet with spam emails I had a friend take a look at the server and he said "Your procmail is open to ...
user avatar
  • 131
1 vote
2 answers
60 views

Procmail to recognize e-mails which were already copied into a folder

I am working at a place where e-mails are sent to multiple groups very often, which means that e-mails will be filtered into random directories, even in mid-thread if a new group is added to the ...
user avatar
0 votes
1 answer
2k views

Auto-Reply to Messages Sent to Mailing List

Background and Current Situation I inherited a CentOS 5.7 box running Mailman 2.1.9 housing a series of legacy mailing lists. I've been working on moving these lists to other services like Exchange ...
user avatar
  • 3
2 votes
2 answers
1k views

Procmail not running

I'm using: Mutt-kz + Isync + msmtp + spamassassin + Procmail Mutt-kz, Isync and msmtp are working. I cannot make procmail start automatically when mail arrives. I'm doing everything as non-root user ...
user avatar
2 votes
1 answer
112 views

Advanced procmail recipe

I need to write a procmail rule or rules that's a bit beyond the basics. I have Bacula installed and I want all mail where the subject begins with Bacula: Backup OK for to be moved into a folder ...
user avatar
  • 141
1 vote
0 answers
106 views

procmail and libnotify: how to display emails received? [duplicate]

I am trying to get procmail to work with libnotify (notify-send). My .procmailrc has a couple of recipes, which just essentially filter mails into different folders.. nothing fancy. Most of my ...
user avatar
2 votes
2 answers
2k views

How to split existing mailboxes based on date with procmail

I have huge mailboxes I would like to manage based on the age of their content: backup, archival or removal. I would like to split these mailboxes along the date of their contained messages. For a ...
user avatar
  • 883
5 votes
2 answers
1k views

Forwarding my institute mail to gmail?

I wanted to forward emails which comes to my institute mail to my gmail, while keeping the originals in the institute account too. I tried editing my /.procmail file like below: # Forward everything ...
user avatar
  • 315
3 votes
1 answer
2k views

Procmail - auto reply with attachment

I am trying to auto-reply using procmail. I want to send back an HTML form with attachments (images; jpg/png). Is there a simple way to accomplish this? This is my piece of code so far: :0 | ($...
user avatar
  • 199
0 votes
2 answers
608 views

Checking if a mail has arrived, if not then alert

I am using fetchmail in combination with procmail for mail filtering on CentOS where my mail contains various log messages. They serve me so I could search through my mail(logs) for error strings. So ...
user avatar
  • 115
1 vote
1 answer
290 views

I WANT procmail to delay one user's e-mail 10 seconds then continue processing

I use procmail. I wrote my own spam filter in procmail (along with many many recipes). I know this is sounds counter-intuitive but I want to intentionally delay one user's e-Mail about 5 or 10 ...
user avatar
-3 votes
1 answer
187 views

Fetchmail doesn't recognize my procmail binary

My problem: after running fetchmail I get this error: /Users/User/.fetchmailrc:7: syntax error at -d My .fetchmailrc file looks like this: set daemon 300 set nobouncemail set invisible poll pop....
user avatar
  • 27
2 votes
1 answer
3k views

Problem extracting email attachment using munpack

I have fetchmail running perfectly to fetch emails from Gmail, and then I am using procmail to store them in $HOME/Mail/Inbox. In my .procmailrc, I added this code which pipes to munpack to extract ...
user avatar
  • 27
2 votes
1 answer
17k views

Mail filtering with procmail in a postfix/dovecot system with virtual users

I had a postfix/dovecot system with mail users working. After unsuccessfully following a few tutorials online to enable procmail, now I have an unusable system. What I want is to enable procmail ...
user avatar
2 votes
2 answers
9k views

procmail save into a dir and execute a script?

I'm using procmail with Maildir/ and easy rules like the one below to save incoming emails into directories: :0: * ^X-Spam-Status: Yes Spam/ Now I would like a desktop notification on new emails in ...
user avatar
  • 2,436
5 votes
3 answers
1k views

How to grab the oldest unread message from `mail` in a script?

In a script I am trying to finish writing now, I need to get the oldest unread message from the current user's mailbox (specifically, I need the subject line for this project). After extracting the ...
user avatar
  • 1,658
0 votes
1 answer
420 views

Job started by procmail does not appear in ps-output and cannot be stopped, even not after reboot

For testing purposes I called procmail by my .forward file |/usr/bin/procmail and by the rules in .procmailrc it started a job named "start", which was simply an infinite loop while true do ...
user avatar