I am running a Leap 15.2 server with dovecot supporting the IMAP service. Incoming email retrieved with fetchmail is passed to dovecot as the MDA and which invokes sieve. The sieve script redirects a specific address as follows:
if address :is "to","cc","bcc"] "skylabdown@mydomain.com"
{
redirect "email@anotherdomain.com";
}
This gives the following error:
sendmail: fatal: execvp /usr/sbin/postdrop: Permission denied
sendmail: warning: command "/usr/sbin/postdrop -r" exited with status 1
The permissions for postdrop are:
-rwxr-sr-x 1 root maildrop 14512 Dec 9 22:54 /usr/sbin/postdrop
It does not matter if I run the fetchmail command as either root or the intended user. The error is the same.
My gut feel is that it’s going to be a group permission or something like that but I don’t know what they should be.
I have other filters later on in the script and they all run fine.
I don’t really know the answer, and it is many years since I last played with sendmail configuration.
From the error message, it looks as if there is a problem with “/usr/sbin/postdrop”. I don’t have that file here, probably because I have not installed “dovecot”.
Maybe try:
file /usr/sbin/postdrop
to see what kind of file this is. Perhaps it is not an actual executable file.
The command is designed to run with set-group ID privileges, so that it can write to the maildrop queue directory and so that it can connect to Postfix daemon processes.
Check the destination of your stuff. On my machine this would be something in /var/spool/postfix/maildrop/ as I found by running ‘postdrop -v’.
If that were the problem, I would expect a message from “postdrop”. But the error message appears to be from “execvp”, which suggests that “postdrop” cannot even be started.
Those are the permissions I have too. Apparmor is disabled.
I have setup dovecot on another server and it works fine and there are virtually no differences in the configs. All permissions and users/groups are the same.