Lincle

/etc/postfix/main.cf

Oct 24th, 2015
802
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. queue_directory = /var/spool/postfix
  2. command_directory = /usr/sbin
  3. daemon_directory = /usr/libexec/postfix
  4. data_directory = /var/lib/postfix
  5. mail_owner = postfix
  6. myhostname = mail.example.com
  7. mydomain = example.com
  8. myorigin = $mydomain
  9. inet_interfaces = all
  10. inet_protocols = all
  11. mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, seo.$mydomain, lp.$mydomain #サブドメインもここに設定
  12. virtual_alias_domains = website.com
  13. virtual_alias_maps= hash:/etc/postfix/virtual
  14. unknown_local_recipient_reject_code = 550
  15. relay_domains = $mydestination
  16. #relayhost= [mail.example.com]:587 #転送せずにそのまま送信
  17. alias_maps = hash:/etc/aliases
  18. alias_database = hash:/etc/aliases
  19. recipient_delimiter = +
  20. home_mailbox = Maildir/
  21. mailbox_command = /usr/bin/procmail
  22. mail_name = unknown
  23. biff = no
  24. append_dot_mydomain = no
  25. debug_peer_level = 2
  26. debugger_command =
  27.          PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
  28.          ddd $daemon_directory/$process_name $process_id & sleep 5
  29. newaliases_path = /usr/bin/newaliases.postfix
  30. mailq_path = /usr/bin/mailq.postfix
  31. setgid_group = postdrop
  32. html_directory = no
  33. manpage_directory = /usr/share/man
  34. sample_directory = /usr/share/doc/postfix-2.10.1/samples
  35.  
  36. smtpd_banner = $myhostname ESMTP unknown
  37. #smtpd_sasl_type = dovecot
  38. #smtpd_sasl_path = private/auth
  39. smtpd_sasl_auth_enable = yes
  40. smtpd_sasl_local_domain = $mydomain #$myhostname => $mydomain に変更
  41. smtpd_sasl_security_options = noanonymous
  42. broken_sasl_auth_clients = yes
  43. smtp_tls_CAfile = /etc/pki/CA/cacert.pem
  44. smtp_tls_security_level = may
  45. smtp_tls_loglevel = 1
  46. smtpd_tls_cert_file = /etc/pki/CA/certs/mail.example.com.crt
  47. smtpd_tls_key_file = /etc/pki/CA/private/mail.example.com.key
  48. smtpd_tls_session_cache_database = btree:/etc/postfix/smtpd_scache
  49. maps_rbl_reject_code = 550
  50. default_rbl_reply = $rbl_code <$recipient>: Recipient address rejected: User unknown in local recipient tables
  51. smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
  52. # 10/25 22:10 追加
  53. smtpd_sasl_password_maps = hash:/etc/postfix/sasl_passwd
  54. smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
  55. # 迷惑メール対策として、最低でもHELOの応答がない場合は、破棄するようにします。
  56. smtpd_helo_required = yes
  57. # HELO or ELO で応答したホスト名をファイルで検索し、該当する名前があれば、その指示に従うようにします。
  58. smtpd_helo_restrictions = check_helo_access hash:/etc/postfix/helo,permit
  59.  
  60. ## /etc/postfix/virtual
  61. #
  62. # real user: hogehoge
  63. # imaginary user: info1, info2, mail
  64. #
  65.  
  66. website.com anything
  67. info1@website.com hogehoge
  68.  
  69. webdesign.com anything
  70. info2@webdesign.com hogehoge
  71. mail@webdesign.com hogehoge
  72. hogehoge@seo.webdesign.com hogehoge
  73.  
  74. chocolate.com anything
  75. hogehoge@chocolate.com hogehoge
  76. hogehoge@lp.chocolate.com hogehoge
  77.  
  78.  
  79. ## /etc/postfix/helo
  80. # OK or REJECT
  81. <YOUR IP ADDRESS> OK
  82. 200.90.xx.xx REJECT
  83.  
  84.  
  85. #REMEMBER
  86. $postmap /etc/postfix/virtual
  87. $postmap /etc/postfix/helo
RAW Paste Data