SID-00734: Cannot get sendmail to work...
| Status: |
Answered |
TWiki version: |
4.3.2 |
Perl version: |
v5.10.0 built for i386-linux-thread-mult |
| Category: |
CategoryEmail |
Server OS: |
Linux piazzi 2.6.30.10-105.fc11.i686.PAE |
Last update: |
16 years ago |
I get a error whenever the Twiki tries to email... eg user registration
Try user reg... Thank for Registering page includes
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ERROR: Exit code 19968 from TWiki::cfg{MailProgram} at /var/www/twiki/lib/TWiki/Net.pm line 375.
Too many failures sending mail\n\n
You are NOT logged-in and your account is, or soon will be deactivated.\n
Your e-mail address must be valid to register successfully. <<<<<<<<<<<<<<<<<<<<<
in the apache error_log...
Program mode requires special privileges, e.g., root or
TrustedUser., referer:
http://piazzi.phas.ubc.ca/twiki/bin/view/TWiki/TWikiRegistration
Nothing seems to appear in mailllog
Configure: {MailProgram} /usr/sbin/sendmail -t -oi -oeq
{SMTP}{MAILHOST} -- blank
{SMTP}{SENDERHOST}-- blank
tried adding class "Tapache" to /etc/mail/sendmail.cf
restart sendmail (also added apache /etc/mail/tusted_users)
NO JOY.
Can user "apache" send mail from a shell?
[apache@piazzi bin]$ /usr/sbin/sendmail -t -oi -oeq
grieve@astroPLEASENOSPAM.ubc.ca
To:
grieve@astroPLEASENOSPAM.ubc.ca
YES this works.
^D
I checked the recommend file access permissions for various sendmail files/dirs
I'm stumped..
--
GerryGrieve - 2010-01-28
Discussion and Answer
Ok I cracked it... The culprit seems to be SELinux, which I had (unusual for me) running in
ENFORCING mode.
If you disable it or configure it to allow hpptd to send mail....
>getsebool -a | grep sendmail
httpd_can_sendmail --> off
>setsebool httpd_can_sendmail=on
or with the GUI
System-> Adminstration-> SELinux Management
select the Boolean tab & check the appropriate box
Security vs Convience -- Tough choice eh?
--
GerryGrieve - 2010-01-29
I am glad you figured it out, happy TWiki'ing! Yes, SELinux can give some surprises.
--
PeterThoeny - 2010-01-29
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.