Smart Host - Exim Cpanel - SMTP external outgoing mail server

Stuart Elliot

Member
Jan 3, 2016
11
2
3
United Kingdom
cPanel Access Level
Root Administrator
I have the below setup that routes all outgoing mail from my server to an external service, Does anyone have any idea how i would modify this to so it will only use the below settings when emailing to outlook.com / outlook.co.uk ???

Much help would be appriecated.. Thank you very much

Section: AUTH
smtp2go_login:
driver = plaintext
public_name = LOGIN
client_send = : **** : ****

Section: ROUTERSTART
send_via_smtp2go:
driver = manualroute
domains = !+local_domains
#ignore_target_hosts = !*.outlook.com
#domains = *.outlook.com : *.outlook.co.uk
transport = smtp2go_smtp
route_list = * mail.smtp2go.com

Section: TRANSPORTSTART

smtp2go_smtp:
driver = smtp
port = 587
hosts = mail.smtp2go.com
hosts_require_auth = mail.smtp2go.com
 

double_t

Member
Dec 2, 2007
19
2
53
I just need to send **ALL OUTGOING ** emails to an external smarthost, but must be port 225 instead of 25, that's it
 

Stuart Elliot

Member
Jan 3, 2016
11
2
3
United Kingdom
cPanel Access Level
Root Administrator
in your any reason for using port 225 ?

if you have WHM - goto exim config manager.
Click Advanced Editor

Search for "Section :AUTH" and below type in this

smtp2go_login:
driver = plaintext
public_name = LOGIN
client_send = : username : password

Then Search for "Section: ROUTERSTART" and below type

Section: ROUTERSTART
send_via_smtp2go:
driver = manualroute
domains = !+local_domains
transport = smtp2go_smtp
route_list = * mail.externalmailserver.com

DONT PASTE THIS // route_list = * sends all emails via above address
DONT PASTE THIS // domain only sends to external people, so it still delivers locally if needed.


Then Search for "Section: TRANSPORTSTART" and below type

smtp2go_smtp
driver = smtp
port = 225
hosts = mail.externalmailserver.com
hosts_require_auth = mail.externalmailserver.com


Any link to smtp2go is just a label! it doesnt matter as long as you put your external mail settings it, that setup should send all mail.
 

double_t

Member
Dec 2, 2007
19
2
53
Worked like a charm ... I just use IP auth, so I didn't use your suggested auth settings .... thanks mate.

I really like more Postfix ... in one single line like this you have t all done:

relayhost = [gw.emailer.com]:225

I do use port 225 due to internal auth system, not important the reason :)

Thanks !
 
  • Like
Reactions: cPanelMichael