3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

開発環境用のメールサーバ構築方法(Postfix + dovecot )

Posted at

外部ネットワークに接続することのない環境でのメールサーバ構築

開発環境用の閉じた世界でのメールサーバ構築
セキュリティ設定等、未完成の状態ですが、jenkins等で通知メールの送受信ができればよい
 という環境のために作ったメールサーバ

Postfixの設定

/etc/postfix/main.cf
myhostname = mail.test.com
mydomain = test.com
myoriginal = $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

inet_interface = all
inet_protocols = ipv4
mynetworks_style = subnet

#home_mailbox = MailBox ★コメントアウト
mail_spool_directory = /var/mail/

## Postfixの再起動
service postfis restart

ユーザの追加

useradd user1 -s /sbin/nologin
passwd user1
chmod 777 /var/spool/mail

dovecotのインストール

yum install dovecot

dovecotの設定

/etc/postfix/main.cf
/etc/dovecot/dovecot.conf
listen = *
/etc/dovecot/conf.d/10-mail.conf
mail_localtion = maildir:/var/mail/%u
または
mail_location = maildir:~/mail
/etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth=no
/etc/dovecot/conf.d/10-ssl.conf
ssl = no
3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?