お世話になります。メールサーバー構築初心者です。
Postfix + Dovecotでメールサーバーの構築をしており、送信受信でつまずいています(致命的)。
環境としてはPostfix + Dovecot で、ユーザー・ドメイン管理はMysql + PostfixAdminを使用しています。
仮想ドメインに対応させようとしています。。
[環境]
CentOS7.3.1611【KVMゲストOS】
Postfix2.10.1
Dovecot2.2.10
Mysql5.7.17
PostfixAdmin3.0.2
Thunderbird45.8.0【クライアントメーラー】
【送信】
PostfixにてSMTP-AUTH認証を行い、送信しようとしていますが、現状では送信時に認証エラーとなります。
クライアントの設定は
メールサーバー:mail.hoge.jp
ポート:587
ユーザー名:test001@hoge.jp
認証方式:通常のパスワード認証
接続の保護:STARTTLS
証明書はとりあえず自己証明(オレオレ証明書)を使っています。
送信時のエラーログは下記です。
/var/log/maillog
↓↓↓
maillog
mail postfix/smtpd[12036]: connect from unknown[xxx.xxx.xxx.xxx] mail postfix/smtpd[12036]: Anonymous TLS connection established from unknown[xxx.xxx.xxx.xxx]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits) mail postfix/smtpd[12036]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory mail postfix/smtpd[12036]: warning: SASL authentication failure: Password verification failed mail postfix/smtpd[12036]: warning: unknown[xxx.xxx.xxx.xxx]: SASL PLAIN authentication failed: generic failure mail postfix/smtpd[12036]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory mail postfix/smtpd[12036]: warning: unknown[xxx.xxx.xxx.xxx]: SASL LOGIN authentication failed: generic failure mail postfix/smtpd[12036]: disconnect from unknown[xxx.xxx.xxx.xxx]
postconf -n の実行結果は下記のとおりです。
postconf
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 fallback_transport = virtual home_mailbox = Maildir/ html_directory = no inet_interfaces = all inet_protocols = all local_transport = virtual mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, $mydomain mydomain = hoge.jp myhostname = mail.hoge.jp mynetworks = 127.0.0.0/8 myorigin = $myhostname newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES relay_domains = $mydestination relayhost = sample_directory = /usr/share/doc/postfix-2.10.1/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_sasl_security_options = noanonymous, noplaintext smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_relay_domains, reject smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_tls_cert_file = /etc/pki/dovecot/certs/dovecot.pem smtpd_tls_key_file = /etc/pki/dovecot/private/dovecot.pem smtpd_tls_loglevel = 1 smtpd_tls_session_cache_database = btree:/etc/postfix/smtpd_scache smtpd_tls_session_cache_timeout = 3600s smtpd_use_tls = yes unknown_local_recipient_reject_code = 550 virtual_alias_domains = $virtual_alias_maps virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_gid_maps = static:600 virtual_mailbox_base = /home/vmailbox virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf virtual_mailbox_limit = 51200000 virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf virtual_minimum_uid = 600 virtual_transport = virtual virtual_uid_maps = static:600
[/etc/postfix/mysql_virtual_alias_maps.cf] user = postfixadmin password = xxxxxxxxxxxxx hosts = localhost dbname = postfixadmin query = SELECT goto FROM alias WHERE address='%s' [/etc/postfix/mysql_virtual_domains_maps.cf] user = postfixadmin password = xxxxxxxxxxxxx hosts = localhost dbname = postfixadmin query = SELECT domain FROM domain WHERE domain='%s' and domain!='hoge.jp' [/etc/postfix/mysql_virtual_mailbox_maps.cf] user = postfixadmin password = xxxxxxxxxxxxx hosts = localhost dbname = postfixadmin query = SELECT concat(maildir, 'Maildir/') FROM mailbox WHERE username = '%s' AND active = '1'
【受信】
Dovecotにて受信設定を行っていまして、認証自体は通っており、他からのメール(gmailなど)はメールボックスに入っているようです。
現状の受信先は
/home/vmailbox/hoge.jp/test001@hoge.jp/Maildir/new
になっています。
上記にはどんどんメールがたまっていっているのですが、メールクライアントからはPOPでダウンロードできていない状態です。
dovecot.logの出力内容は書きです。
pop3-login: Info: Login: user=<test001@hoge.jp>, method=PLAIN, rip=xxx.xxx.xxx.xxx, lip=yyy.yyy.yyy.yyy, mpid=16688, TLS, session=<mdc/cjRLyAC0KkTg> pop3(test001@hoge.jp): Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/1, size=4571
dovecotの現在のコンフィグは下記のとおりです。
dovecot.conf
[dovecot.conf] protocols = pop3 imap lmtp listen = *, :: dict { } !include conf.d/*.conf !include_try local.conf [10-auth.conf] disable_plaintext_auth = no auth_mechanisms = plain digest-md5 cram-md5 !include auth-system.conf.ext [auth-system.conf.ext] passdb { driver = sql args = /etc/dovecot/dovecot-mysql.conf } userdb { driver = sql args = /etc/dovecot/dovecot-mysql.conf } [10-director.conf] service director { unix_listener login/director { } fifo_listener login/proxy-notify { } unix_listener director-userdb { } inet_listener { } } service imap-login { } service pop3-login { } protocol lmtp { } [10-logging.conf] log_path = /var/log/dovecot.log plugin { } [10-main.conf] mail_location = maildir:/home/vmailbox/%d/%n namespace inbox { inbox = yes } first_valid_uid = 600 mbox_write_locks = fcntl [10-master.conf] service imap-login { inet_listener imap { } inet_listener imaps { port = 993 ssl = yes } } service pop3-login { inet_listener pop3 { port = 110 } inet_listener pop3s { port = 995 ssl = yes } } service lmtp { unix_listener lmtp { } } service imap { } service pop3 { } service auth { unix_listener auth-userdb { } } service auth-worker { } service dict { unix_listener dict { } } [10-ssl.conf] ssl = yes ssl_cert = </etc/pki/dovecot/certs/dovecot.pem ssl_key = </etc/pki/dovecot/private/dovecot.pem [15-lda.conf] protocol lda { } [15-mailboxes.conf] namespace inbox { mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Trash { special_use = \Trash } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } } [20-imap.conf] protocol imap { } [20-lmtp.conf] protocol lmtp { } [20-pop3.conf] protocol pop3 { }
何卒よろしくお願いします。
まだ回答がついていません
会員登録して回答してみよう