Page 2 of 4

Re: disable_functions in php.ini for webmail

Posted: Wed Oct 07, 2009 9:59 am
by biggles
breun wrote:
Anyway, what we're doing might be even more interesting. We're not using Suhosin, but have popen (and exec and all their friends) disabled globally and configure Horde to use SMTP instead of sendmail. Problem solved!
Interesting... How did you do that? I guess it has something to do with horde configuration in /etc/psa-horde/horde/conf.xml

Re: disable_functions in php.ini for webmail

Posted: Wed Oct 07, 2009 10:07 am
by breun
No, not conf.xml, but conf.php. So, /etc/psa-horde/horde/conf.php on Plesk 8 or /etc/psa/webmail/horde/horde/conf.php on Plesk 9.

Change $conf['mailer']['type'] from 'sendmail' to 'smtp' and add this line:

Code: Select all

$conf['mailer']['params']['host'] = 'localhost';
Updates to psa-horde might overwrite this change.

Re: disable_functions in php.ini for webmail

Posted: Wed Oct 07, 2009 10:20 am
by biggles
Works like a charm! Thanks a lot!

Re: disable_functions in php.ini for webmail

Posted: Thu Dec 17, 2009 5:02 pm
by breun
With the latest update of psa-horde (psa-horde-3.1.7 build92091210.12) for Plesk 9 the path to conf.php has changed to /etc/psa-webmail/horde/horde/conf.php

Apply the change again there.

Re: disable_functions in php.ini for webmail

Posted: Fri Dec 18, 2009 8:36 am
by faris
Thanks for the update Breun.

Please can this be added to the Wiki? Maybe under "Plesk hints and tips - Horde" (as well as others).

Re: disable_functions in php.ini for webmail

Posted: Fri Dec 18, 2009 9:39 am
by breun
Go ahead, it's a wiki. :)

Re: disable_functions in php.ini for webmail

Posted: Fri Dec 18, 2009 11:22 am
by faris
I've never been able to register on it. I forget what the problem was. I'll try again....

EDIT: Hmm... I seem to be registered on the wiki and have been for some time. Interesting.

Re: disable_functions in php.ini for webmail

Posted: Fri Dec 18, 2009 6:20 pm
by mikeshinn
EDIT: Hmm... I seem to be registered on the wiki and have been for some time. Interesting.
Its your doppelgänger!

Re: disable_functions in php.ini for webmail

Posted: Mon Jan 25, 2010 6:23 pm
by breun
On some servers we use max_load and per_source limits in /etc/xinitd.d/smtp_psa and /etc/xinitd.d/smtps_psa so evildoers cannot overload the server with mail traffic. However, when the server load reaches max_load, this also means webmail users cannot send e-mail. I wanted to configure webmail to use submission (SMTP on port 587), because there are no load limits on that, but somehow setting $conf['mailer']['params']['port'] = 587; does not seem to work (webmail still uses SMTP via port 25). According to various posts I found this setting should work for Horde. Anyone here has any ideas?

Re: disable_functions in php.ini for webmail

Posted: Tue Jan 26, 2010 8:32 am
by faris
Could it be because submission requires auth, and even localhost has to auth?

Faris.

Re: disable_functions in php.ini for webmail

Posted: Tue Jan 26, 2010 8:59 am
by breun
I think you're right, faris. Though I didn't expect Horde to fall back to trying port 25 after trying port 587 without auth and then give an error message about port 25 when it is not available (disabled it for testing), but that might be what's happening here. I'll dig in some more when I have time.

Re: disable_functions in php.ini for webmail

Posted: Mon May 17, 2010 6:29 am
by BruceLee
thanks breun for the solution to get rid of the php limitations.
I have configured to use smtp in horde. But I have a problem with mails people send from horde to an account that is located on the server.
due to graylisting via spamdyke people are not able to send mails wiht this error:
Failed to add recipient: mail@domain.tld [SMTP: Invalid response code received from server (code: 421, response: Your address has been graylisted. Try again later.)]"
127.0.0. is whitlisted.
anyone have a clue how to get rid of this?
thanks for any help

Re: disable_functions in php.ini for webmail

Posted: Mon May 17, 2010 6:35 am
by breun
Since there is no local queue involved when using SMTP sending the message has to succeed at the first try or, well... it will fail. :)

So yeah, graylisting is not compatible with using SMTP for webmail.

Re: disable_functions in php.ini for webmail

Posted: Mon May 17, 2010 6:40 am
by BruceLee
thanks breun, that makes sence. maybe the submission port would work.
have you tried changing port number in this file to set port 587?
/etc/psa-webmail/horde/imp/servers.php

baesd on:
http://kb.parallels.com/article_22_837_en.html

Re: disable_functions in php.ini for webmail

Posted: Mon May 17, 2010 6:44 am
by breun
Last time I checked Horde configs contain code that hardcode port 25 for SMTP. If you manage to convince Horde to use port 587 you will also need to configure authentication somehow.