• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Question Relay all outgoin mail of a specific domain to an external SMTP service

D. Molina

New Pleskian
Hi,

I have a server with plesk onyx and Centos. I use Postfix for email. In it I have 12 different domains (subscriptions)...
And I would like to use sendinblue for one of them. Let's say "domain1.com"

Sendinblue gave me this config:

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:user:.pass
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = may
header_size_limit = 4096000
relayhost = smtp-relay.sendinblue.com:587

I know how to do it for the whole server using main.cf, but how can I tell the server to relay all the outgoing email from domain1.com to this external server and leave the rest working with local smtp service?

It would be lovely if plesk creates a place to configure external smtp service for each subscription...


Thanks a lot for your help!!!!!
 
Hi D. Molina,

( untested !!! )

I could think of the solution, to use "sender_dependent_relayhost_maps" at your "/etc/postfix/main.cf" - configuration file, which is able to override the serverwide "relayhost" - settings for specific eMail - accounts.


Possible example:
Code:
smtp_sasl_password_maps = hash:/etc/postfix/sender_dependent_relayhost_sasl_pass
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_dependent_relayhost
... where you ( manually ) create the file "/etc/postfix/sender_dependent_relayhost" with the example content:
Code:
#sender_dependent_relayhost_sasl_pass
[smtp-relay.sendinblue.com]:587   YOUR-PROVIDED-PASSWORD-CREDENTIALS:THIS-IS-THE-SENDINBLUE-PASSWORD
and
Code:
#sender_dependent_relayhost
[email protected]           [smtp-relay.sendinblue.com]:587
...while you setup "relayhost" inside the "main.cf" to
Code:
relayhost =

Code:
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = may
header_size_limit = 4096000
.. should stay as it is.


Pls. don't forget the commands:
Code:
/usr/sbin/postmap /etc/postfix/sender_dependent_relayhost_sasl_pass
and
Code:
/usr/sbin/postmap /etc/postfix/sender_dependent_relayhost
... to finalize your new configuration and restart postfix afterwards.​
 
Back
Top