メールサーバ設定

メモ帳代わりに使用します
フォーラムルール
このフォーラムはサーバの作業内容・ログ保管のために作りました。
その他、サーバでのTODOメモや作業メモなどにご利用いただいても構いません。
出来るだけ一つのトピックに返信して、乱立しないようにご協力ください。

メールサーバ設定

投稿記事by しゃむ » 2013年1月17日(木) 10:46

OP25B制限回避

sendmailが動いてれば停止
# ps -ef | grep mail
# sendmail stop
# chkconfig --del sendmail

確認
# chkconfig --list sendmail

Postfix使用
# yum list installed | grep postfix
無ければ入れる
# yum install postfix

MTA変更
# alternatives --config mta

起動
# postfix start
# chkconfig postfix on

設定 基本
# vi /etc/postfix/main.cf
myhostname = mc.sakura-server.net
mydomain = sakura-server.net
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 192.168.0.0/23, 127.0.0.0/8
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

設定 - SMTPリレー
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_mechanism_filter = plain
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_security_options = noanonymous

# vi /etc/postfix/sasl_passwd
[smtp.gmail.com]:587 admin@sakura-server.net:mail-password

# postmap /etc/postfix/sasl_passwd
# chown -R postfix /etc/postfix

# service postfix restart

テスト
# mail
bash: mail: コマンドが見つかりません
# yum install mailx

再テスト 動かない
ログ確認
# vi /var/log/maillog
warning: SASL authentication failure: No worthy mechs found

cyrus-sasl入れてなかった
# yum install cyrus-sasl-plain cyrus-sasl-md5
SakuraServer Administrator
http://sakura-server.net/
アバター
しゃむ
管理人
管理人
 
記事: 655
登録日時: 2012年7月13日(金) 18:50
お住まい: とくしま
Minecraft ID: syamn

Return to メモ帳 - Memo

オンラインデータ

このフォーラムを閲覧中のユーザー: なし & ゲスト[2人]

cron

x