Victor Oñate | 14 Mar 04:24 2014

Echa un vistazo a los datos adjuntos que envié a usted


Echa un vistazo a estos accesorios que le envié a través de documentos. Para el acceso inmediato HAGA AQUÍ y firmar con su correo electrónico.

Victor Oñate
procmail mailing list   Procmail homepage:
procmail <at>
Danny | 24 Feb 14:56 2014

Recipe for Proftpd

Hi Guys,

I have been trying for a while now to catch Proftpd from incoming mail. However,
I still miss all of it.

Here is my recipe

* ^(From|Cc|To|X-Loop|Sender|Bcc|X-BeenThere|Return-Path):.*proftp-user <at> lists\.sourceforge\.net

Any pointers?

Thank You

Matěj Cepl | 1 Feb 14:50 2014

Does anybody have a corpus of malformed email messages fixable by formail?


I have a Python script ( where I need to
read possibly malformed mbox messages. I use subprocess.Popen() and
/usr/bin/formail to clean up them to be correct mbox messages (with
correct leading From line etc.). Now I try to run tests for my script on
Travis-CI, where I don't have installed formail. Actually, I learned now
that I can run apt-get install procmail in .travis.yml. But still, I
started to think whether I couldn’t fix my script to be purely Pythonic.
I know that

    msg = email.message_from_string(original_msg)

works as a poor-man’s replacement for `formail -d`. Now, I would like to
know how reliable replacement it is. Does anybody have (or know about) a
corpus of poorly formatted messages which can be fixed by formail to
test upon it?

Thanks a lot for any reply,


--, Jabber: mcepl <at>
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC

I didn't attend the funeral, but I sent a nice letter saying
I approved of it.
      -- Mark Twain
procmail mailing list   Procmail homepage:
procmail <at>
Geoff Soper | 25 Jan 01:21 2014

How to extend ^TO_

in various places within my procmail recipes I have the following string:

How can I define this as a variable that I can use repeatedly in my 
recipes and how do I include it in my recipes?

LuKreme | 22 Jan 06:49 2014

SMS Forwarding

Does anyone happen to have a handy SMS forwarding recipe that works well?

T-Mobile allows you to email to <number> <at> but, unlike what it used to do, it doesn’t cut the
message off, so if I forward a 10K message of some HTML crap, I get a big ol blog of text, so some smarts in the
SMS forwarding would be nifty.


'I don't like to ask them questions.' 'Why not?' 'They might give me
answers. And then what would I do?'
Robert Moskowitz | 21 Jan 23:17 2014

Using procmail to send cron output to local mailbox

A little background:

With Fedora 20, an MTA is no longer installed by default.  The 
assumption is, only servers really need an MTA, and if a client system 
needs one, the system owner is smart enough to figure out to install one.

Well I use cron for various tasks on my notebook, and I am trying to get 
local delivery to work without an MTA.  After days of going back and 
forth on the Fedora user list, it has come down to procmail able to 
deliver mail locally without an MTA.  So in /etc/sysconfig/crond I have:

# Settings for the CRON daemon.
# CRONDARGS= :  any extra command-line startup arguments for crond
CRONDARGS=-m "/usr/bin/procmail"

and this works in terms of getting content into /var/spool/mail/rgm, but 
the content is not a valid mailbox for mutt to process it.  Here is the 
content of my mailbox.  Note no starting or ending blank line(s):

From: "(Cron Daemon)" <rgm>
To: rgm
Subject: Cron <rgm <at> lx120e> rsync -tvz*.txt 
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <XDG_SESSION_ID=45>
X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/1000>
X-Cron-Env: <LANG=en_US.utf8>
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <MAILTO=rgm>
X-Cron-Env: <HOME=/home/rgm>
X-Cron-Env: <LOGNAME=rgm>
X-Cron-Env: <USER=rgm>

skipping non-regular file "rfc-ref.txt"

sent 3,486 bytes  received 125,267 bytes  15,147.41 bytes/sec
total size is 365,871,233  speedup is 2,841.65


Is there a procmail receipt that will create a proper mailbox?  I want 
to see if I can do this before throwing in the towel and installing 
John Hancock | 30 Nov 18:22 2013

Intermittent file locking issue causes procmail and then postfix timeout

  One of my end users has an intermittent problem with a procmail
script.   It does the following:

:0 wc:     #copy all mail to "bkp"

Most of the time, this works without issue.  Every few weeks, the
following message appears in the procmail log:

procmail: Forcing lock on "bkp"
procmail: Timeout, was waiting for "bkp"

Sometimes procmail is able to release the lock (or the lock disappears)
before the postfix command timeout occurs (which is now set to an hour).
Otherwise the mail delivery fails with:

relay=local, delay=2001, delays=0.78/0.05/0/2000, dsn=5.3.0,
status=bounced (Command time limit exceeded: "procmail -t -f-")

The bkp file is very large (over 10 gigabytes) but the issue is
intermittent with several weeks in between instances of the problem and
doesn't occur for other users who have the same command and gigabyte
sized files (although none are as large as this).

The user would prefer not to use MailDir style folders and wants to keep
this as a mbox file.  Is there a way I can re-write the script to allow
mail delivery to the user's mailbox while procmail waits on the lock for
bkp? I've tried:

:0c      #copy all mail to "Saved"
 :0 w:

Which will allow two emails before it procmail stops accepting email
again if I manually lock bkp for testing.  If I release the lock before
postfix times out, the mail will be delivered.  I would also like to
determine the root cause of the locking issue, but I haven't been able
to trigger it yet except by locking the file myself.

Thanks for your help,
-John Hancock
Larry Stone | 23 Nov 22:12 2013

Procmail recipe causes fatal error after upgrade to Mac OS X Mavericks

I’ve been running a mail server using Procmail for local delivery on a Macintosh for many years (client
version of OS X despite the hoops you have to jump through to turn it into a server). Apple has provided
pre-built versions of procmail, formail, mailstat, and lockfile in /usr/bin for many years and my
recipes have needed little work over that time.

Today I upgraded from Mountain Lion (OS X 10.8.x) to Mavericks (OS X 10.9). Started seeing problems with
mail delivery and determined that my recipes that call formail to send a new message were causing the
problem (problem occurs whether or not the recipe fires). Procmail would error saying "detected source
and destination buffer overlap” and mail would be deferred by Postfix. Tried building from source
(3.22) and had the same problem. Copied Mountain Lion versions from backup and all is fine. I’m thinking
since it’s talking about buffer overlap that some default build option in OS X Mavericks is causing a
buffer to be too small (but I may not know what I’m talking about here).

Error from log:
Nov 23 09:34:38 procmail[1310]: detected source and destination buffer overlap
Nov 23 09:34:40 postfix/local[1250]: 38663572D4E0:
to=<lstone19 <at>>, relay=local, delay=2.5, delays=0/0/0/2.5, dsn=4.3.0,
status=deferred (Command died with signal 6: "/usr/bin/procmail”)

A problem recipe (this one is looking for a particular CC recipient and a couple of keywords in a line of the body):
:0BHc :
* ^Cc:.*railbird.*
* .*table.* finished.*
        MSGTEXT=`formail -I "" | grep -i table | grep -i finished`
        | (formail -brt  -I 'From: lstone19 <at>' \
        -I 'Subject: WRGPT' -I "To: larry <at>" ; \
        echo $MSGTEXT) | $SENDMAIL -t

Any thoughts?


Larry Stone
lstone19 <at>

Attachment (smime.p7s): application/pkcs7-signature, 5621 bytes
procmail mailing list   Procmail homepage:
procmail <at>
Harry Putnam | 13 Nov 22:08 2013

How to get a count of processed msgs into procmail.log

How can I get a count of processed mail into the procmail.log?

I've tried this sort of thing in a test .procmailrc inside a sandbox.

(From the top of the test .procmailrc)
  Processing <$FILENO>)

In my sandbox setup that works just fine with FILENO printing the

In that setup procmail is being run like this:

Probably most readers here will know better than I do, what is happening
in the cmdline below... but just a brief sketch in case ...

 ( Note: `' is just a script that turns 1 message per file
   setup into mbox format)

1) `ls' is displaying file names, most recent first, from a stock of
   single file per msg files

2) `sed' is limiting the number of files displayed so I can feed as few
   or many as I like.

3) is feeding the selected file names as an mbox stream to
   formail and procmail as shown `ls -t |

    sed -n '2,8p'` | 

     formail -e -s procmail -p -m /projects/reader/proc/trc

In that setup, the lines I posted near the top of this message:

   Processing <$FILENO>)
 Cause procmail to enter into procmail.log the running total of the msgs being

 But the same lines used in my actual mail setup will not do the same

 I'm guessing the cause is the way in which procmail is called is
 different in some way.

 In the actual setup, procmail is called in the usual way with a
 .promailrc file in ~/  

 Perhaps it is in order to show the whole top of the .procmailrc 
 used in my actual mail setup:

  Processing <$FILENO>)


  TRAP='formail -XMessage-ID: && date +"%b %d %T%nSTOP"'


The use of $FILENO in this case just shows an empty pair of '< >'s
entered in the log.

Can anyone suggest why that happens or perhaps suggest a better way to
keep a running count of msgs processed in the log?
Eric Smith | 12 Nov 20:53 2013

copy attachments to two destinations


I want to extract attachments from each email to two target
folders. The following recipe gives this error:
| /usr/bin/uudeview -i +a  -p /home/eric/ -e .html -
|  /usr/bin/uudeview -i -p /someplace_else -e .html -

procmail: Executing "/usr/bin/uudeview,-i,+a,-p,/home/eric/,-e,.html,-"
Loaded from /tmp/uupGHdpf: 'xxxV.' (xxx.):  part 1   Base64
Loaded from /tmp/uupGHdpf: 'xxxV.' (xxx.): somefile.docx part 1   Base64
Opened file /tmp/uupGHdpf
Opened file /tmp/uupGHdpf
procmail: Executing "/usr/bin/uudeview,-i,-p,/someplace_else,-e,.html,-"
Note: No encoded data found in /tmp/uu7TiE5d

I am only getting a file in my home dir and not to "someplace_else".

Is there a better procmail recipe?
Or a different approach completely, perhaps with something other than uudeview?


Best regards,
Eric Smith
Mobile: 00 31 6 455 09313 - Tel Wageningen: +31 317 728888
LuKreme | 21 Oct 18:05 2013

Any list headers

I want to match if there are any list headers in an email. Something like if ^List-* 

I seem to recall that the match on the left side of a ?? Had to be a full header? So List-* wouldn't work. 


This is my signature. There are many like it, but this one is mine.