allow outgoing SMTP for single domain
I prefer to have ' Restrict outgoing SMTP to root, exim, and mailman..' enabled but now I have one single php-script that needs to send emails unsing an extenal server
this script is sending mails from different sender-address and each address has it's own username and password
so is there any way to only allow this little part to use outgoing smtp and prevent other scripts / users to do so?
thanks
-
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 -
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 -
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 -
Thanks for the additional details. I meant that the PHP script should authenticate as a local user to workaround this restriction. 0 -
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 -
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 -
I would love to understand what you mean! I need to send the mail using an external mailserver! 0 -
You can make this to work if you use ConfigServer Security and Firewall (CSF). 0 -
I'm using CSF - how you think I could get it work? 0 -
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 -
great, this seem to work now :-) 0 -
Thanks for the suggestion, @quietFinn !!! 0
Please sign in to leave a comment.
Comments
13 comments