Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge trparky's Avatar
    Join Date
    Apr 2003
    Posts
    190

    Default Forcing PHP users to send email via SendMail

    Ok, we all know that CPanel implemented a way for us to detect who is sending an email via a PHP script even if it is being executed as nobody. I'm talking about the X-Source, X-Source-Args, and X-Source-Dir headers.

    Unfortunately, sometimes email that is sent via PHP sometimes is missing those headers. The only thing that I can think of is that they are bypassing SendMail which is the way that Exim is getting the data for those headers. The only way that I know of other than using SendMail is by directly connecting to SMTP using the PHP TCP/IP functions.

    Is there a way to force people to use SendMail to send an email and not bypass it without breaking a lot of scripts?
    Tom Parkison – Rochen Ltd. – tom@rochen.com
    - Reseller Plans & Multiple Domain Solutions
    - http://www.rochen.com

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge trparky's Avatar
    Join Date
    Apr 2003
    Posts
    190

    Default

    Any ideas?
    Tom Parkison – Rochen Ltd. – tom@rochen.com
    - Reseller Plans & Multiple Domain Solutions
    - http://www.rochen.com

  3. #3
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    WHM > Tweak Security > SMTP Tweak > Enable

    Note that this basically blocks outgoing connections on port 25 except for root and mailman. Users must therefore use the MUA (i.e. the sylinked sendmail to exim binary).

    To do this it uses iptables entries, so if you're already using a software firewall, you will need to adjust it (disable the iptables firewall, then enable the securty tweak to see what it does).
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  4. #4
    Member
    Join Date
    Mar 2003
    Posts
    427

    Default

    I just enabled SMTP Tweak and choose NOT to allow connections to port 25.

    I can still send mail using the SMTP server.
    I'm sending from my local computer (outlook)

    Did I miss something or shouldn't it prevent this also or is it just
    for local scripts etc ?

Similar Threads & Tags
Similar threads

  1. forcing php script to run with dedicated IP
    By BigLebowski in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-07-2011, 09:47 PM
  2. Not able send email to any of AOL users
    By crazyaboutlinux in forum E-mail Discussions
    Replies: 23
    Last Post: 03-13-2009, 09:09 AM
  3. Do I need exim running on port 587 for AOL users to send email?
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 06-07-2007, 06:01 AM
  4. Users cant send email / relayhosts not updating
    By nyjimbo in forum cPanel and WHM Discussions
    Replies: 23
    Last Post: 03-30-2005, 05:39 PM
  5. [FEATURE REQUEST] Email all Users - option to not send duplicates?
    By spaceman in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-30-2004, 10:41 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube