Postfix @ Gentoo Linux - Linux Life

はじめに

メール送信サーバーの構築です。

インストール

# emerge -avt postfix

設定

# vi /etc/postfix/main.conf
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
myhostname = server.linux-life.net
#mydomain = domain.tld
mydomain = linux-life.net
#myorigin = $mydomain
#myorigin = $mydomain
#inet_interfaces = all
inet_interfaces = all
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mynetworks = 168.100.189.0/28, 127.0.0.0/8
mynetworks = 192.168.0.0/24, 127.0.0.0/8
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
smtpd_banner = smtp.$mydomain ESMTP $mail_name ($mail_version)

実行

# newaliases
# /etc/init.d/postfix start
# rc-update add postfix default

SMTP-AUTHの設定

# vi /etc/postfix/main.cf
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
# vi /etc/sasl2/smtpd.conf
pwcheck_method:pam
pwcheck_method:saslauthd
# /etc/init.d/saslauthd start
# rc-update add saslauthd default

エイリアスの設定

# vi /etc/mail/aliases
# root:
root: tasuku
# newaliases

参照

スポンサードリンク

Copyright © 2025 Linux-Life.net