Solved

procmail not running .procmailrc file

Posted on 2013-06-03
6
523 Views
Last Modified: 2013-06-03
We just moved onto a new server running Redhat Enterprise 6.3

I can't figure out why my .procmailrc file doesn't get run.  Everything appears to be the same as it was on the old server.

I don't think the problem is with procmail.
I added a VERBOSE=yes and a LOGFILE=tmp to .procmailrc

When I run a test:
procmail DEFAULT=/dev/null VERBOSE=yes .procmailrc </dev/null
the log file tells me that it processed the .procmailrc file.

So I suspect the problem is with sendmail but that looks correct as well.

The permissions on my home folder are 700 and the permissions on my .procmailrc file are 600  So I don't think this is a permissions issue.

The relevant lines in the sendmail.mc file are:
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl

FEATURE(local_procmail,`/usr/bin/procmail',`procmail -t -Y -a $h -d $u')dnl

MAILER(smtp)dnl
MAILER(procmail)dnl

I've run m4 to get it into the sendmail.cf file which has the following lines:
Mprocmail,      P=/usr/bin/procmail, F=DFMSPhnu9, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, A=procmail -Y -m $h $f $u

Mlocal,         P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, A=procmail -t -Y -a $h -d $u

When I send an email to my account it gets delivered to /var/spool/mail instead of getting processed by my .procmailrc file

There's nothing in /var/log/maillog to lead me to suspect anything is wrong.
eg.
Jun  3 12:08:58 [myhostname] sendmail[15653]: r53J8vRX015651: to=<geekdad1@mm.ca>, delay=00:00:01, xdelay=00:00:01, mailer=local, pri=37253, dsn=2.0.0, stat=Sent

We're running selinux on this machine.  That's the one big difference.  Is there any of those config options I need to set?

I'm at a loss what to look for now.  If anyone could spot the problem or point me in the right direction I would appreciate it.
0
Comment
Question by:geekdad1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39217484
Have you trying putting selinux in permissive?
setenforce 0 

Open in new window

Have you check where is your default procmail that points to? I have seen it look at /var/spool/mail/$username instead.

How you config and setup the new server? You may want to compare the environment with the old server.
0
 
LVL 1

Author Comment

by:geekdad1
ID: 39217519
Yep, definitely selinux.  With enforce turned off, it works.

does anyone know the policy needed for sendmail/procmail?
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39217552
Can you post the output -
ls -laZ .procmailrc

Open in new window

Have you check /var/log/audit/audit.log - it should give you an idea.
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 1

Author Comment

by:geekdad1
ID: 39217564
there's absolutely nothing in the audit.log with the word mail in it.  So that was no help.

-rw-------. mailacct mgdsrvcs unconfined_u:object_r:home_root_t:s0 .procmailrc
0
 
LVL 21

Accepted Solution

by:
Mazdajai earned 400 total points
ID: 39217638
You can use restorecon or chcon to restore the fie context. eg

restorecon -Rv .procmailrc 

Open in new window

0
 
LVL 1

Author Closing Comment

by:geekdad1
ID: 39217675
changing the context on the .procmailrc file (and some other files) fixed the problem.  Thanks
0

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question