So I'm running this script as the user "mailfilt". I've installed a custom selinux rule to get this user to work with Postfix. I see in maillog:
Code: Select all
dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Permission denied (euid=494(mailfilt) egid=490(mailfilt) missing +r perm: /var/run/dovecot/auth-userdb, euid is not dir owner)
So I thought running the dovecot-lda command as root would fix things. In /etc/sudoers:
Code: Select all
mailfilt ALL=/usr/libexec/dovecot/dovecot-lda
But now I get
Code: Select all
server1 postfix/pipe[2829]: BA4BC7FDD3: to=<kbocek@kbocek.com>, orig_to=<test@hbs.biz>, relay=mailfilt, delay=9.7, delays=0.09/0.01/0/9.6, dsn=5.3.0, status=bounced (Command died with status 126: "/etc/postfix/mailfilt.sh". Command output: /etc/postfix/mailfilt.sh: line 138: /usr/bin/sudo: Permission denied )
Is there something I'm doing wrong getting the user mailfilt to run sudo?