From server-manager:
- Configuration -> E-mail -> Change e-mail delivery settings
--> SMTP Server
From terminal (maybe - I'm just reading back what I entered in server-manager...)
First, display the current values in case something goes wrong...
config show SMTPSmartHost
config show smtp-auth-proxy
...then set the values you want to use.
* Replace the fields enclosed in <>
* The password is stored in plain text.
config set SMTPSmartHost <smtpserver>:<port>
config set smtp-auth-proxy service Debug disabled Passwd <your-relay-account-password> Userid <your-relay-account> status enabled
signal-event email-update
Related settings (if your SME server is in "server-gateway" mode)
- The SME will block all outbound SMTP traffic from LAN clients that is not relayed through the SME itself if you enable the SMTP Proxy (Security -> Proxy status -> SMTP proxy status)
- You can create firewall rules to block incoming traffic
--> incoming smtp traffic can be restricted by setting 'AllowHosts' for qpsmtpd
config setprop qpsmtpd AllowHosts <IP1>,<IP2>,<IPRange/xx>- Creating rules to block outgoing traffic is trickier - there is a section of the firewall wiki page about this, but the content may be out of date:
https://wiki.koozali.org/Firewall#Block_outgoing_IPs_or_mac_addressesIf your SME is in server-only mode you could configure the SMTP traffic restrictions in the network firewall...