disable_functions in php.ini for webmail

Support/Development for PHP
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4155
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: disable_functions in php.ini for webmail

Unread post by mikeshinn »

SMTP doesnt need either of those functions, so it doesnt sound like your webmail program is set to use SMTP.
lfenison
Forum User
Forum User
Posts: 29
Joined: Mon Jun 14, 2010 8:39 pm

Re: disable_functions in php.ini for webmail

Unread post by lfenison »

mikeshinn wrote:SMTP doesnt need either of those functions, so it doesnt sound like your webmail program is set to use SMTP.
My webmail is Horde on Plesk and I made these changes, what else needs to be done to use SMTP so I can turn off popen and exec?

Code: Select all

$conf['mailer']['type'] = 'smtp';
$conf['mailer']['params']['host'] = 'localhost';
$conf['mailer']['params']['port'] = 587;
$conf['mailer']['params']['auth'] = true;
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: disable_functions in php.ini for webmail

Unread post by breun »

lfenison wrote:The emails send just fine as long as I enable popen and exec so the SMTP is working ok.
The point is that for security you'll likely want to disable PHP popen and exec because they can be used to execute arbitrary commands. SMTP doesn't need either of those, so reconfiguring your webmail clients to use SMTP instead of sendmail (which is used via popen/exec) allows you to disable popen and exec and have a more secure system.
Lemonbit Internet Dedicated Server Management
Post Reply