Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Disabling PHP mail

General questions about VestaCP
Locked
  • Print view
Advanced search
5 posts • Page 1 of 1
David
Posts: 13
Joined: Sat Oct 26, 2013 6:25 am

Disabling PHP mail

Post by David » Fri Feb 07, 2014 8:59 pm

What's the best way of disable outgoing mail completely to prevent any abuse?
Top

skid
VestaCP Team
Posts: 1476
Joined: Wed Apr 06, 2011 11:12 pm

Re: Disabling PHP mail

Post by skid » Sun Feb 09, 2014 7:22 pm

The best way is to stop mail server and remove it from autorun.

Code: Select all

# RHEL/CentOS

service exim stop
chkconfig exim stop

Code: Select all

# Debian/Ubuntu

service exim4 stop
update-rc.d exim4 disable
Top

patstan
Posts: 117
Joined: Wed Jul 30, 2014 10:53 am

Re: Disabling PHP mail

Post by patstan » Tue May 30, 2017 3:10 pm

skid wrote:The best way is to stop mail server and remove it from autorun.

Code: Select all

# RHEL/CentOS

service exim stop
chkconfig exim stop
Although exim is off, i can still send mail with a php script.

Is there any way to disable this not just for one domain, but for all domains/users on the server? (global)
Top

patstan
Posts: 117
Joined: Wed Jul 30, 2014 10:53 am

Re: Disabling PHP mail

Post by patstan » Tue May 30, 2017 3:17 pm

Ok i found an answer. Just simply rename exim.conf to something else. After that, phpmail will not work.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Disabling PHP mail

Post by skurudo » Tue Jul 11, 2017 12:20 pm

There is another way for apache/httpd

Code: Select all

<Directory /dir/to/your/web/root>
...
        php_admin_value sendmail_path "tee mail.out > /dev/null"
...
    </Directory>
Top


Locked
  • Print view

5 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password