
Ubuntu日本語フォーラム

ログインしていません。
ubuntu12.10でメール機能(postfix+dovecot)が正常動作していた状態で、
ubuntu13.04へアップグレード(do-release-upgradeコマンド)を行いましたところ、
クライアントPCからメール受信がエラーとなり困っています。
なお、gmailのpop3設定では受信送信ともに可の状態です。おそらくgmail内のメールサーバーは正常設定のためと思われます。
現設定内容は下記のとおりです。何か不備、間違い、もしくは下記以外で考えられる要因が思い当たりましたら、ご教示、お助け頂けますと大変助かります。
なお、エラーログは次のとおりです。
/var/log/mail.log(syslog)
※xxx.xxx.xxx.xxxは適宜読み替えてください。
-----------------------------
Oct 2 23:21:44 localhost postfix/smtpd[13682]: connect from unknown[xxx.xxx.xxx.xxx]
Oct 2 23:21:46 localhost postfix/smtpd[13686]: lost connection after CONNECT from unknown[xxx.xxx.xxx.xxx]
Oct 2 23:21:46 localhost postfix/smtpd[13686]: disconnect from unknown[xxx.xxx.xxx.xxx]
-----------------------------
/var/log/dovecot
※hogeuserは適宜読み替えてください。
※hogeuserとはubuntuのGUIログインのための初期OSインストール時に作成したユーザーです。
※GUIは現在停止してCUIのみで動作させています。
-----------------------------
Oct 02 23:21:51 master: Warning: /home/hogeuser/.gvfs is no longer mounted. If this is intentional, remove it with doveadm mount
Oct 02 23:21:51 master: Warning: /run/user/hogeuser/gvfs is no longer mounted. If this is intentional, remove it with doveadm mount
-----------------------------
/var/log/mail.err
-----------------------------
特にエラーは出力されていません。
-----------------------------
postconf -n内容は以下のとおりです。 ※~※の箇所は適宜読み替えてください。
つまり/etc/postfix/main.cfの設定内容です。
-----------------------------
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
mailbox_size_limit = 0
message_size_limit = 0
mydestination = localhost, localhost.localdomain, localhost
myhostname = mail.hoge.jp
mynetworks = 127.0.0.0/8,192.168.100.0/24,※自分の外部IP1※,※自分の外部IP2※,※自分の外部IP3※
recipient_delimiter = +
relayhost =
sendmail_path = /usr/sbin/postfix
smtp_sasl_mechanism_filter = CRAM-MD5, PLAIN, LOGIN
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions = permit_mynetworks ,permit
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject
smtpd_relay_restrictions = permit_mynetworks,permit_auth_destination, permit_sasl_authenticated
smtpd_sasl_auth_enable = no
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions =
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_domains = /etc/postfix/vhosts
virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = /etc/postfix/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
--------------------------------------------------
/etc/postfix/vmapsは
次のとおりで、postmap /etc/postfix/vmaps を実行し、
/etc/postfix/vmaps.dbを生成済みです。
※hoge.jpは適宜読み替えてください。
--------------------------------------------------
[email protected] hoge.jp/geho/
--------------------------------------------------
/etc/postfix/virtual_alias_mapsは
次のとおりで、postmap /etc/postfix/virtual_alias_maps を実行し、
/etc/postfix/virtual_alias_maps.dbを生成済みです。
※hoge.jpは適宜読み替えてください。
--------------------------------------------------
[email protected] [email protected],[email protected]
--------------------------------------------------
/etc/postfix/vhostsは次のとおりです。
※hoge.jpは適宜読み替えてください。
--------------------------------------------------
hoge.jp
--------------------------------------------------
/etc/postfix/sasl/smtpd.confは
--------------------------------------------------
pwcheck_method: auxprop
mech_list: cram-md5
--------------------------------------------------
/etc/postfix/master.cfの主な記述内容は
--------------------------------------------------
smtp inet n - - - - smtpd -vvv
#smtp inet n - - - 1 postscreen
#smtpd pass - - - - - smtpd
#dnsblog unix - - - - 0 dnsblog
#tlsproxy unix - - - - 0 tlsproxy
submission inet n - - - - smtpd
-o smtpd_tls_security_level=may
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o smtp_fallback_relay=
--------------------------------------------------
バーチャルドメインメールは
https://help.ubuntu.com/community/PostfixVirtualMailBoxClamSmtpHowto
を参考に、adddovecotuserシェルスクリプトでメールユーザーを/home/vmail/配下へ追加済みです。
/etc/dovecot/dovecot.confは
最下行に次の内容を追加済みです。
--------------------------------------------------
service auth {
unix_listener auth-userdb {
}
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
}
--------------------------------------------------
/etc/dovecot/passwdは次のとおりです。
※hoge.jpとパスワード値xxxxx・・・は適宜読み替えてください。
--------------------------------------------------
[email protected]:{CRAM-MD5}xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:5000:5000::/home/vmail/hoge.jp/geho/:/bin/false::
--------------------------------------------------
/etc/dovecot/conf.d/auth-checkpassword.conf.ext
はcheckpassword実行ファイルがfind / -name checkpassword しても存在しないため、
http://cr.yp.to/checkpwd/install.html の方法のとおりでインストールし、
/usr/checkpassword と配置されたため、
下記のとおり、
args = /usr/bin/checkpasswordを
args = /usr/checkpasswordに変更済みです。
--------------------------------------------------
passdb {
driver = checkpassword
args = /bin/checkpassword
}
userdb {
driver = checkpassword
args = /bin/checkpassword
}
--------------------------------------------------
/etc/dovecot/conf.d/10-auth.confは
--------------------------------------------------
disable_plaintext_auth = no
#!include auth-deny.conf.ext
#!include auth-master.conf.ext
#!include auth-system.conf.ext
#!include auth-sql.conf.ext
#!include auth-ldap.conf.ext
#!include auth-passwdfile.conf.ext
!include auth-checkpassword.conf.ext
#!include auth-vpopmail.conf.ext
#!include auth-static.conf.ext
--------------------------------------------------
/etc/dovecot/conf.d/10-mail.confは
--------------------------------------------------
mail_location = maildir:/home/vmail/%d/%n
--------------------------------------------------
/etc/dovecot/conf.d/10-master.confは
--------------------------------------------------
service auth {
・
・
省略
・
・
# Postfix smtp-auth
#unix_listener /var/spool/postfix/private/auth {
# mode = 0666
#}
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
・
・
省略
・
・
}
--------------------------------------------------
/etc/dovecot/conf.d/10-ssl.confは
--------------------------------------------------
ssl = no
--------------------------------------------------
以上です。
おわかりの方、どうかお助けください。
宜しくお願いいたします。
オフライン
yukidenです。補足です。
先程のエラー内容はすべて受信時のエラーですが、送信も次のとおりエラーとなります。
/var/log/mail.log(syslog)
※xxx.xxx.xxx.xxxは私のクライアントPCのグローバルIPです。
※xxx.xxx.xxx.xxx.プロバイダ.jpはさーばーが接続しているプロバイダのホスト名です。
※yyy.yyy.yyy.yyyはプロバイダのセカンダリDNSです。
--------------------------------------------------
Oct 3 00:33:54 localhost postfix/smtpd[14347]: warning: hostname xxx.xxx.xxx.xxx.プロバイダ.jp does not resolve to address xxx.xxx.xxx.xxx: Connection timed out
Oct 3 00:33:54 localhost postfix/smtpd[14347]: connect from unknown[xxx.xxx.xxx.xxx]
Oct 3 00:33:54 localhost named[1132]: error (unexpected RCODE REFUSED) resolving 'プロバイダ.jp/DS/IN': yyy.yyy.yyy.yyy#53
Oct 3 00:33:56 localhost postfix/smtpd[14347]: warning: unknown[xxx.xxx.xxx.xxx]: SASL CRAM-MD5 authentication failed: giw9t#a9gAGAg93ggag94ggaiagGAHYWOOS9AGOGAIAGJBOAITAGUJAAOARGAPAajagaag==
Oct 3 00:34:00 localhost postfix/smtpd[14347]: disconnect from unknown[xxx.xxx.xxx.xxx]
--------------------------------------------------
以上です。
おわかりの方、どうかお助けください。
宜しくお願いいたします。
オフライン
yukiedenです。
クライアントPCメーラー thanderbird ver.24
受信ポートは587で
・STARTTLS
・暗号化されたパスワード認証
送信ポートは587や465を試しました。
以上です。
宜しくお願いいたします。
オフライン
yukiedenです。
gmailの既に設定してある外部POP3アカウント設定では上記サーバーのPOP3アカウントで受信できているのですが、
何故かもう一度そのアカウントでpop3アカウント設定を上書き的に設定しようとすると
指定のユーザー名とパスワードによる POP3 アクセスはサーバーで拒否されました。
サーバーから返されたエラー: "Unable to process the account info."
とエラーが出てしまいます。
以上です。
宜しくお願いいたします。
オフライン
yukiedenです。
00:41:24投稿の
/var/log/mail.log(syslog)
※xxx.xxx.xxx.xxx.プロバイダ.jpはサーバーが接続しているプロバイダのホスト名です。
--------------------------------------------------
Oct 3 00:33:54 localhost named[1132]: error (unexpected RCODE REFUSED) resolving 'プロバイダ.jp/DS/IN': yyy.yyy.yyy.yyy#53
は、有料のセカンダリDNSで、未契約でしたので、これは削除しましたので、無視してください。
動作状況は変わらずです。
何かお気づきの方、お助けください。
オフライン
yukiedenです。
/var/log/lastlog
のサイズが 1460292bytesあります。
更新日付は本日の21:31頃です。更新日付は私がアクセスしたためと思いますが。
lastlogはこんなに大きくなるものでしょうか?
オフライン
nslookupで名前解決が出来ていません。
# nslookup www.yahoo.co.jp
;; Got SERVFAIL reply from 192.168.100.202, trying next server
;; Got SERVFAIL reply from 192.168.100.202, trying next server
Server: 127.0.0.1
Address: 127.0.0.1#53
** server can't find www.yahoo.co.jp: SERVFAIL
原因調査中です。
オフライン
yukiedenです。
postfix dovecotには問題なさそうです。
mail.log
※hogeusonaino20131005.ne.jpは架空のものです。
----------
Oct 5 12:56:41 localhost postfix/smtp[7983]: 2A8A45409A5: to=<[email protected]>, relay=none, delay=20, delays=0.13/0.01/20/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=hogeusonaino20131005.ne.jp type=MX: Host not found, try again)
----------
によると、名前解決が出来ていないです。
/etc/resolt.conf
--------
nameserver 192.168.100.1 ←ルーターの内部IP
--------
としてあります。
つい先程まで
nameserver 127.0.0.1
としていましたが、nslookup www.yahoo.co.jpなどで名前解決が出来ていませんでしたので、
ルーターの内部IPに変えたところ、nslookupでは名前解決できるようになりました。
しかし、上記のとおり、メール送信で名前解決が出来ない。と出るのは何故でしょうか?
お分かりの方どうかお助けください。
オフライン
yukiedenです。
/etc/resolt.conf
--------
nameserver 127.0.0.1 ←自サーバー(自DNS)
nameserver 192.168.100.1 ←ルーターの内部IP
nameserver AAA.BBB.CCC.1 ←プロバイダのプライマリDNS
nameserver AAA.BBB.CCC.2 ←プロバイダのセカンダリDNS
--------
としたところ、
メール送信で外部相手サーバーのMXレコードの名前解決も出来、メール送信は出来るようになりました。
しかしまだメール受信が出来ません。
/var/log/mail.log
※myhoge20131005.jpは架空ドメインです。私のメールのドメインを意味します。
-----------------
Oct 5 13:47:17 localhost postfix/trivial-rewrite[9616]: warning: do not list domain myhoge20131005.jp in BOTH virtual_alias_domains and virtual_mailbox_domains
Oct 5 13:47:17 localhost postfix/error[9639]: 9945F540412: to=<[email protected]>, relay=none, delay=0.18, delays=0.12/0.01/0/0.04, dsn=5.1.1, status=bounced (User unknown in virtual alias table)
-----------------
と、virtual alias table(virtual_alias_mapsのことですよね)にユーザーがない。と出ていますが、
/etc/postfix/virtual_alias_mapsファイル
----------------------
[email protected] [email protected]
----------------------
という内容で(これは正しいですよね?)
postmap /etc/postfix/virtual_alias_maps
しまして、
/etc/postfix/virtual_alias_maps.db
が出来上がり、
service postfix restart
して、
メール受信試験を行いましたが、同じエラーのままです。
お分かりになる方、どうかお助けください。
オフライン
yukiedenです。
まずご報告です。
Thanderbird ver.24 にて、
・受信=port 110で CRAM-MD5認証、セキュリティの保護なし(STARTTLSなし)にて成功しました。
・送信=port 587で CRAM-MD5認証、セキュリティの保護あり(STARTTLSあり)にて成功しました。
※何故か受信時にSTARTTLSでエラーが出ます。
Windows Liveメール2012では、
・受信=port 110で 平文認証にて成功しました。
・送信=port 587で 平文認証にて成功しました。
セキュリティで保護されたパスワード認証(STARTTLSを意味?)は失敗します。
ひとまず、以上で運用します。
上記、課題は後日対応したいと思います。
皆様、お見守り頂きましてありがとうございました。
オフライン