TOPページ掲示板
作成日:2007年09月29日 作成:Yosi

Vine Linuxで自宅サーバーの掲示板で過去に質問された内容です。

No.2870 postfixについて


No.2870 投稿時間:2007年09月29日(Sat) 13:46 投稿者名:AKI URL:
タイトル:postfixについて

初めまして
こちらのHPを参考にさせて頂きメールサーバーを構築中で、一通り設定を終わらせテストをしてみると受信はできますが、外部に送信出来ずPOSTMASTER?から英語のメールが返ってきます。

タイトル Undelivered Mail Returned to Sender

本文 This is the Postfix program at host xxxx.xxxxx.net.

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 Postfix program

<xxxxxxxxxxx@xxxx.eonet.ne.jp>: host
aa0000-msas01s.eonet.ne.jp[xxx.xxx.xx.xx] said: 503 no auth during mail
transaction (#5.5.0) (in reply to MAIL FROM command)

宛先もアドレスを間違ったりしてませんし、ファイアーウオール、ルーターのポートの設定には問題無いです。
管理人様と同じeoを使用しておりまして、OP25Bの設定もやりました。

もう、ちんぷんかんぷんです。助けてください。
お願い致します。


No.2872 投稿時間:2007年09月29日(Sat) 18:57 投稿者名:Yosi@管理人 URL:
タイトル:Re: postfixについて

vineのバージョンは何ですか?

SMTP-AUTHの動作と認証テストは問題なくクリアしているのでしょうか?

下記コマンドの結果を全て貼り付けてください。
# postconf -n


No.2873 投稿時間:2007年09月29日(Sat) 19:55 投稿者名:AKI URL:
タイトル:レスありがとうございます

> vineのバージョンは何ですか?

4.1です。

> SMTP-AUTHの動作と認証テストは問題なくクリアしているのでしょうか?

多分、問題ないはずなんですけど・・・
ただ管理人様の例と少し違いましてtelnet localhost 25で

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 xxxx.xxxxx.net ESMTP unknown
ehlo localhost
250-xxxx.xxxxx.net
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
*250-AUTH DIGEST-MD5 LOGIN PLAIN CRAM-MD5
*250-AUTH=DIGEST-MD5 LOGIN PLAIN CRAM-MD5
250 8BITMIME

*印の部分の文字の並びが違うのですが、何ら問題は無いのでしょうか?

> 下記コマンドの結果を全て貼り付けてください。
> # postconf -n

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_percent_hack = yes
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
default_privs = nobody
home_mailbox = Maildir/
inet_interfaces = all
mail_owner = postfix
mydestination = $myhostname, localhost.$mydomain $mydomain
mydomain = xxxxx.net
myhostname = xxxx.xxxxx.net
mynetworks = 192.168.11.0/24, 127.0.0.0/8
myorigin = $mydomain
queue_directory = /var/spool/postfix
relay_domains = $mydestination
relayhost = [smtpauth.eonet.ne.jp]:587
smtp_sasl_mechanism_filter = LOGIN, CRAM-MD5, PLAIN
smtp_sasl_password_maps = hash:/etc/postfix/isp_auth
smtp_sasl_security_options = noanonymous
smtpd_banner = $myhostname ESMTP unknown
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
unknown_local_recipient_reject_code = 550

やっぱり何か失敗していますでしょうか?

宜しくお願い致します。


No.2874 投稿時間:2007年09月29日(Sat) 20:07 投稿者名:Yosi@管理人 URL:
タイトル:Re: レスありがとうございます

> relayhost = [smtpauth.eonet.ne.jp]:587
> smtp_sasl_mechanism_filter = LOGIN, CRAM-MD5, PLAIN
> smtp_sasl_password_maps = hash:/etc/postfix/isp_auth
> smtp_sasl_security_options = noanonymous
> smtpd_banner = $myhostname ESMTP unknown
> smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
> smtpd_sasl_auth_enable = yes
> smtpd_sasl_local_domain = $mydomain
> unknown_local_recipient_reject_code = 550

smtp_sasl_auth_enable = yes
が抜けているのでSMTPクライアントの SASL 認証が有効になっていません。

smtpd_sasl_auth_enable = yesと似ていますが
最初のsmtpdの部分⇒smtpなので全く違う内容の記述です。
間違いの無いようにしてください。

下記の記述はeoではいらないと思いますよ。
私は設定していません。
smtp_sasl_mechanism_filter = LOGIN, CRAM-MD5, PLAIN


No.2875 投稿時間:2007年09月29日(Sat) 20:33 投稿者名:AKI URL:
タイトル:レスありがとうございます


> smtp_sasl_auth_enable = yes
> が抜けているのでSMTPクライアントの SASL 認証が有効になっていません。
> smtpd_sasl_auth_enable = yesと似ていますが
> 最初のsmtpdの部分⇒smtpなので全く違う内容の記述です。
> 間違いの無いようにしてください。

ホント良く似た記述ですね。注意不足と無知なものですみません。
早速、追加し再起動しましたが症状は同じで送信後に送受信するとPOSTMASTERからメールが来ます

> 下記の記述はeoではいらないと思いますよ。
> 私は設定していません。
> smtp_sasl_mechanism_filter = LOGIN, CRAM-MD5, PLAIN

何だか解からないので付け足してみたのですが、無意味なんですね。削除しました。


あと、何が駄目なんでしょう?
宜しくお願い致します。


No.2876 投稿時間:2007年09月29日(Sat) 20:37 投稿者名:Yosi@管理人 URL:
タイトル:Re: レスありがとうございます

> あと、何が駄目なんでしょう?

ん〜分かりません。

SMTP-AUTH 認証テストは問題無いんですよね?

# perl -MMIME::Base64 -e 'print encode_base64("ユーザID\0ユーザID\0パスワード");' ← ユーザーID、パスワードを入力
dGVzdAB0ZXN0AHRlc3QyMjI= ← エンコードされたパスワードが表示される

# telnet localhost 25 ← 25番ポートに接続
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 server.xxxxx.com ESMTP unknown
EHLO localhost ← EHLO localhostと入力
250-server.xxxxx.com
250-PIPELINING
250-SIZE 1024000
250-ETRN
250-AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5
250-AUTH=PLAIN LOGIN DIGEST-MD5 CRAM-MD5
250-XVERP
250 8BITMIME
AUTH PLAIN dGVzdAB0ZXN0AHRlc3QyMjI= ← AUTH PLAIN の後ろにエンコードしたパスワードを入力
235 Authentication successful ← 認証に成功
quit ← 終了
221 Bye
Connection closed by foreign host.


No.2877 投稿時間:2007年09月29日(Sat) 20:59 投稿者名:AKI URL:
タイトル:Re^2: レスありがとうございます

> > あと、何が駄目なんでしょう?
>
> 分かりません。

アホな質問すみません。

> SMTP-AUTH 認証テストは問題無いんですよね?
>
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 xxxx.xxxxx.net ESMTP unknown
EHLO localhost
250-xxxx.xxxxx.net
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH DIGEST-MD5 LOGIN PLAIN CRAM-MD5
250-AUTH=DIGEST-MD5 LOGIN PLAIN CRAM-MD5
250 8BITMIME
AUTH PLAIN YS15YW1hc2hpdGEAYS15YW1hc2hpdGEAYTEyMzRZNTY3OA==
235 Authentication successful
quit
221 Bye
Connection closed by foreign host.

やってみましたら↑のようになりましたので問題無いですよね?


No.2878 投稿時間:2007年09月29日(Sat) 21:05 投稿者名:Yosi@管理人 URL:
タイトル:Re^3: レスありがとうございます

問題無い感じですね。

/etc/postfix/isp_passwdの記述とかで間違いは無いですよね?

[smtpauth.eonet.ne.jp]:587 eoアカウント:eoパスワード

/etc/postfix/master.cfの記述も間違いないですよね?

smtp inet n - n - - smtpd
下記を追記(Submission Port関連の記述)
submission inet n - n - - smtpd
-o smtpd_etrn_restrictions=reject
-o smtpd_client_restrictions=permit_sasl_authenticated,reject


No.2879 投稿時間:2007年09月29日(Sat) 21:24 投稿者名:AKI URL:
タイトル:Re^4: レスありがとうございます

> /etc/postfix/isp_passwdの記述とかで間違いは無いですよね?
>
> [smtpauth.eonet.ne.jp]:587 eoアカウント:eoパスワード

こちらのHPですと/etc/postfix/isp_authって項目ですよね?
で、なければ他にあったのでしょうか?
ちなみに
[smtpauth.eonet.ne.jp]:587 xxxxxxxx%xxxx.eonet.ne.jp:xxxxxxx
と、xにしてますがアカウントとパスは記述しています。

> /etc/postfix/master.cfの記述も間違いないですよね?
>
> smtp inet n - n - - smtpd
> 下記を追記(Submission Port関連の記述)
> submission inet n - n - - smtpd
> -o smtpd_etrn_restrictions=reject
> -o smtpd_client_restrictions=permit_sasl_authenticated,reject

# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
submission inet n - n - - smtpd
-o smtpd_etrn_restrictions=reject
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes

#を消した(コメントアウト?)だけですけど、コレがいけなのでしょうか?


No.2880 投稿時間:2007年09月29日(Sat) 21:54 投稿者名:Yosi@管理人 URL:
タイトル:Re^5: レスありがとうございます

見た感じ、間違っていない感じですね。

特に他で思い当たるところがないですね。

ん〜
サーバー内へのメール送信はどうですか?
例えばユーザーからroot宛等です。

あと、失敗する時のメールログ(/var/log/maillog)はどうなっていますか?
失敗した部分をそのまま張りつけて下さい。


No.2881 投稿時間:2007年09月29日(Sat) 22:45 投稿者名:AKI URL:
タイトル:Re^6: レスありがとうございます

> サーバー内へのメール送信はどうですか?
> 例えばユーザーからroot宛等です。

アカウントの設定をしたクライアントから、そのクライアント自身に送信した場合とサーバーへ送信した場合、送受信可能でしたが、サーバーからクライアントに送信できないような感じです。外部に対しては完全に受信のみです。

> あと、失敗する時のメールログ(/var/log/maillog)はどうなっていますか?
> 失敗した部分をそのまま張りつけて下さい。

Sep 29 22:26:00 vine postfix/smtpd[23498]: connect from 121-xx-xxx-xxx.eonet.ne.jp[121.xx.xxx.xxx]

Sep 29 22:26:00 vine postfix/smtpd[23498]: AFC8F46A644: client=121-xx-xxx-xxx.eonet.ne.jp[121.xx.xxx.xxx], sasl_method=LOGIN, sasl_username=a-xxxxx@xxxxx.net

Sep 29 22:26:00 vine postfix/cleanup[23502]: AFC8F46A644: message-id=<000701c8029c$3c61b850$080ba8c0@computername>

Sep 29 22:26:00 vine postfix/qmgr[23036]: AFC8F46A644: from=<xxxxx@xxxxx.net>, size=1339, nrcpt=1 (queue active)

Sep 29 22:26:00 vine postfix/smtp[23503]: warning: database /etc/postfix/isp_auth.db is older than source file /etc/postfix/isp_auth

Sep 29 22:26:01 vine postfix/smtpd[23498]: disconnect from 121-82-177-237.eonet.ne.jp[121.xx.xxx.xxx]

Sep 29 22:26:05 vine pop3d: Connection, ip=[::ffff:121.xx.xxx.xxx]

Sep 29 22:26:05 vine pop3d: LOGIN, user=info, ip=[::ffff:121.xx.xxx.xxx]

Sep 29 22:26:06 vine postfix/smtp[23503]: AFC8F46A644: to=<xxxxxxxxxxxxxxx@ezweb.ne.jp>, relay=aa0000-msas01s.eonet.ne.jp[203.140.81.12], delay=6, status=bounced (host aa0000-msas01s.eonet.ne.jp[203.140.81.12] said: 503 no auth during mail transaction (#5.5.0) (in reply to MAIL FROM command))

Sep 29 22:26:06 vine postfix/cleanup[23502]: 75C9546A6D1: message-id=<20070929132606.75C9546A6D1@vine.xxxxx.net>

Sep 29 22:26:06 vine postfix/qmgr[23036]: 75C9546A6D1: from=<>, size=3215, nrcpt=1 (queue active)

Sep 29 22:26:06 vine postfix/qmgr[23036]: AFC8F46A644: removed

Sep 29 22:26:06 vine postfix/local[23507]: 75C9546A6D1:
to=<xxxxx@xxxxx.net>, relay=local, delay=0, status=sent (delivered to maildir)

Sep 29 22:26:06 vine postfix/qmgr[23036]: 75C9546A6D1: removed

Sep 29 22:26:07 vine pop3d: LOGOUT, user=info, ip=[::ffff:121.xx.xxx.xxx], top=0, retr=0, time=2

Sep 29 22:26:08 vine pop3d: Connection, ip=[::ffff:xxx.xx.xxx.237]

Sep 29 22:26:08 vine pop3d: LOGIN, user=xxxxx, ip=[::ffff:121.xx.xxx.xxx]

/var/log/maillogは許可がありませんとかでシステムログから張り付けましたが、コレでは駄目ですか?

外部の送信は携帯、gmail、eoのアカウント全て駄目です。


No.2882 投稿時間:2007年09月29日(Sat) 22:49 投稿者名:Yosi@管理人 URL:
タイトル:Re^7: レスありがとうございます

> Sep 29 22:26:00 vine postfix/smtp[23503]: warning: database /etc/postfix/isp_auth.db is older than source file /etc/postfix/isp_auth

下記コマンドで/etc/postfix/isp_authの
DB化をちゃんと行っていますか?
# postmap /etc/postfix/isp_auth


No.2883 投稿時間:2007年09月29日(Sat) 23:06 投稿者名:AKI URL:
タイトル:Re^8: レスありがとうございます

> > Sep 29 22:26:00 vine postfix/smtp[23503]: warning: database /etc/postfix/isp_auth.db is older than source file /etc/postfix/isp_auth
>
> 下記コマンドで/etc/postfix/isp_authの
> DB化をちゃんと行っていますか?
> # postmap /etc/postfix/isp_auth

行ったつもりだったのですが、ログでは出来ていないと表示されてるのですね。

で、やってみましたら・・・

出来ました!!!送信できました!!!
携帯にもeoにも!
うわぁぁぁぁぁぁぁぁ!感激です!!!!


No.2884 投稿時間:2007年09月29日(Sat) 23:43 投稿者名:AKI URL:
タイトル:ありがとうございます!

ありがとうございます!ありがとうございます!ありがとうございます!ありがとうございます!ありがとうございます!

ホントにありがとうございます。

これまで何度もやり直して失敗して嫌になってムキになりながら繰り返してたんですが、玄人さんに聞いて正解でした。
こんな事ならもっと早く質問していればよかったと思いながら、今まで無駄な時間を使ったと後悔しています。
しかし流石です。ミスを的確に指摘できる知識に脱帽です。

で、教えて頂きたいのですが、このままの設定で外部のPCから構築したメールサーバーを使用可能ですか?


とりあえずメールサーバーが構築でき何だか落ち着きました。
このPCはメールサーバー専用にして次はwebサーバーを完成させようと思います。
構築途中のwebサーバーにはFedora7を使用していますが、vineに変えてやり直します。
また確実に行き詰まると思いますので、その時は宜しくお願い致します。

あと、私も管理人様と年齢が近いようで且つ魚座です。
釣りも馬鹿が付くほど好きで、暇さえあれば釣りに行ってましたが、今はコレに必死で・・・

なにはともあれ、また宜しくお願い致します。



TOPページ掲示板▲頁先頭