I was testing ability to send incoming emails to another server after spam-check.
Enabling Relay, Relay all and specifying Relayhost for Domain attempts to follow simple backup MX scenario: it relays messages to first MX record.
Shouldn't it be relaying to/through Relayhost when it is specified?
https://sourceforge.net/p/postfixadmin/wiki/Relay_domains/
I just made unbound return MX record with host I want to relay to as quick workaround.
We use relayhosts sender dependent. I don't understand the link to Postfixadmin.
If you want to relay a domain, you'd need to mark it as backup mx. We could rename that to "relay domain" etc.
@nupplaphil is this what you try to archive? It could be enough to just create a relay_transport map in SQL. Like... returning "relay:" (the current default) for all except for those with relayhost defined. We just return the same stuff as we do for sender_dependent_default_transport then.
I wrote this a few hours ago and forgot to hit "Comment" 馃憤
Ultimately I want to make relay for the certain domain to another host. Don't care who sends as long as they pass rspamd and domain is listed or is an alias:
Added to mailcow (host A) domain is being relayed to the host B.
It is either my understanding is different or there is a mix of terminology and outcome here:
The link to postfixadmin shows that there is a different flag for the relay-relay scenario contrary to relay-to-MX scenario.
Is relayhost there to filter incoming emails to be allowed from the relayhost with additional auth?
Ah that's similar to what I try to achieve.
@andryyy it's not that simple. As lavdnone wrote, the relay has to be internal in case a Relayhost is set. But it should not get used for the outbound relaying, as the standard settings are.
So I used the transport_map in the main.cf of postfix, but just in case relaying for inbound Mails is set, I called it 'recipient_dependent_default_transport_maps' ;-)
@lavdnone maybe the enhancement at #1086 will help you too
@nupplaphil thanks, yes #1086
though I thought it is already working with relayhost and didn't want to make my mailcow differ even more
guess andryyy can shed the light on what is relayhost doing there at all, relayhost seem to mean the host which emails are relay through - if it is something else we better clarify and rename
relayhost is the host emails should be relayed to after they are received, but when backup MX is enabled it relays to/through first MX not through relayhost.
But that's not a relayhost anymore. That's more like forwarding you can archive by setting up a filter to forward all mails.
The option "Backup MX" does place a domain in relay_domains, so that's pretty much exactly what a relay domain should do. :-)
Edit: @lavdnone It is still correct to assume we use relay:relayhost when a relayhost was setup. I will fix that.
Thanks.
When I add relay host and select Relay all recipients it automatically selects Relay domain (which is think is Backup MX itself)
Maybe it should be when Backup MX is selected Relayhost goes to blank (cancels out).
If Relay all recipients can't be selected without Relayhost or Backup MX option.
If Relay all recipients and Relayhost are in it should relay emails to Relayhost.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.