procmail testing

Robert Moskowitz rgm at htt-consult.com
Tue Jan 21 16:25:45 UTC 2014


 From old message:


On 12/30/2013 06:50 PM, Ed Greshko wrote:
>
> First of all, let me reiterate one thing.  "sendmail" does not do local delivery by itself.  It relies on another program to do this.  In the default configuration (sendmail.mc) on Fedora it is defined to use procmail for local delivery.
>
> Now, if you (pl) would do a bit of man page reading you'd find in "man crond"....
>
>         -m   This  option  allows  you  to  specify a shell command to use for
>                sending Cron mail output instead of using sendmail(8)  This  com‐
>                mand must accept a fully formatted mail message (with headers) on
>                standard input and send it as a mail message  to  the  recipients
>                specified  in the mail headers.  Specifying the string off (i.e.,
>                crond -m off) will disable the sending of mail.
>
> So, you can edit /etc/sysconfig/crond to contain....
>
> CRONDARGS=-m/bin/procmail
>
> systemctl restart crond.service
>
> Now, the only "problem" is that procmail cannot initially create files in /var/mail.  So, to get this to work you'll need to do, as root....
>
> touch /var/mail/username
> chown username:mail /var/mail/username
>
> I know this works with procmail but not sure about mailx.  You can certainly test....
>
> So, you don't need sendmail.  procmail will do just fine.

So I installed procmail, and did the test:

cat d1.letter |procmail

and sure enough I got:

You have new mail in /var/spool/mail/rgm

Great. I could view the mail with cat. So I ran mutt, and mutt 
complained that /var/spool/mail/rgm is not a mailbox.

So what is missing? What is mutt saying was not done in constructing 
/var/spool/mail/rgm?




More information about the users mailing list