LINUX.ORG.RU
решено ФорумAdmin

postfix sasl dovecot отклоняется входящая почта

 ,


0

1

Здравствуйте,

Пожалуйста помогите решить проблему:

Есть связка Postfix + Dovecot. Отклоняются входящие письма с сообщением: Diagnostic code: smtp;550 5.1.1 <user@domain.com>: Recipient address rejected: User unknown in local recipient table.

Postfix: 
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = server.domain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = domain.com, server.domain.com, localhost.domain.com, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_mailbox_domains = /etc/postfix/virtual_mailbox_domains
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_tls_auth_only = yes

Dovecot.conf
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login
auth_verbose = yes
debug_log_path = /var/log/dovecot-debug.log
listen = *
log_path = /var/log/dovecot.log
login_greeting = IMAP ready.
mail_debug = yes
mail_gid = 5000
mail_location = maildir:/var/mail/vhosts/%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 = scheme=SHA256-CRYPT username_format=%u /etc/dovecot/users
  driver = passwd-file
}
protocols = " imap lmtp"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
  args = username_format=%u /etc/dovecot/users
  driver = passwd-file
}
verbose_ssl = yes

Ответ на: комментарий от novitchok

Добавлен юзер в /etc/dovecot/users, алиасов никаких нет.

dreamboxx
() автор топика

Может следует добавить local_recipient_maps = hash:/etc/postfix/aliases

syop
()

включил debug на postfix, выкладываю часть лога который может быть интересен:

Dec 18 23:44:25 zevs postfix/smtpd[7371]: maps_find: recipient_canonical_maps: test@testdomain.me: not found
Dec 18 23:44:25 zevs postfix/smtpd[7371]: maps_find: recipient_canonical_maps: test: not found
Dec 18 23:44:25 zevs postfix/smtpd[7371]: maps_find: recipient_canonical_maps: @testdomain.me: not found
Dec 18 23:44:25 zevs postfix/smtpd[7371]: mail_addr_find: test@testdomain.me -> (not found)
Dec 18 23:44:25 zevs postfix/smtpd[7371]: maps_find: canonical_maps: test@testdomain.me: not found
Dec 18 23:44:25 zevs postfix/smtpd[7371]: maps_find: canonical_maps: test: not found
Dec 18 23:44:25 zevs postfix/smtpd[7371]: maps_find: canonical_maps: @testdomain.me: not found
Dec 18 23:44:25 zevs postfix/smtpd[7371]: mail_addr_find: test@testdomain.me -> (not found)
Dec 18 23:44:25 zevs postfix/smtpd[7371]: maps_find: virtual_alias_maps: test@testdomain.me: not found
Dec 18 23:44:25 zevs postfix/smtpd[7371]: maps_find: virtual_alias_maps: test: not found
Dec 18 23:44:25 zevs postfix/smtpd[7371]: maps_find: virtual_alias_maps: @testdomain.me: not found
Dec 18 23:44:25 zevs postfix/smtpd[7371]: mail_addr_find: test@testdomain.me -> (not found)
Dec 18 23:44:25 zevs postfix/smtpd[7371]: maps_find: local_recipient_maps: @testdomain.me: not found
Dec 18 23:44:25 zevs postfix/smtpd[7371]: mail_addr_find: test@testdomain.me -> (not found)
Dec 18 23:44:25 zevs postfix/smtpd[7371]: NOQUEUE: reject: RCPT from st11p01im-asmtp002.me.com[17.172.204.152]: 550 5.1.1 <test@testdomain.me>: Recipient address rejected: User unknown in local recipient table; from=<sender@domain.com> to=<test@testdomain.me> proto=ESMTP helo=<st11p01im-asmtp002.me.com>

dreamboxx
() автор топика

Разобрался, добавил в конфиг:

virtual_alias_maps = hash:/etc/postfix/vmail_aliases
virtual_mailbox_domains = hash:/etc/postfix/vmail_domains
virtual_mailbox_maps = hash:/etc/postfix/vmail_mailbox

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