yum update (?php?) stopping Horde webmail sending

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

yum update (?php?) stopping Horde webmail sending

Unread post by coolemail »

Hi,

I did a yum upgrade, and since then, my Horde webmail is not sending. The error is
There was an error sending your message: Failed to open sendmail [/var/qmail/bin/sendmail] for execution.
There appears to be a lot of conflicting info, and I hope that someone on this forum will be able to help.

http://kb.parallels.com/en/2278 suggests removing exec and open. Mine says:
[root@plesk2 ~]# grep -i disable_functions /etc/php.ini /etc/php.d/* /usr/local/etc/php.ini
/etc/php.ini:disable_functions = , dl , exec , escapeshellcmd , passthru , pfsockopen , popen , posix_kill , posix_mkfifo , posix_setuid , proc_close , proc_open , proc_terminate , shell_exec , system , leak , posix_setpgid , posix_setsid , proc_get_status , proc_nice , show_source
grep: /usr/local/etc/php.ini: No such file or directory
[root@plesk2 ~]#
so do I remove "exec" from that line and then save that file?

http://forum.parallels.com/showthread.p ... n+sendmail says
I found that horde will use 'popen' function to open /var/qmail/bin/sendmail.

And will use 'escapeshellcmd' function to send an e-mail.

After removed those two functions from 'disable_functions' parameter (/etc/php.ini), horde and mail system will be OK.

Try it.

Regards.

THEN LATER IN THAT FORUM

Dasmo suggestion is correct:

Quote:
edit /usr/share/psa-horde/config/conf.php.

Change the line that says:
$conf['mailer']['type'] = 'sendmail';

to

$conf['mailer']['type'] = 'smtp';
but you also need the line:

$config['mailer']['params']['host'] = 'localhost';

Restarted Apache and it all works great now!
So far, I have only amended /usr/share/psa-horde/config/conf.php

$conf['mailer']['type'] = 'sendmail';
to
$conf['mailer']['type'] = 'smtp';

that did not work, so I then added the line

$config['mailer']['params']['host'] = 'localhost';

which had not been there before.

I have re-started Apache and SMTP Server and IMAP/POP3 server, but still no joy.

Can anyone advise please? Should I remove "exec" from /etc/php.ini?
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Re: yum update (?php?) stopping Horde webmail sending

Unread post by coolemail »

using http://kb.parallels.com/en/2278 as the guide, I removed "exec" from disable_functions and restarted Apache. No joy!!

Then I commented out that whole line, and webmail is now working fine. However, I'm sure that is a huge security risk, so can anyone let me know what I should do next to get webmail working as it should, but with disable_functions as it should be?

Thanks to all in anticipation.
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Re: yum update (?php?) stopping Horde webmail sending

Unread post by coolemail »

then I tried removing only popen, and that did not work. I got the following in the maillog:
Mar 30 17:54:59 plesk2 imapd: IMAP connect from @ [127.0.0.1]INFO: LOGIN, user=me@mydomain.com, ip=[127.0.0.1], protocol=IMAP
Mar 30 17:47:52 plesk2 qmail-queue[6796]: scan: the message(drweb.tmp.wR5M2j) sent by --@plesk2.mydomain.com to rcpts should be passed without checks, because contains uncheckable addresses
Mar 30 17:47:52 plesk2 qmail-queue-handlers[6797]: Handlers Filter before-queue for qmail started ...
Mar 30 17:47:52 plesk2 qmail-queue-handlers[6797]: from=--@plesk2.mydomain.com
Mar 30 17:47:52 plesk2 qmail-queue-handlers[6797]: hook_dir = '/var/qmail//handlers/before-queue'
Mar 30 17:47:52 plesk2 qmail: 1238431672.355777 new msg 14814518
Mar 30 17:47:52 plesk2 qmail: 1238431672.355904 info msg 14814518: bytes 658 from <--@plesk2.mydomain.com> qp 6798 uid 48
Mar 30 17:47:52 plesk2 qmail-queue-handlers[6797]: starter: submitter[6798] exited normally
Mar 30 17:47:52 plesk2 qmail: 1238431672.392437 end msg 14814518
and the message was not sent. There was no error message, but it was not delivered.

removed both "exec" and "popen", and it still did not work - same as above.

removed both "exec" and "popen" and "escapeshellcmd", and it did work. My file now has:
disable_functions = , dl , passthru , pfsockopen , posix_kill , posix_mkfifo , posix_setuid , proc_close , proc_open , proc_terminate ,
shell_exec , system , leak , posix_setpgid , posix_setsid , proc_get_status , proc_nice , show_source
Is there any problem with these 3 remaining removed from /etc/php.ini?
Post Reply