Last Modifide Saturday, 29-Jan-2005 19:07:49 JST

玄箱/HG(KURO-BOX/HG) - mailサーバの立ち上げ(postfix他)

SMTPにpostfix IMAPにcourier-imapを導入します。

postfix SMTP

  1. パッケージの導入
    # apt-get install postfix
  2. 追加設定
    # vi /etc/postfix/main.cf
    ※ローカルからのアクセスを許可する
    mynetworks = 127.0.0.0/8 → mynetworks = 192.168.0.0/24,127.0.0.0/8 に修正
    ※MailファイルをMbox形式ではなく、Maildir形式とするために以下を追加
    home_mailbox = Maildir/
  3. webmin用管理モジュールの追加
    # apt-get install webmin-postfix
  4. posffixの再起動
    /etc/init.d/postfix restart
  5. 確認
    # mail aiteno@address.jp
    Subject: test mail
    this is test mail from local
    .
    Cc:

courier-imap IMAP

  1. パッケージのインストール
    apt-get install courier-imap
  2. 設定変更
    # vi /etc/courier/authdaemonrc
    daemons=5 → daemons=1 に修正
  3. courier-imapの再起動
    /etc/init.d/courier-authdaemon restart

参考資料

  • 不正第三者中継をチェックしてくれるサイト
  • postfixの設定関連(設定ファイルの場所/etc/postfix/main.cf)
    • ホスト名:サーバーのホスト名を指定する(インターネット上のDNSで牽けるホスト名)
      myhostname = name.ddo.jp等
    • ドメイン名:同上
      mydomain = name.ddo.jp
    • メール送信元の設定
      myorigin = $myhostname
    • メールの受信範囲の設定
      inet_interfaces = all
    • メールの最終目的地とみなすドメイン名の指定
      mydestination = $myhostname, localhost.$mydomain, $mydomain
    • リレーを許可する対象を指定
      mynetworks = 192.168.0.0/24, 127.0.0.0/8
    • aliasesファイル・データベースの指定
      alias_maps = hash:/etc/aliases
      alias_database = hash:/etc/aliases
    • メールBOXの指定
      mail_spool_directory = /var/spool/mail

  • postfixの設定(携帯電話対策手順)
    1. TRANSPORTの使用
      # vi /etc/postfix/main.cf
      transport_maps = hash:/etc/postfix/transport ←コメントをはずす
    2. TRANSPORTするドメインとSMTPサーバをtransportファイルで指定
      # vi /etc/postfix/transport
      docomo.ne.jp :[mail.host.ne.jp]
      ezweb.ne.jp :[mail.host.ne.jp]
    3. postmapを使って transport.dbを作成
      # postmap /etc/postfix/transport
    4. postfixの再起動
      # /etc/init.d/postfix restart

  • courier-imapの4つのモードのon/off(設定ファイルの場所/etc/courier/)
    • POP3
      vi /etc/courier/pop3d
      POP3DSTART=YES or NO
    • POP3 over SSL
      vi /etc/courier/pop3d-ssl
      POP3DSSLSTART=YES or NO
    • IMAP
      vi /etc/courier/imapd
      IMAPDSTART=YES or NO
    • IMAP over SSL
      vi /etc/courier/imapd-ssl
      IMAPDSSLSTART=YES or NO

参考リンク

postfix / courier-imap

玄箱全般

Debian GNU/Linux 公式サイト

[an error occurred while processing this directive]
(C)2005 青山葵 (Aoi AoYama) / Blue Hibiscus Web Pages

[ 自宅サーバーWebRing |ID=265 前後5表示乱移動サイト一覧 ]