LINUX.ORG.RU
ФорумAdmin

postfix+dovecot невидно почты

 ,


0

1

доброй ночи. Подскажите пожалуста, у меня почта не видна у клиента.

# dovecot -n
# 1.2.17: /usr/local/etc/dovecot.conf
# OS: FreeBSD 9.0-RELEASE-p3 amd64  
log_path: /var/log/dovecot
protocols: pop3 pop3s lmtp
ssl_cert_file: /etc/ssl/dovecot/cert.pem
ssl_key_file: /etc/ssl/dovecot/key.pem
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/pop3-login
verbose_proctitle: yes
mail_privileged_group: virtual
mail_uid: 5000
mail_gid: 5000
mail_location: maildir:%d/%u
mail_debug: yes
mail_executable: /usr/local/libexec/dovecot/pop3
mail_plugin_dir: /usr/local/lib/dovecot/pop3
pop3_client_workarounds: outlook-no-nuls oe-ns-eoh
auth default:
  mechanisms: plain login cram-md5 digest-md5
  username_format: %Lu
  verbose: yes
  debug: yes
  debug_passwords: yes
  passdb:
    driver: passwd-file
    args: /usr/local/etc/dovecot/passwd
  userdb:
    driver: passwd-file
    args: /usr/local/etc/dovecot/passwd
  socket:
    type: listen
    client:
      path: /var/spool/postfix/private/auth
      mode: 432
      user: postfix
      group: postfix
    master:
      path: /var/run/dovecot/auth-master
      mode: 384
      user: virtual
