Re: Using procmail to send cron output to local mailbox
Robert Moskowitz <[email protected]>
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <[email protected]> |
On 01/21/2014 02:17 PM, Robert Moskowitz wrote: > 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@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 > > ========================================= > > 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 > postfix... CRONDARGS=-m "/usr/bin/procmail -f cron" seems to be doing the trick.