User Tools

Site Tools


How to set relay for postfix

  • Using command lines :

Create a file :

$nano /etc/postfix/sender_canonical

Edit (example) :

root@localmachine <tab>
root <tab>

Create /etc/postfix/sender_canonical.db file :

$postmap hash:/etc/postfix/sender_canonical

Add sender_canonical variable to /etc/postfix/

$postconf -e "sender_canonical_maps=hash:/etc/postfix/sender_canonical"

Restart Postfix

$systemctl restart postfix

IMPORTANT : In my enterprise the server is in DMZ, so i need to disable NAT when, DMZ > Trust.

  • Using webmin

Set with webmin > server > postfix > General Options

Set with webmin > server > postfix > Canonical Mapping

Entry for “tables for sender addresses” : hash:/etc/postfix/sender_canonical

- modified date : 2017.06.12 -

postfix_for_relay.txt · Last modified: 2017/07/06 15:32 by admin