Page 2 of 2
Re: Cannot create log file and send emails
Posted: 02 May 2014, 11:47
by atrol
Now the same question again, hope you understand it now.
Does sending work if you don't use SMTP?
Check settings PHPMAILER_METHOD_MAIL and PHPMAILER_METHOD_SENDMAIL
Re: Cannot create log file and send emails
Posted: 05 May 2014, 10:04
by worker
atrol wrote:Now the same question again, hope you understand it now.
Does sending work if you don't use SMTP?
Check settings PHPMAILER_METHOD_MAIL and PHPMAILER_METHOD_SENDMAIL
If i run with
PHPMAILER_METHOD_SENDMAIL i receive this error:
"Could not execute: /usr/sbin/sendmail"
If i run with
PHPMAILER_METHOD_MAIL i receive this:
"Could not instantiate mail function."

Re: Cannot create log file and send emails
Posted: 05 May 2014, 16:28
by atrol
Do you have mail or sendmail installed on your system?
Are you able to start mail or sendmail from command line?
Re: Cannot create log file and send emails
Posted: 07 May 2014, 10:36
by worker
atrol wrote:Do you have mail or sendmail installed on your system?
Are you able to start mail or sendmail from command line?
Yes, i have installed and configured sendmail.
I can send emails via command line between users.
Edit:
I changed config_inc.php to
$g_phpMailer_method = PHPMAILER_METHOD_SENDMAIL and received this error
"Could not execute: /usr/sbin/sendmail"
By default sendmail configuration files are located at /etc/mail
How can I change the mantis to point to the folder /etc/mail instead /usr/sbin/sendmail?
Re: Cannot create log file and send emails
Posted: 07 May 2014, 11:24
by atrol
What do you wet when entering the following command
Re: Cannot create log file and send emails
Posted: 07 May 2014, 11:38
by worker
atrol wrote:What do you wet when entering the following command
sendmail is /usr/sbin/sendmail
Re: Cannot create log file and send emails
Posted: 07 May 2014, 19:07
by atrol
Do you get any errors or warnings in web server log?
Re: Cannot create log file and send emails
Posted: 08 May 2014, 13:32
by worker
atrol wrote:Do you get any errors or warnings in web server log?
No. It's all right...

Re: Cannot create log file and send emails
Posted: 08 May 2014, 19:57
by atrol
Any error or warning in mail log?
Re: Cannot create log file and send emails
Posted: 09 May 2014, 11:05
by worker
atrol wrote:Any error or warning in mail log?
In my maillog i have this
"localhost sendmail[32626]: NOQUEUE: SYSERR(apache): can not chdir(/var/spool/clientmqueue/): Permission denied"
I followed this link:
http://stackoverflow.com/questions/1280 ... send-email, I saw the permissions and they are ok.
Only I didn't do the part of SELinux, i don't know what it does and it seems risky. Whenever I change my SELinux, my VM is unbootable.
Re: Cannot create log file and send emails
Posted: 09 May 2014, 11:37
by worker
Sorry for double post but i solved the problem.
I did this:
Code: Select all
#to see Selinux Booleans
getsebool -a | grep mail
and httpd is not allowed to use sendmail.
Code: Select all
#allow_postfix_local_write_mail_spool --> on
#httpd_can_sendmail --> off
#logging_syslogd_can_sendmail --> off
So I used this command:
Code: Select all
setsebool -P httpd_can_sendmail on
Tested and i received all the emails.
Thanks for the support, no doubt that was a big help.

Re: Cannot create log file and send emails
Posted: 09 May 2014, 18:07
by atrol
Thanks for coming back and telling the solution.