Discussion:
[courier-users] setuid/setgid problem, mail from website not sent
Bernd Plagge
2017-07-05 18:33:21 UTC
Permalink
Hi

I'm trying to send mail from website mail, or webmail.
However, sending doesn't work,

Log entries:

Jul 06 00:25:45 linde lighttpd[1182]: setuid/setgid: Operation not permitted
Jul 06 00:25:45 linde lighttpd[1182]: /cgi-bin/FormMail.pl: close sendmail pipe failed, mailprog=[/usr/lib/sendmail -oi -t] at (eval 9) line 108.

The courier sendmail program:
s -l /usr/sbin/sendmail
-rwxr-sr-x 1 root courier 59120 Jan 26 2015 /usr/sbin/sendmail


What can I do to solve this problem?

Best regards,
Bernd
Gordon Messmer
2017-07-05 19:09:17 UTC
Permalink
Post by Bernd Plagge
What can I do to solve this problem?
First, "setenforce permissive" and send a message, or examine
/var/log/audit/audit.log to see if this is an SELinux denial.

Next, in permissive mode, use "tail -f /var/log/audit/audit.log | grep
AVC" to watch the log while you send another message. Take all of the
output and pass it as input to "audit2allow -M lighttpd_sendmail". That
will create a new SELinux policy module that you can load to allow
lighttpd to send email.
Sam Varshavchik
2017-07-05 21:55:26 UTC
Permalink
Post by Bernd Plagge
Hi
I'm trying to send mail from website mail, or webmail.
However, sending doesn't work,
Jul 06 00:25:45 linde lighttpd[1182]: setuid/setgid: Operation not permitted
Jul 06 00:25:45 linde lighttpd[1182]: /cgi-bin/FormMail.pl: close sendmail
pipe failed, mailprog=[/usr/lib/sendmail -oi -t] at (eval 9) line 108.
s -l /usr/sbin/sendmail
-rwxr-sr-x 1 root courier 59120 Jan 26 2015 /usr/sbin/sendmail
What can I do to solve this problem?
Permissions on the sendmail wrapper should be setuid root, not setgid.
Loading...