Relayhost depending on sender

Still learning a lot of Linux ropes. I send ALL mail out to Spamtitan to protect my email server.
I know I can use the default relayhost (direct) and map other domains or mailboxes to use a relayhost.
But is it possible to do the reverse?
For example I want to use Spamtitan as the default relayhost but occasionally make one emailbox go direct (to temporarily get round SpamTitan delivery rates for instance).
Of course if I map one mailbox to the localhost it results in a loop.
May well be a limitation of Postfix itself, but if I am missing something, I’d appreciate a steer.
Cheers
john

SYSTEM INFORMATION
OS type and version Linux 5.14.0-427.31.1.el9_4.x86_64 on x86_64
Webmin version 2.202

Postfix has very few limitations. Look up sender dependent relay host setting of Postfix.

Configuring this will let you do what you have described.

1 Like

Thanks for the reply Calport. I have tried (using Sender Dependent Transport Mapping), but the problem is that when I add the entry to send directly, I get a loop back.
For domain xxx.com, I use the syntax "@xxx.com smtp:[xx.xx.xx.xx] )IP address of localhost.
I can use direct delivery as default and map to the SpamTitan server on a per domain basis - but not the otherway round :frowning_face:

Note if this help, the docs say use the IP of Virtual server’s address but it my also work on a external IP address.

Thanks Stefan,
But no, use of the virtual server address loops back on itself if the default is to use an external relay host.
I think I have resigned myself to the fact that mapping only works if the default is to send mail direct (no relay host)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.