1

I am attempting to use procmail to route email for virtual users into different folders (specifically, I want to deliver to a user's spam folder if spam assassin assigns a high score). The MTA is sendmail. I have this in /etc/aliases:

test:       | procmail /var/spool/mail/virtualusers/test/procmailrc

/etc/smrsh looks like this:

lrwxrwxrwx 1 root root 17 Jun 30 23:34 procmail -> /usr/bin/procmail

When I send email to test, I get a bounce; the relevant line in maillog is this:

Aug  4 14:20:22 example smrsh: uid 8: attempt to use "procmailrc" (stat failed)

(uid 8 is mail).

Here is the permissions of the procmailrc file:

drwxrwxr-x 3 mail dovecot 4096 Aug  4 14:19 test
-rw------- 1 mail dovecot 160 Aug  3 22:38 test/procmailrc

I originally had 664 permissions on procmailrc, but I read a server fault post that suggested procmail refused to process recipes if the permissions were greater than 600. I got the same error message in either case.

To be sure that the error message was due to the command line argument in /etc/alises, I changed /etc/aliases to specify '| procmail .../test/procmailrcqqq' then the error message in maillog refers to procmailrcqqq.

I know sendmail can see that directory, because if /etc/aliases says:

test: /var/spool/mail/virtualusers/test/test.mbox

the mail delivers OK. And I know sendmail can execute procmail because for system users, mail is delivered according to /home/{user}/.procmailrc.

Can anyone discern what smrsh is complaining about?

Thanks! Bob

Blob
  • 11
  • 3
  • Check `man smrsh` on your system : `/etc/smrsh` is typical but some distributions use `/etc/mail/smrsh`. – AnFi Aug 04 '19 at 22:55
  • Under what account is `smrsh` running? Perhaps your permissions are too *strict* actually. – tripleee Aug 05 '19 at 14:57
  • Anyway, Procmail doesn't care if the file is world readable. It will refuse to run if the file is *writable* by another user. – tripleee Aug 05 '19 at 15:01

0 Answers0