постфикс
biff = no
append_dot_mydomain = no
readme_directory = /usr/local/share/doc/postfix
queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mail_owner = postfix
unknown_local_recipient_reject_code = 550
myhostname = mail.dom.net
mydomain = dom.net
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8
local_recipient_maps = unix:passwd.byname $alias_maps
#recipient_delimiter = +
inet_interfaces = all
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
sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
setgid_group = maildrop
html_directory = /usr/local/share/doc/postfix
manpage_directory = /usr/local/man
sample_directory = /usr/local/etc/postfix
readme_directory = /usr/local/share/doc/postfix
inet_protocols = ipv4
virtual_mailbox_domains = dom.net
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_mailbox_maps = hash:/usr/local/etc/postfix/vmailbox
virtual_alias_maps = hash:/usr/local/etc/postfix/virtual
virtual_mailbox_limit = 310000000
virtual_mailbox_base = /var/spool/mail
mail_spool_directory = /var/spool/mail
relay_domains = $mydestination, $virtual_mailbox_domain
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
broken_sasl_auth_clients = yes
smtpd_client_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_pipelining,permit
smtpd_helo_restrictions = permit
smtpd_sender_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_non_fqdn_sender,reject_unknown_sender_domain,reject_unverified_sender,permit
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_non_fqdn_recipient,reject_unauth_destination,reject_unknown_recipient_domain,reject_unverified_recipient,permit
smtpd_data_restrictions = permit
smtpd_end_of_data_restrictions = permit
smtpd_etrn_restrictions = permit
smtp_use_tls = no
smtpd_use_tls = yes
smtpd_tls_auth_only = no
smtpd_tls_key_file = /etc/ssl/dovecot/key.pem
smtpd_tls_cert_file = /etc/ssl/dovecot/cert.pem
smtpd_tls_session_cache_database = btree:/usr/local/etc/postfix/tls_smtpd_scache
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
Сервисы стартанули нормально.
# sockstat -4
dovecot  pop3-login 98609 4  tcp4   8.123.5.6:110     *:*
dovecot  pop3-login 98609 5  tcp4   8.123.5.6:995     *:*
dovecot  pop3-login 98382 4  tcp4   8.123.5.6:110     *:*
dovecot  pop3-login 98382 5  tcp4   8.123.5.6:995     *:*
dovecot  pop3-login 97651 4  tcp4   8.123.5.6:110     *:*
dovecot  pop3-login 97651 5  tcp4   8.123.5.6:995     *:*
root     dovecot    94878 6  tcp4   8.123.5.6:110     *:*
root     dovecot    94878 7  tcp4   8.123.5.6:995     *:*
root     master     94848 12 tcp4   8.123.5.6:25      *:*
# cat /usr/local/etc/dovecot/passwd
lin@dom.net:{CRAM-MD5}c1dd96dc8f3db31e83cc27687da5618cc87170a0c6a1:5000:5000
# cat /usr/local/etc/postfix/vmailbox
lin@dom.net dom.net/lin/
Лог постфикса
Apr 17 17:29:18 dom.net postfix/smtpd[99334]: connect from f73.mail.ru[94.100.178.234]
Apr 17 17:29:18 dom.net postfix/smtpd[99334]: Anonymous TLS connection established from f73.mail.ru[94.100.178.234]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Apr 17 17:29:18 dom.net postfix/smtpd[99334]: E0EE65B4F0E: client=f73.mail.ru[94.100.178.234]
Apr 17 17:29:18 dom.net postfix/cleanup[99338]: E0EE65B4F0E: message-id=<13669828.682789@f73.mail.ru>
Apr 17 17:29:18 dom.net postfix/qmgr[94850]: E0EE65B4F0E: from=<test@mail.ru>, size=1844, nrcpt=1 (queue active)
Apr 17 17:29:18 dom.net postfix/virtual[99339]: E0EE65B4F0E: to=<lin@dom.net>, relay=virtual, delay=0.08, delays=0.07/0/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Apr 17 17:29:18 dom.net postfix/qmgr[94850]: E0EE65B4F0E: removed
Apr 17 17:29:19 dom.net postfix/smtpd[99334]: disconnect from f73.mail.ru[94.100.178.234]
ЛОг довекота
Apr 17 17:29:18 auth(default): Info: new auth connection: pid=99334
Apr 17 17:29:21 auth(default): Info: client in: AUTH    1       CRAM-MD5        service=pop3    secured lip=8.123.5.6       rip=67.125.70.6       lport=110       rport=41339
Apr 17 17:29:21 auth(default): Info: client out: CONT   1       PDE3NjExNTzAuMTM2NjIxOTc2MUBYWJfbmV0Pg==
Apr 17 17:29:21 auth(default): Info: client in: CONT    1       bGluQGZ4Y2xhYi53YTAwY2MZDIzYjk1Yzg3ODM5Q2NzM=
Apr 17 17:29:21 auth(default): Info: passwd-file(lin@dom.net,67.125.70.6): lookup: user=lin@dom.net file=/usr/local/etc/dovecot/passwd
Apr 17 17:29:21 auth(default): Info: password(lin@dom.net,67.125.70.6): Credentials: c19ddd4e1e4b31e839055b0acc276820a0c6a1
Apr 17 17:29:21 auth(default): Info: client out: OK     1       user=lin@dom.net
Apr 17 17:29:21 auth(default): Info: master in: REQUEST 9       99217   1
Apr 17 17:29:21 auth(default): Info: passwd-file(lin@dom.net,67.125.70.6): lookup: user=lin@dom.net file=/usr/local/etc/dovecot/passwd
Apr 17 17:29:21 auth(default): Info: master out: USER   9       lin@dom.net  uid=5000        gid=5000
Apr 17 17:29:21 pop3-login: Info: Login: user=<lin@dom.net>, method=CRAM-MD5, rip=67.125.70.6, lip=8.123.5.6, TLS
Apr 17 17:29:21 POP3(lin@dom.net): Info: Effective uid=5000, gid=5000, home=(none)
Apr 17 17:29:21 POP3(lin@dom.net): Info: maildir: data=dom.net/lin@dom.net
Apr 17 17:29:21 POP3(lin@dom.net): Info: maildir++: root=dom.net/lin@dom.net, index=, control=, inbox=dom.net/lin@dom.net
Apr 17 17:29:21 POP3(lin@dom.net): Info: Namespace : Using permissions from dom.net/lin@dom.net: mode=0700 gid=-1
Apr 17 17:29:22 POP3(lin@dom.net): Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Apr 17 17:29:22 auth(default): Info: new auth connection: pid=99346
Подскажите пожалуйста, что я делаю нетак или возможно я что то упастил? сами письма я вимжу, могу прочитать их.
# ls -al /var/spool/mail/dom.net/lin/new/1366219758.V71I5b51a2M989349.dom.net
-rw-------  1 virtual  virtual  1892 Apr 17 17:29 /var/spool/mail/dom.net/lin/new/1366219758.V71I5b51a2M989349.dom.net

Очевидно, ты неправильно настроил dovecot. Он должен искать письма там, куда их складывает postfix

http://wiki.dovecot.org/MailLocation

Как вариант, используй dovecot в качестве LDA. Но учти что это сложнее и лучше не лезть в эти настройки пока ты не разберёшься с первым, более простым способом

http://wiki.dovecot.org/LDA

router ★★★★★ ()
Ответ на: комментарий от router

Привет.

Postfix складывает их сюда /var/spool/mail/

У постфикса прописал где домашняя дира.

# cat /usr/local/etc/postfix/vmailbox

lin@dom.net dom.net/lin/

Всеравно не пойму в довекоте же указано где письма будут лежать.

mail_location: maildir:%d/%u

%d домен %u пользователь

bagasik ()
Ответ на: комментарий от bagasik

postfix:

home_mailbox = Maildir/
mail_spool_directory = /var/spool/mail
virtual_mailbox_base = /var/spool/mail/

dovecot:

mail_location = maildir:/var/spool/mail/%u/

namespace inbox {
    type = private
    separator = /
    prefix =
    location = maildir:/var/spool/mail/%n/Maildir/
    inbox = yes
    subscriptions = yes
}

DiMoN ★★★ ()
Ответ на: комментарий от DiMoN

У меня довекот 1,2 а не 2.

С этим конфигом он не хочет заводится.

namespace inbox { type = private separator = / prefix = location = maildir:/var/spool/mail/%n/Maildir/ inbox = yes subscriptions = yes }

bagasik ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.