Mail won't deliver after accidentally chowning /etc

2 posts / 0 new
Last post
#1 Wed, 07/24/2019 - 07:03
Matrix

Mail won't deliver after accidentally chowning /etc

I accidentally managed to "chown virtualservername /etc -R" and then used "for p in $(rpm -qa); do rpm --setugids $p; done" which seemed to restore ownership to just about everything. However now no mail is delivered to any mailbox on the server. /var/log/procmail.log is always empty.

After sending a test piece of mail to a mailbox, maillog shows:

Jul 24 07:56:10 f postfix/pickup[2837]: 2DABBC007CE: uid=0 from=<root>
Jul 24 07:56:10 f postfix/cleanup[10470]: 2DABBC007CE: message-id=<20190724115610.2DABBC007CE@f.myserver.com>
Jul 24 07:56:10 f postfix/qmgr[2839]: 2DABBC007CE: from=<root@f.myserver.com>, size=334, nrcpt=1 (queue active)
Jul 24 07:56:10 f postfix/local[10472]: 2DABBC007CE: to=<somemailbox.myvirtualserver@f.myserver.com>, orig_to=<somemailbox@myvirtualserver.com>, relay=local, delay=0.16, delays=0.1/0.01/0/0.05, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Jul 24 07:56:10 f postfix/qmgr[2839]: 2DABBC007CE: removed

After this, the email is never seen again. Does anyone have any suggestions? Thanks.

Thu, 07/25/2019 - 21:43
Matrix

After many days I have figured it out!

I eventually deduced procmail wasn't being run at all (clue: /var/log/procmail.log was always empty, and it wouldn't recreate after being deleted). Then I saw this post: https://www.virtualmin.com/node/8801 which mentioned to do this:

chmod 6755 /usr/bin/procmail-wrapper

Apparently the special bits were critical, and not mentioned by other posts I've seen that said just to set it to 755. I guess when rpm restored one of the packages, it changed the permissions on the wrapper file.