{ Berbagi, Menulis, Dan Mengajar } Ilmu… » Linux » Aliasing Pada Postfix
Aliasing Pada Postfix
Untuk mengaktifkan aliases cukup mudah. Pertama pastikan baris berikut ada
di /etc/postfix/main.cf
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
Setelah itu edit file /etc/postfix/aliases, tambahkan beberapa baris alias.
# alias default dari postfix
MAILER-DAEMON: postmaster
postmaster: root
bin: root
daemon: root
named: root
nobody: root
uucp: root
www: root
ftp-bugs: root
postfix: root
# tambahan alias sendiri
spawn: sofyan
# Well-known aliases
manager: root
dumper: root
operator: root
abuse: postmaster
decode: root
Selesai edit file tersebut, jalankan perintah newaliases untuk memasukkan alias baru ke dalam postfix, dan setelah itu reload postfix-nya.
# newaliases
# postfix reload
—-
Main.CF
—-
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA’s job.
append_dot_mydomain = no
# Uncomment the next line to generate “delayed mail” warnings
#delay_warning_time = 4h
mydestination = $myhostname, localhost.$mydomain, $mydomain, ptpn.afraid.org
#Where everything is
command_directory = /usr/sbin
mail_spool_directory = /var/spool/mail
daemon_directory = /usr/lib/postfix
queue_directory = /var/spool/postfix
home_mailbox = Maildir/
#mailbox_command = /usr/bin/procmail
mailbox_command = /usr/bin/procmail -a “$EXTENSION” DEFAULT=$HOME/Maildir/
MAILDIR=$HOME/Maildir
#The name of our host
#myhostname = ptpn.afraid.org
#myhostname = id.afraid.org
#myhostname = mail.ptpn-11.com
myhostname = test.ptpn-11.com
#The domain name
#mydomain = ptpn.afraid.org
#mydomain = id.afraid.org
#mydomain = mail.ptpn-11.com
mydomain = test.ptpn-11.com
myorigin = $mydomain
# SENDING MAIL
myorigin = /etc/mailname
myorigin = $myhostname
# RECEIVING MAIL
mydestination = $myhostname, localhost.$mydomain, $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain
mynetworks =127.0.0.1, 192.168.0.0/16
#relay_domains = mail.ptpn-11.com
relay_domains = test.ptpn-11.com
virtual_alias_domains = mail.ptpn-11.com, id.afraid.org, ptpn.afraid.org, test.ptpn-11.com
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_maps = hash:/etc/postfix/virtual
#virtual_mailbox_domains = hash:/etc/postfix/virtual/mysql_virtual_domains_maps.cf
#virtual_mailbox_maps = hash:/etc/postfix/virtual/mysql_virtual_mailbox_maps.cf
#virtual_mailbox_limit_maps = hash:/etc/postfix/virtual/mysql_virtual_quota_maps.cf
#virtual_mailbox_base = /etc/postfix/virtual/
#virtual_transport = virtual
#virtual_uid_maps = static:73
#virtual_gid_maps = static:73
#virtual_minimum_uid = 73
.:GoodLuck:.
Filed under: Linux