Skip to main content

allow outgoing SMTP for single domain

Comments

13 comments

  • cPRex Jurassic Moderator
    Hey there! I don't have a way to add an exception to that rule at this time. Could you use the link in my signature to submit a feature request for that? Alternatively, could the PHP script get edited to connect to the server as an authenticated user instead? That would resolve the SMTP Tweak issue, and also ensure the mail doesn't get marked as spam at the recipient side since it would be authenticated.
    0
  • herzla
    Alternatively, could the PHP script get edited to connect to the server as an authenticated user instead?

    how does that work? I mean I use phpmailer and SMTP via TSL and authentication is needet on the external smtp-server..
    0
  • cPRex Jurassic Moderator
    There's many different ways to go about it - while I'm not a PHP developer, this shows one example:
    0
  • herzla
    may there is a misunderstanding.. for sure I send this mails using smtp-authentication! but when I activate 'Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak) ' I can't connect to an external mailserver.. so my question is how to have this setting active and allow an extra user oder domain to connect to an external mailserver - or only allow TSL for all processes and keep Port 25 restricted except for exim, and mailman
    0
  • cPRex Jurassic Moderator
    Thanks for the additional details. I meant that the PHP script should authenticate as a local user to workaround this restriction.
    0
  • herzla
    you say I should authenticate this php-script to run in root-user?? :eek: i feels like you crashed my thread :( the setting means 'Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak) ' when I try to connect to the mailserver using telnet in a cpanel-user-terminal I get routed to localhost when this setting is active..
    0
  • cPRex Jurassic Moderator
    No, you definitely don't want to authenticate as root. When you send an authenticated message through an email address created on the server, that gets handled by Exim, which would be allowed with that option enabled.
    0
  • herzla
    I would love to understand what you mean! I need to send the mail using an external mailserver!
    0
  • quietFinn
    You can make this to work if you use ConfigServer Security and Firewall (CSF).
    0
  • herzla
    I'm using CSF - how you think I could get it work?
    0
  • quietFinn
    I'm using CSF - how you think I could get it work?

    1. Disable "Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak) " 2. In CSF -> Configuration -> SMTP Settings SMTP_BLOCK => ON, SMTP_ALLOWLOCAL => ON, SMTP_REDIRECT => OFF, SMTP_PORTS = 25,465,587 and finally in SMTP_ALLOWUSER add the cPanel user(s) you want to allow to bypass SMTP_BLOCK.
    0
  • herzla
    great, this seem to work now :-)
    0
  • cPRex Jurassic Moderator
    Thanks for the suggestion, @quietFinn !!!
    0

Please sign in to leave a comment.