procmail testing

Robert Moskowitz rgm at htt-consult.com
Tue Jan 21 23:27:28 UTC 2014


On 01/21/2014 02:06 PM, Ed Greshko wrote:
> On 01/22/14 03:37, Robert Moskowitz wrote:
>> So I changed the run time to 11am, and procmail DID drop something into /var/spool/mail/rgm, but mutt says it is not a valid mailbox. I have emailed one of my smtp oldtimers for help, but meanwhile here is what is going into my mail (anyone see any obvious mail format problem?):
>>
>> From: "(Cron Daemon)" <rgm>
>> To: rgm
>> Subject: Cron <rgm at lx120e> rsync -tvz ftp.rfc-editor.org::rfcs/*.txt /home/common/ietf/rfcs
>> 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"
>> RFCs_for_errata.txt
>> rfcxx00.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
> As I think I mentioned in the December thread, procmail doesn't add any additional headers that a standard MTA would.  For example there is no "Date" header.
>
> To add headers you can always use formail.  Not sure what exactly mutt is looking for...  But try this....
>
> cat d1.letter | formail -a "Date: `date`" | procmail -f cron

The following seems to work:

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

This produced a valid mailbox.  At least so far.  We will see what 
happens tonight after a couple cron jobs...

 From cron  Tue Jan 21 15:21:04 2014
From: "(Cron Daemon)" <rgm>
To: rgm
Subject: Cron <rgm at lx120e> rsync -tvz ftp.rfc-editor.org::rfcs/*.txt 
/home/commo
n/ietf/rfcs
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <XDG_SESSION_ID=4>
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>
Status: O
Content-Length: 147
Lines: 4

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

sent 26 bytes  received 124,898 bytes  35,692.57 bytes/sec
total size is 365,871,233  speedup is 2,928.75


thanks




More information about the users mailing list