• 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.

Resolved Relay mail for specific domain

rgruyters

Basic Pleskian
I want to set a relay host for a specific domain. As far as I can find this is not possible within the Plesk Panel.

I have edit the main.cf file and updated the transport_maps setting from:

Code:
transport_maps = , hash:/var/spool/postfix/plesk/transport

to:

Code:
transport_maps = hash:/etc/postfix/custom_transport, hash:/var/spool/postfix/plesk/transport

This is whats in the custom_transport.db:

Code:
# postmap -s /etc/postfix/custom_transport
abc.nl	relay:relay.host:587
#

When I try to sent email from (e.g.) test@abc.nl to any remote address it still sends it directly, not via relay host.

If I change this to:

Code:
*  relay:relay.host:587

It works fine! Same goes when I set the relayhost setting in the main.cf file.

What goes wrong?!

I'm running Plesk version 12.5.30 on a CentOS server.
 
Looks like I have solved it.

For those who are interesting how I done this, I have added the following variable to the main.cf:

Code:
sender_dependent_relayhost_maps = hash:/etc/postfix/sdr_custom_transport

In the sdr_custom_transport i have added:

Code:
@abc.nl  relay.host:587

That is it!
 
Looks like I have solved it.

For those who are interesting how I done this, I have added the following variable to the main.cf:

Code:
sender_dependent_relayhost_maps = hash:/etc/postfix/sdr_custom_transport

In the sdr_custom_transport i have added:

Code:
@abc.nl  relay.host:587

That is it!

Hi, i only did these steps with
Plesk Onyx 17.5 and Debian 8.8
I made this Changes within Postfix but nothing happens.
Still can't send Emails.

What am I missing.

Maybe @UFHH01 has an Idea? :-X

More over i had a message from Monitoring which said Mailserver down.
So service and Status of Postfix was fine, but i couldn't send any Emails more.
Whole Server couldn't send.
 
Last edited:
Hi daanse,

depending to your postfix version, you are as well able to use the setting "DUNNO":

Example:
Code:
eMail-Address@YOUR-DOMAIN.COM   DUNNO
@YOUR-DOMAIN.COM           relay.host
... which is documented as well here:


... while you might consider to use the example configuration for postfix 2.7 ( or newer ):
Code:
eMail-Address@YOUR-DOMAIN.COM           smtp
@YOUR-DOMAIN.COM           smtp:[relay.host]

( where "relay.host" should equal the MX - entry from your host! ;) )
 
@UFHH01,

i have mail_version = 2.11.3 :)

I just undo everything (from here) because Mailserver didn't worked anymore.
Could you kindly show up some steps, i.e. where i have to change Values in order to get this running correctly?
:-X
 
Hi daanse,

thank you, so at the moment its not possible?
I am actually not sure and have to study for myself how this can be resolved with the old postfix versions and due to the fact that Plesk Team Member are already working on the Debian stretch support for Plesk, I don't really see the need to provide different solutions for outdated postfix versions, sorry. :(
 
For years I'm relaying specific domains to other servers by using transport. Used the same method in sendmail.
I even add entries to that file using a 20-minute cronjob.


grep gmail /etc/postfix/transport
Code:
gmail.com              smtp:mail.relay.com:25
.gmail.com             smtp:mail.relay.com:25

This works for the destination address. Never needed it for the sender address.
By using the other directive in main.cf that was proposed, but the same syntax in the transport file it should work.

Code:
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_transport
 
Last edited:
Back
Top