• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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