Postfix

Created Thursday 28 November 2013

  1. Site:
    1. http://www.postfix.org/

Rewrite recipient address of incoming mail in postfix:

  1. + Added to /etc/postfix/main.cf:
    remote_header_rewrite_domain = domain.invalid
recipient_canonical_maps = hash:/etc/postfix/canonical
+ Created file:
    touch /etc/postfix/canonical
+ Contents in /etc/postfix/canonical:
support@domain.co.il support@domain.net
supp@domain.co.il support@domain.net
support@domain.com support@domain.net
+ Commands after:
    postmap /etc/postfix/canonical
    postfix reload
Add user for postfix and WHMCS:
  1. + Create user billing:
adduser billing
+ Add following lines to /etc/postfix/canonical
accountingsupport@domain.net billing@domain.net
accounting@domain.net billing@domain.net
+ Run:
postmap /etc/postfix/canonical
postfix reload
+ Add following line to /etc/aliases
billing: "| php -q /var/www/whmcs/pipe/pipe.php"
OR (to set default permissions for file creation)
billing: "| (umask 022; php -q /var/www/whmcs/pipe/pipe.php)"
http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html
+ Run:
postalias /etc/aliases

http://www.postfix.org/header_checks.5.html



Backlinks: