Misc/メールサーバー構築 Ubuntuの場合 の変更点


#contents

*Postfixセットアップ [#o6c672dc]

インストールはUbuntuインストール時に指定

**main.cf [#v6217cc2]

 # See /usr/share/postfix/main.cf.dist for a commented, more complete version
 
 
 # Debian specific:  Specifying a file name will cause the first
 # line of that file to be used as the name.  The Debian default
 # is /etc/mailname.
 #myorigin = /etc/mailname
 
 queue_directory = /var/spool/postfix
 command_directory = /usr/sbin
 mail_owner = postfix
 default_privs = nobody
 unknown_local_recipient_reject_code = 550
 home_mailbox = Maildir/
 mail_spool_directory = /var/spool/mail
 
 
 smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
 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
 
 readme_directory = no
 
 # TLS parameters
 smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
 smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
 smtpd_use_tls=yes
 smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
 smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
 
 # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
 # information on enabling SSL in the smtp client.
 
 myhostname = localhost.localdomain
 alias_maps = hash:/etc/aliases
 alias_database = hash:/etc/aliases
 mydestination = localhost
 # DNSで作ったすべての名前を列挙
 relayhost = xxx
 # プロバイダのメールサーバー等のリレー先を書いておく
 mynetworks = 127.0.0.0/8 xxx.xxx.x.x/24 [::ffff:127.0.0.0]/104 [::1]/128
 # 自分のネットワーク名も付け加えておくことによりリレーできるようにする
 # mailbox_command = procmail -a "$EXTENSION"
 mailbox_size_limit = 0
 recipient_delimiter = +
 inet_interfaces = all

**OB25B対策のためには [#tdc7c9d8]

[[http://tech.ckme.co.jp/mail.shtml:http://tech.ckme.co.jp/mail.shtml]]
OB25B対策が今後役に立つかも

まだ実際には設定してないけれども…

*IMAP4サーバー構築 [#r02477de]

慣れているのでcourier-imapにする。

 sudo apt-get install courier-imap
 sudo apt-get install courier-imap-ssl courier-ssl

ちなみに sslのまえは courier-imap 単独で入れたり remove したり… とくになにか影響はないと思うけれども

over SSL のみ有効にしたいため

 sudo vi /etc/courier/imapd

 IMAPDSTART=NO

としておく。パスワードをUNIXパスワードと別にするのはSSL化してるのでいいやという結論で。

**SSL用のpemkey作り直し/サーバー名対応 [#f03b0d1a]

Ubuntuは CA.sh が最初から入っている。

 /usr/lib/ssl/misc/CA.sh

あとは [[Misc/SSL証明書]] を参考。ちなみに demoCA/serial の中身は 01 (適時変更)しておく。そうしないとサーバー名/シリアル同じ場合証明書が無効といわれる。

*参考サイト [#s937757c]

注意)このバージョンのsafariではjavascriptがうまく動作しないので、recaptchaはページ切り替え版を利用しています。
リロード   新規 編集 差分 添付 複製 改名   トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS