Форум русскоязычного сообщества Ubuntu


Считаете, что Ubuntu недостаточно дружелюбна к новичкам?
Помогите создать новое Руководство для новичков!

Автор Тема: Posfix+Dovecot+mysql Не приходят письма на локальный домен  (Прочитано 1588 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн Hit4er

  • Автор темы
  • Новичок
  • *
  • Сообщений: 4
    • Просмотр профиля
Добрый день столкнулся с такой проблемой, не приходят письма, вот лог

May  1 21:19:50 hit postfix/smtpd[6885]: connect from hit.bear.local[192.168.11.1]
May  1 21:19:50 hit postfix/smtpd[6885]: Anonymous TLS connection established from hit.bear.local[192.168.11.1]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
May  1 21:19:50 hit postfix/smtpd[6885]: 80B9A6DF5C: client=hit.bear.local[192.168.11.1], sasl_method=PLAIN, sasl_username=root@bear.local
May  1 21:19:50 hit postfix/cleanup[6894]: 80B9A6DF5C: message-id=<53628236.8060806@bear.local>
May  1 21:19:50 hit postfix/qmgr[6500]: 80B9A6DF5C: from=<root@bear.local>, size=1081, nrcpt=1 (queue active)
May  1 21:19:50 hit postfix/smtpd[6885]: disconnect from hit.bear.local[192.168.11.1]
May  1 21:19:50 hit postfix/local[6895]: 80B9A6DF5C: to=<root@bear.local>, relay=local, delay=0.23, delays=0.16/0.01/0/0.06, dsn=2.0.0, status=sent (delivered to mailbox)
May  1 21:19:50 hit postfix/qmgr[6500]: 80B9A6DF5C: removed
MX запись
host -t mx bear.local
bear.local mail is handled by 20 mx2.bear.local.
bear.local mail is handled by 10 mx.bear.local.

конфиг main.cf

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
anvil_rate_time_unit = 60s
bounce_queue_lifetime = 1d
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debug_peer_list = 127.0.0.1
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
html_directory = no
inet_protocols = ipv4
mail_owner = postfix
mail_spool_directory = /var/vmail
manpage_directory = /usr/share/man
maximal_queue_lifetime = 1d
message_size_limit = 51200000
mydestination = localhost.$mydomain, localhost, $mydomain
mydomain = bear.local
myhostname = hit.bear.local
mynetworks = $config_directory/mynetworks.cf
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.0/README_FILES
relay_domains = proxy:mysql:/etc/postfix/mysql/relay_domains.cf
relayhost =
sample_directory = /usr/share/doc/postfix-2.10.0/samples
setgid_group = postdrop
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:$data_directory/smtp_tls_session_cache
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_client_connection_count_limit = 20
smtpd_client_message_rate_limit = 30
smtpd_delay_reject = yes
smtpd_discard_ehlo_keywords = etrn, silent-discard
smtpd_error_sleep_time = 20
smtpd_forbidden_commands = CONNECT GET POST
smtpd_hard_error_limit = 15
smtpd_helo_required = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_soft_error_limit = 10
smtpd_tls_cert_file = /etc/postfix/bear.cert
smtpd_tls_key_file = /etc/postfix/bear.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_timeout = 3600s
soft_bounce = no
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/virtual_alias_domain_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
virtual_minimum_uid = 1000
virtual_transport = dovecot
virtual_uid_maps = static:5000
конфиг довекота
auth_debug = yes
auth_mechanisms = plain login
auth_realms = bear.local
auth_verbose = yes
auth_verbose_passwords = plain
base_dir = /var/run/dovecot/
hostname = bear.local
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
log_path = /var/log/dovecot.log
mail_debug = yes
mail_gid = 5000
mail_location = maildir:/var/vmail/%d/%n
mail_uid = 5000
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
postmaster_address = postmaster@bear.local
protocols = " imap"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
ssl_cert = </etc/postfix/bear.cert
ssl_key = </etc/postfix/bear.key
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
verbose_ssl = yes
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  mail_plugins =
}

Никаких ошибок в логах не вижу, не могу понять в чем проблема, подскажите в какую сторону копать

