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=
Jul 24 07:56:10 f postfix/cleanup[10470]: 2DABBC007CE:
Jul 24 07:56:10 f postfix/qmgr[2839]: 2DABBC007CE:, size=334, nrcpt=1 (queue active)
Jul 24 07:56:10 f postfix/local[10472]: 2DABBC007CE:,, 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.

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: 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.