はじめての自宅サーバ構築 - Fedora/CentOS -
Last Update 2018/05/30
[ 更新履歴 ] [ サイト マップ ] [ 質問掲示板 ] [ 雑談掲示板 ] [ リンク ]
トップ >> 質問掲示板

 mailコマンドで外部へのメール送信が出来ない
日時: 2011/04/20 23:00
名前: OBアウトブレイク3希望

1.不明点・障害内容:mailコマンドで外部へのメール送信が出来ない
2.ログの有無   :有
  (有:その内容) :
3.Distribution  :CentOS
      Version :5.5
4.Service Name  :postfix-2.3.3-2.1.el5_2
      Version :dovecot-1.0.7-7.el5

独自ドメインでSMTPサーバを構築しています。
smtpトラップを携帯メールに送信するのが目標です。
メーラーからは内部外部共にメール送受信可能ですが、mailコマンドから外部(携帯電話)へのメール送信が出来ません。

ログ内容の
status=bounced (SASL authentication failed; server relay-mta.auone-net.jp[222.3.140.153] said: 535 5.7.0 Error: authentication failed: authentication failure) 
から、SASL認証に失敗しているように見受けられます。

■ログ /var/log/maillog ---------------------------------------------------------------------

Apr 20 22:53:37 test postfix/pickup[28419]: A9C8F4148004: uid=500 from=<******> 
Apr 20 22:53:37 test postfix/cleanup[28581]: A9C8F4148004: message-id=<20110420135337.A9C8F4148004@test.******.info> 
Apr 20 22:53:38 test postfix/qmgr[28423]: A9C8F4148004: from=<ka******@******.info>, size=346, nrcpt=1 (queue active) 
Apr 20 22:53:38 test postfix/smtp[28583]: A9C8F4148004: to=<******@ezweb.ne.jp>, relay=relay-mta.auone-net.jp[222.3.140.153]:587, delay=1.3, delays=0.73/0.35/0.17/0, dsn=5.7.0, status=bounced (SASL authentication failed; server relay-mta.auone-net.jp[222.3.140.153] said: 535 5.7.0 Error: authentication failed: authentication failure) 
Apr 20 22:53:38 test postfix/cleanup[28581]: B32323DB006F: message-id=<20110420135338.B32323DB006F@test.******.info> 
Apr 20 22:53:38 test postfix/qmgr[28423]: B32323DB006F: from=<>, size=2308, nrcpt=1 (queue active) 
Apr 20 22:53:38 test postfix/bounce[28584]: A9C8F4148004: sender non-delivery notification: B32323DB006F 
Apr 20 22:53:38 test postfix/qmgr[28423]: A9C8F4148004: removed


■mailコマンドから外部へのメール送信後、帰ってくるメール ------------------------------------
This is the mail system at host test.******.info. 

I'm sorry to have to inform you that your message could not 
be delivered to one or more recipients. It's attached below. 

For further assistance, please send mail to <postmaster> 

If you do so, please include this problem report. You can 
delete your own text from the attached returned message. 

The mail system 

<******@ezweb.ne.jp>: SASL authentication failed; server 
relay-mta.auone-net.jp[222.3.140.153] said: 535 5.7.0 Error: authentication 
failed: authentication failure 



Reporting-MTA: dns; test.******.info 
X-Postfix-Queue-ID: 3231B4148004 
X-Postfix-Sender: rfc822; ka******@******.info 
Arrival-Date: Wed, 20 Apr 2011 21:40:34 +0900 (JST) 

Final-Recipient: rfc822; ******@ezweb.ne.jp 
Action: failed 
Status: 5.7.0 
Remote-MTA: dns; relay-mta.auone-net.jp 
Diagnostic-Code: smtp; 535 5.7.0 Error: authentication failed: authentication 
failure 

----------------------------------------------------------------------------------------------

ご教授よろしくお願い致します。
メンテ

Page:  [1]

■ コンテンツ関連情報

 Re: mailコマンドで外部へのメール送信が出来ない ( No.1 )
日時: 2011/04/21 16:27
名前: できるかな?

/etc/postfix/main.cf に以下(4つ)を追加

Postfix SMTP クライアントの SASL 認証を有効
smtp_sasl_auth_enable = yes

SMTP クライアント検索テーブルを指定
smtp_sasl_password_maps = hash:/etc/postfix/auth_passwd

plain認証のためanonymousのみ不可
smtp_sasl_security_options = noanonymous

ISPのSMTPサーバ側のSASLメカニズムと自宅サーバ側のSASLメカニズムが不一致だと認証に失敗することがあるので、下記で使用するメカニズムを固定
ISPのSMTPサーバがサポートしているSASLメカニズムは、下記で確認できるので、確認した内容に従って設定すればよい。
特にdigest認証はISPではサポートされていないことが多いようであり、どのISPもサ>ポートしているのは plain, login なので、この2つのみとするとよい。(2.2以降の機能)
smtp_sasl_mechanism_filter = plain, login


# vi /etc/postfix/auth_passwd
[SMTPサーバー名]:25 ユーザー名:パスワード


# chmod 640 /etc/postfix/auth_passwd

# postmap /etc/postfix/auth_passwd

# service postfix restart
メンテ

Page:  [1]

題名
名前  ("初心者"を含む名前は使用できません)
E-Mail
URL
パスワード 記事メンテ時に使用)
投稿キー (投稿時 投稿キー を入力してください)
コメント
画像添付 (対応画像:JPEG/GIF/PNG [Max 500KB])

   クッキー保存

■ その他


Copyright(©)2004-2018 First home server construction. All Right Reserved.