Hestia server as SMTP relay

Can I use Hestia server as SMTP relay, I have two hestia servers at two different providers, only one of them has access to port 25, can I use this one as SMTP relay and direct all emails from the other server to it, if yes how can I do it. Thank you

https://yourip:yourport/edit/server/
Mail Server
Enable Global SMTP Relay
Enter credentials for server with port 25 access
Update SPF records

Sorry for not creating a new thread but i had a similar situation to the OP where one hestia had outbound port 25 access and the other did not.

I did what @arktex54 outlined and everything works except the DKIM signature.
The relayed message isn’t DKIM signed by the Hestia server on which port 25 is allowed. Is there a way to have the relay HestiaCP server also sign DKIM signatures for emails?

@mih the DKIM Support was checked on the domain for which the SMTP relay was configured if that is what you’re referring to in the docs.

So in order for your message to be signed with dkim when sending through another HestiaCP (Relay) Server you need to add these lines under smtp_relay_smtp section under TRANSPORT CONFIGURATION in the file /etc/exim4/exim4.conf.template like so

######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
begin transports

smtp_relay_smtp:
  driver = smtp
  hosts_require_auth = $host_address
  hosts_require_tls = $host_address
        ### ADDED THE LINES BELOW ###
  dkim_domain = DKIM_DOMAIN
  dkim_selector = mail
  dkim_private_key = DKIM_PRIVATE_KEY
  dkim_canon = relaxed
  dkim_strict = 0

After saving you regenerate exim config files from the template by running update-exim4.conf

Now after restarting exim service you should be able to send emails via another HestiaCP server as a relay with correct DKIM headers.

Hope this helps anyone facing this issue.

2 Likes