lwc:linux:postfix

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lwc:linux:postfix [2025/09/16 08:23] John Harrisonlwc:linux:postfix [2025/10/20 15:40] (current) John Harrison
Line 24: Line 24:
 sudo postfix stop; sudo postfix start; sudo postfix reload sudo postfix stop; sudo postfix start; sudo postfix reload
 </code> </code>
 +=== Alternative allowing multiple from addresses to map to multiple to addresses (better than above solution?) ===
 +from [[https://serverfault.com/questions/147921/forcing-the-from-address-when-postfix-relays-over-smtp]] (example shown):
 +<code>
 +/etc/postfix/main.cf:
 +    smtp_generic_maps = hash:/etc/postfix/generic
 +
 +/etc/postfix/generic:
 +    user@localdomain.local      account@isp.example.com
 +    @localdomain.local          wholedomain@isp.example.com
 +Then do:
 +
 +sudo postmap /etc/postfix/generic
 +sudo /etc/init.d/postfix reload
 +</code>
 +
 === Remap root@localhost to another to address === === Remap root@localhost to another to address ===
   * add ''root:        <EMAILADDR>'' to ''/etc/aliases''   * add ''root:        <EMAILADDR>'' to ''/etc/aliases''
Line 50: Line 65:
     * port 465: ''swaks --to recipient@example.com --from sender@yourdomain.com --server smtp-server --port 465 --tls-on-connect --auth-user 'your_username' --auth-password 'your_password' ''     * port 465: ''swaks --to recipient@example.com --from sender@yourdomain.com --server smtp-server --port 465 --tls-on-connect --auth-user 'your_username' --auth-password 'your_password' ''
     * port 587: ''swaks --to recipient@example.com --from sender@yourdomain.com --server smtp-server --auth-user 'your_username' --auth-password 'your_password' -p 587 --tls''     * port 587: ''swaks --to recipient@example.com --from sender@yourdomain.com --server smtp-server --auth-user 'your_username' --auth-password 'your_password' -p 587 --tls''
 +    * //port 465 is legacy and 587 is the better choice for modern systems//
  
  
  • lwc/linux/postfix.1758029034.txt.gz
  • Last modified: 2025/09/16 08:23
  • by John Harrison