User Tools

Site Tools


doc:appunti:linux:sa:postfix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
doc:appunti:linux:sa:postfix [2021/11/12 10:53] – [Relay domains] niccolodoc:appunti:linux:sa:postfix [2022/05/24 09:50] – [Relay domains] niccolo
Line 441: Line 441:
 <file> <file>
 smtp.example.org login_name:password smtp.example.org login_name:password
 +</file>
 +
 +Se non si installa il pacchetto **libsasl2-modules** l'errore nei log è qualcosa di simile:
 +
 +<file>
 +warning: SASL authentication failure: No worthy mechs found
 +SASL authentication failed; cannot authenticate to server smtp.example.org[10.11.12.13]: no mechanism available
 </file> </file>
  
Line 719: Line 726:
 user@local.domain  smtp:remote.realay.host user@local.domain  smtp:remote.realay.host
 </file> </file>
 +
 +===== 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**:
 +
 +<code>
 +sender_dependent_relayhost_maps = hash:/etc/postfix/sender_dependent_relayhost_maps
 +</code>
 +
 +Each line of the file must contain a regular expression matching the sender address and the name or address of the relay host:
 +
 +<file>
 +username@rigacci.org     relay2.rigacci.org
 +*@domain2.org            relay3.rigacci.org
 +</file>
 +
 +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