トップ 一覧 検索 ヘルプ RSS ログイン

LN-PostfixAdminの変更点

  • 追加された行はこのように表示されます。
  • 削除された行はこのように表示されます。
! Postfix Admin
Download
*https://sourceforge.net/projects/postfixadmin/files/
*http://postfixadmin.sourceforge.net/
Settingup
*http://hp.vector.co.jp/authors/VA022911/tec/centos/postfixadmin_postfix_dovecot_sqlite.htm
*https://www.rouge.gr.jp/~fuku/tips/postfixadmin/
*https://server-recipe.com/3611/
----
 sh postfixadmin-cli mailbox add [登録するメールアドレス] --password [アカウントのパスワード] --password2 [アカウントのパスワード] --name [アカウント名] --welcome-mail [ようこそメールを送るか y/n で入力]



! canonical  
 main.cf
 # 書き換えるアドレスの対象
 canonical_classes = envelope_sender, envelope_recipient, header_sender,  header_recipient
 
 # 送信者、受信者双方に適用
 canonical_maps = regexp:/etc/postfix/canonical.regexp
 
 # 送信者のみ書き換え対象
 # sender_canonical_maps = regexp:/etc/postfix/sender_canonical.regexp 

 # 受信者のみ書き換え対象
 # recipient_canonical_maps = regexp:/etc/postfix/recipient_canonical.regexp

----
!sendmail の mailertable を postfix
/etc/postfix/main.cf を修正
 --- ./main.cf   2017-02-14 13:36:32.521705394 +0900
 +++ ./main.cf.orignal   2017-02-14 14:11:51.701327608 +0900
 @@ -678,7 +678,3 @@
  #
  readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
 
 -######################################################
 -transport_maps = hash:/etc/postfix/transport
 -###################################################### 
 
 ## postmap transport

/etc/postfix/transport で 作成
 routing.domain smtp:[xxx.xxx.xxx.xxx]
 # others
 * smtp:[zzz.zzz.zzz.zzz]

DBを更新 
 postmap /etc/postfix/transport

----
!virtual domain

 # vi /etc/postfix/main.cf
 
 virtual_alias_domains = your.domain.name
 virtual_alias_maps = hash:/etc/postfix/virtual
 
 # # /etc/rc.d/init.d/postfix reload
 # # systemctl stop postfix
 # # systemctl start postfix
 # systemctl reload postfix
 
 # vi /etc/postfix/virtual
 
 your.domain.name		anything
 webmaster@your.domain.name	account1
 info@your.domain.name		account2
 
 # postmap /etc/postfix/virtual

----
 linux の場合は
 # mkdir -p /etc/skel/Maildir/{new,cur,tmp}
 # chmod -R 700 /etc/skel/Maildir/
 で追加しておく(新規ユーザ用)
----
! diff -u main.cf.old main.cf
 
 [root@test postfix]# diff -u main.cf.orig main.cf
 --- main.cf.orig        2014-05-03 09:14:21.000000000 +0900
 +++ main.cf     2017-01-16 17:08:00.703646347 +0900
 @@ -10,6 +10,31 @@
  # For best results, change no more than 2-3 parameters at a time,
  # and test if Postfix still works after every change.
 
 +###########################################################################
 +
 +# myhostname = mail.my.domain
 +myhostname = mail.my.domain
 +mydomain = my.domain
 +myorigin = $myhostname
 +
 +inet_interfaces = all
 +# inet_interfaces = 192.168.200.202, 10.0.2.15, 127.0.0.1
 +inet_protocols = ipv4
 +
 +mydestination = $myhostname, localhost.mydomain, localhost, $mydomain
 +
 +mynetworks = 192.168.200.0/24,10.0.2.0/24,127.0.0.1
 +
 +home_mailbox = Maildir/
 +
 +smtpd_recipient_restrictions = permit_networks, reject_unauth_destination
 +
 +##############################################################
 +virtual_alias_domains = test.atori.com, test,h-kimo.net
 +virtual_alias_maps = hash:/etc/postfix/virtual
 +##############################################################
 +###########################################################################
 +
  # SOFT BOUNCE
  #
  # The soft_bounce parameter provides a limited safety net for
 @@ -113,10 +138,10 @@
  #inet_interfaces = all
  #inet_interfaces = $myhostname
  #inet_interfaces = $myhostname, localhost
 -inet_interfaces = localhost
 +#inet_interfaces = localhost
 
  # Enable IPv4, and IPv6 if supported
 -inet_protocols = all
 +#inet_protocols = all
 
  # The proxy_interfaces parameter specifies the network interface
  # addresses that this mail system receives mail on by way of a
 @@ -677,3 +702,6 @@
  # readme_directory: The location of the Postfix README files.
  #
  readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
 +#
 +
 +
 [root@test postfix]#

----
IPv6 off
 sysctl net.ipv6.conf.all.disable_ipv6=1
 sysctl net.ipv6.conf.default.disable_ipv6=1
----
 対象サーバでpostfixのログでエラー等ないか確認
 journalctl -xafu postfix
----
! leap 15
 $ a2enflag POSTFIXADMIN && rcapache2 restart
! Invalid domain ドメイン, and/or not discoverable in DNS の対応
/var/www/html/postfixadmin/config.inc.php 
 $CONF['emailcheck_resolve_domain']='YES';
 ↓
 $CONF['emailcheck_resolve_domain']='NO';
----
! SElinux
 # restorecon /var/log/php-fpm/www-error.log 
 # restorecon -R /var/log/php-fpm/www-error.log 
----
!tips
*http://hp.vector.co.jp/authors/VA022911/tec/centos/postfixadmin_install_sqlite.htm#download
*http://hp.vector.co.jp/authors/VA022911/tec/centos/postfixadmin_postfix_dovecot_sqlite.htm
*
----
*http://hp.vector.co.jp/authors/VA022911/tec/centos/postfixadmin_quota_sqlite.htm
 # doveadm quota get -u user01@example.com
----
Tips

*http://qiita.com/kaoken/items/656df7b9a4e82fdf0163
*http://www.unix-power.net/centos7/postfix.html
*https://open-groove.net/postfix/check-deferred-mail/
*http://qiita.com/softark/items/255c44499cbc247655bc
*http://qiita.com/dumpty-alma@github/items/4a18857c207ee0ca72e4
*http://qiita.com/kobineko/items/b3850ce17495b7bbf329
*https://www.server-world.info/query?os=CentOS_7&p=mariadb&f=2
*http://qiita.com/kaoken/items/656df7b9a4e82fdf0163
*http://qiita.com/kobineko/items/b3850ce17495b7bbf329
*https://open-groove.net/postfix/check-deferred-mail/
*http://wiki.rookie-inc.com/serverapps/postfix/postfix-mysql-dovecot
*http://wiki.rookie-inc.com/serverapps/apache/adminer
*http://hp.vector.co.jp/authors/VA022911/tec/centos/postfixadmin_postfix_dovecot_mysql.htm#sql
*https://e-garakuta.net/techinfo/doku.php/linux/postfix-virtual
*http://hp.vector.co.jp/authors/VA022911/tec/centos/postfixadmin_postfix_dovecot_sqlite.htm
*http://hp.vector.co.jp/authors/VA022911/tec/centos/postfixadmin_postfix_dovecot_mysql.htm
*https://server-recipe.com/3611/#toc2