Jump to content
Froxlor Forum
  • 0
vrt

sendmail_path in vhost

Question

Hello,

maybe i'm blind, but is it really impossible to disable the automatically added "php_admin_value sendmail_path" setting in the vhost.
I have no postfix on my server and send mails via msmtp (added as sendmail path in php.ini) and this:

$php_options_text .= '  php_admin_value sendmail_path "/usr/sbin/sendmail -t -f '.$cmail.'"' . PHP_EOL;  ( In cron_tasks.inc.http.10.apache.php)

overwrites my settings for every domain.

I don't see any possibility to change this behavior with php enabled. This should be an option, because not everyone that runs a webserver runs the mailserver on the same machine.
I can change it in the script, but i think it will be overwritten on next update. 

 

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

it's there so that NO global config is used because we set the customers e-mail address as default sender there (you don't want your root@serverhost address there or similar). Also, this doesn't interfere with having an external mailserver, just install postfix on the webserver and set it up as relay for example

Share this post


Link to post
Share on other sites
  • 0
On 30.11.2017 at 12:38 PM, d00p said:

it's there so that NO global config is used because we set the customers e-mail address as default sender there (you don't want your root@serverhost address there or similar). Also, this doesn't interfere with having an external mailserver, just install postfix on the webserver and set it up as relay for example

Hello,

thanks for your answer, we use xinetd proxys for pop + smtp. We have 500+ users with their domain names as smtp and pop / imap in their email programs (don't ask me why ...).
Thats why we use proxys as "gateway" to the other server. Im not sure if that works with the postfix relay server, but i will check if it fits our needs also.

I see what you are trying to do with this setting and it is a good idea but in our case the customers emails aren't up to date in froxlor (we migrate from an older froxlor/syscp version).
Only as suggestion, if you don't mind: Instead of adding postfix hardcoded, adding the original sendmail_path setting from the php.ini with the added email parameter should help to fit sendmail alternatives also.

Best regards, i love froxlor btw. great work

 

 

 

Share this post


Link to post
Share on other sites
  • 0

Then just edit the PHP-Config and remove the sendmail line...easy as abc :) or adjust it to your needs. This sadly does not work for mod_php users (which you shouldn't use in a shared hosting environment anyway, regarding permissions etc.)

Only other possibility would be to patch the corresponding file generating this entry.

Share this post


Link to post
Share on other sites
  • 0
On 1.12.2017 at 3:56 PM, d00p said:

Then just edit the PHP-Config and remove the sendmail line...easy as abc :) or adjust it to your needs. This sadly does not work for mod_php users (which you shouldn't use in a shared hosting environment anyway, regarding permissions etc.)

Only other possibility would be to patch the corresponding file generating this entry.

I don't know what you mean with editing the php-config, we have our sendmail alternative there as global setting, but that wouldn't make any difference because the vhost setting will still enable sendmail for the customer.

I patched the file, but on a froxlor update it will be overwritten i guess.

 

Share this post


Link to post
Share on other sites
  • 0
13 minutes ago, vrt said:

I don't know what you mean with editing the php-config,

That will only work if you use fcgid/php-fpm. for mod_php you have to patch the froxlor files

14 minutes ago, vrt said:

I patched the file, but on a froxlor update it will be overwritten i guess.

I'm afraid that will be the case, yes

Share this post


Link to post
Share on other sites
  • 0

Just, if anyone runs into the same problem, i tried another idea today.
I replaced /usr/sbin/sendmail with an script:

/usr/bin/yoursendmailalternative -optionalparameters $@
That will give the parameters to the sendmailalternative and doesnt't require to change source code in froxlor

It works and as far as i see there are no other problems.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now




×