doc:appunti:linux:sa:postfix
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
doc:appunti:linux:sa:postfix [2022/01/20 10:06] – [Smarthost (relayhost)] niccolo | doc:appunti:linux:sa:postfix [2022/05/24 09:50] – [Relay domains] niccolo | ||
---|---|---|---|
Line 726: | Line 726: | ||
user@local.domain | user@local.domain | ||
</ | </ | ||
+ | |||
+ | ===== Relay by sender ===== | ||
+ | |||
+ | It is possibile to select a different relay path for messages based on sender address. Add the directive **sender_dependent_relayhost_maps** to **main.cf**: | ||
+ | |||
+ | < | ||
+ | sender_dependent_relayhost_maps = hash:/ | ||
+ | </ | ||
+ | |||
+ | Each line of the file must contain a regular expression matching the sender address and the name or address of the relay host: | ||
+ | |||
+ | < | ||
+ | username@rigacci.org | ||
+ | *@domain2.org | ||
+ | </ | ||
+ | |||
+ | Remember to recompile the file whenever you change it using **postmap** (no need to reload Postfix). | ||
+ | |||
+ | All the standard requirements for a relay host are necessary. The relay host must be listed into the SPF record of the mail domain and the relay host should accept the original sender (e.g. via the **mynetworks** Postfix directive). | ||
===== HELO hostname ===== | ===== HELO hostname ===== |
doc/appunti/linux/sa/postfix.txt · Last modified: 2024/02/26 10:18 by niccolo