Оффлайн Hit4er

  • Автор темы
  • Новичок
  • *
  • Сообщений: 4
    • Просмотр профиля
Поправил, теперь такая ошибка
postfix/smtpd[8809]: connect from mail.bear.local[192.168.11.1]
May  5 21:37:10 hit postfix/smtpd[8809]: D903D6E07D: client=mail.bear.local[192.168.11.1], sasl_method=PLAIN, sasl_username=root@bear.local
May  5 21:37:10 hit postfix/cleanup[8818]: D903D6E07D: message-id=<5367CC46.1010405@bear.local>
May  5 21:37:10 hit postfix/qmgr[8800]: D903D6E07D: from=<root@bear.local>, size=900, nrcpt=1 (queue active)
May  5 21:37:10 hit postfix/smtpd[8809]: disconnect from mail.bear.local[192.168.11.1]
May  5 21:37:10 hit postfix/pipe[8805]: D903D6E07D: to=<root@bear.local>, relay=dovecot, delay=0.1, delays=0.05/0/0/0.05, dsn=4.3.0, status=deferred (temporary failure. Command output: lda: Error: user root@bear.local: Error reading configuration: stat(/etc/dovecot/dovecot.conf) failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +x perm: /etc/dovecot, dir owned by 0:0 mode=0700) lda: Fatal: Internal error occurred. Refer to server log for more information. )

Кто-нибудь сталкивался с такой ошибкой?

Оффлайн Karl500

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 2267
    • Просмотр профиля
Там ж написано все...
Цитировать
Error reading configuration: stat(/etc/dovecot/dovecot.conf) failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +x perm: /etc/dovecot, dir owned by 0:0 mode=0700
Проверьте - у Вас нет возможности lda прочесть файл /etc/dovecot/dovecot.conf

Оффлайн Hit4er

  • Автор темы
  • Новичок
  • *
  • Сообщений: 4
    • Просмотр профиля
Вижу что не может прочесть, только не пойму где накосячил, запутался с правами на конфиги, в данный момент сейчас такие права

/etc/dovecot
drwx------   2 root root     4096 апр.  22 21:10 conf.d
-rw-r--r--   1 root root     4448 мая    8 01:04 dovecot.conf
-rw-r-----   1 root postfix   410 февр. 11  2013 dovecot-db.conf.ext
-rw-r-----   1 root postfix   854 апр.  25 20:42 dovecot-dict-sql.conf.ext
-rw-r--r--   1 root root     1289 авг.  25  2013 dovecot.pem
-rw-r-----   1 root postfix  6579 мая    4 22:26 dovecot-sql.conf.ext
drwx------   2 root root     4096 авг.  25  2013 private
-rw-r--r--   1 root root      121 февр. 11  2013 README

/etc/postfix

-rw-r--r--   1 root root     1383 апр.  25 19:42 bear.cert
-rw-r--r--   1 root root     1704 апр.  25 19:42 bear.key
-rw-r--r--   1 root root      329 мая    2 09:13 dynamicmaps.cf
-rw-r--r--   1 root root     3499 мая    8 21:47 main.cf
-rw-r--r--   1 root root     6106 мая    8 00:53 master.cf
drwxr-x--x   2 root postfix  4096 апр.  29 18:50 mysql
-rw-r--r--   1 root root    19707 марта 23  2013 postfix-files
-rwxr-xr-x   1 root root     8861 марта 23  2013 postfix-script
-rwxr-xr-x   1 root root    27425 марта 23  2013 post-install
drwxr-xr-x   2 root root     4096 марта 23  2013 sasl

Оффлайн Hit4er

  • Автор темы
  • Новичок
  • *
  • Сообщений: 4
    • Просмотр профиля
Решено. Проблема была в том что на папку dovecot были таки права
drwxr------ 4 root root   4,0K апр.  22 20:44 dovecot
Не пойму как применились такие права, поставил
drwxr-xr-x 4 root root   4,0K апр.  22 20:44 dovecot
И работает :)

 

Страница сгенерирована за 0.052 секунд. Запросов: 25.