Всем Доброго времени суток!Случилась со мной ситуация, настроил Postfix + DOvecot, плюс веб-инструменты PostfixAdmin + Roundcube, все это на Ubuntu Server 16.04
Пользователи хранятся в MySQL
С отправлением проблем нету, а вот с получением пришлось повозиться, и так не нашел решения
postconf -n
<spoiler>
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
dovecot_destination_recipient_limit = 1
inet_interfaces = all
inet_protocols = ipv4
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
maximal_backoff_time = 8000s
maximal_queue_lifetime = 7d
minimal_backoff_time = 1000s
mydestination = $myhostname,localhost.$myhostname,localhost
mydomain = site.ru
myhostname = site.ru
mynetworks = 127.0.0.0/8
myorigin = $mydomain
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_helo_timeout = 60s
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org, reject_rbl_client blackholes.easynet.nl reject_unauth_pipelining
smtpd_hard_error_limit = 12
smtpd_recipient_limit = 16
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination,
smtpd_relay_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination,
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_local_domain =
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining,
smtpd_soft_error_limit = 3
smtpd_tls_cert_file = /etc/postfix/certs/cert.pem
smtpd_tls_key_file = /etc/postfix/certs/key.pem
smtpd_tls_loglevel = 1
smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 450
virtual_alias_maps = mysql:/etc/postfix/sql/valias.cf
virtual_gid_maps = static:8
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = mysql:/etc/postfix/sql/vdomains.cf
virtual_mailbox_maps = mysql:/etc/postfix/sql/vmailbox.cf
virtual_minimum_uid = 1150
virtual_transport = dovecot
virtual_uid_maps = static:1150
doveconf -n
# 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.13 (7b14904)
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:104: 'imaps' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:104: 'pop3s' protocol is no longer necessary, remove it
# OS: Linux 4.8.0-53-generic x86_64 Ubuntu 16.04.2 LTS ext4
auth_debug = yes
auth_mechanisms = plain login cram-md5
auth_verbose = yes
base_dir = /var/run/dovecot/
disable_plaintext_auth = no
listen = *
log_path = /var/log/dovecot.log
mail_debug = yes
mail_gid = mail
mail_location = maildir:/var/vmail/%d/%n
mail_uid = vmail
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
}
plugin {
autocreate = Trash
autocreate2 = Junk
autocreate3 = Drafts
autocreate4 = Sent
autosubscribe = Trash
autosubscribe2 = Junk
autosubscribe3 = Drafts
autosubscribe4 = Sent
}
protocols = pop3 imap
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-userdb {
group = mail
mode = 0666
user = vmail
}
}
ssl_cert = </etc/postfix/certs/cert.pem
ssl_key = </etc/postfix/certs/key.pem
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
verbose_ssl = yes
protocol imap {
mail_plugins = " autocreate"
}
последний maillog
<spoiler>
Jul 4 10:35:43 Ubuntu-1604-xenial-64-minimal postfix/smtps/smtpd[4261]: connect from researchscan463.eecs.umich.edu[141.212.122.208]
Jul 4 10:35:43 Ubuntu-1604-xenial-64-minimal postfix/smtps/smtpd[4261]: Anonymous TLS connection established from researchscan463.eecs.umich.edu[141.212.122.208]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Jul 4 10:35:44 Ubuntu-1604-xenial-64-minimal postfix/smtps/smtpd[4261]: disconnect from researchscan463.eecs.umich.edu[141.212.122.208] ehlo=1 quit=1 commands=2
Jul 4 10:38:35 Ubuntu-1604-xenial-64-minimal postfix/smtps/smtpd[4551]: connect from start-domain.cust.smartspb.net[11.130.13.220]
Jul 4 10:38:35 Ubuntu-1604-xenial-64-minimal postfix/smtps/smtpd[4551]: Anonymous TLS connection established from start-domain.cust.smartspb.net[11.130.13.220]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Jul 4 10:38:35 Ubuntu-1604-xenial-64-minimal postfix/trivial-rewrite[4553]: warning: do not list domain site.ru in BOTH mydestination and virtual_mailbox_domains
Jul 4 10:38:35 Ubuntu-1604-xenial-64-minimal postfix/smtps/smtpd[4551]: EF1BD3408F9: client=start-domain.cust.smartspb.net[11.130.13.220], sasl_method=CRAM-MD5, sasl_username=opt1@site.ru
Jul 4 10:38:36 Ubuntu-1604-xenial-64-minimal postfix/cleanup[4554]: EF1BD3408F9: message-id=<053cc2b9-13f8-451b-903b-f3784512bfbb@site.ru>
Jul 4 10:38:36 Ubuntu-1604-xenial-64-minimal postfix/qmgr[2454]: EF1BD3408F9: from=<opt1@site.ru>, size=1195, nrcpt=1 (queue active)
Jul 4 10:38:36 Ubuntu-1604-xenial-64-minimal postfix/trivial-rewrite[4553]: warning: do not list domain site.ru in BOTH mydestination and virtual_mailbox_domains
Jul 4 10:38:36 Ubuntu-1604-xenial-64-minimal postfix/local[4555]: EF1BD3408F9: to=<opt1@site.ru>, relay=local, delay=0.19, delays=0.17/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "opt1")
Jul 4 10:38:36 Ubuntu-1604-xenial-64-minimal postfix/cleanup[4554]: 1ADA63408FB: message-id=<20170704083836.1ADA63408FB@site.ru>
Jul 4 10:38:36 Ubuntu-1604-xenial-64-minimal postfix/bounce[4556]: EF1BD3408F9: sender non-delivery notification: 1ADA63408FB
Jul 4 10:38:36 Ubuntu-1604-xenial-64-minimal postfix/qmgr[2454]: 1ADA63408FB: from=<>, size=3000, nrcpt=1 (queue active)
Jul 4 10:38:36 Ubuntu-1604-xenial-64-minimal postfix/trivial-rewrite[4553]: warning: do not list domain site.ru in BOTH mydestination and virtual_mailbox_domains
Jul 4 10:38:36 Ubuntu-1604-xenial-64-minimal postfix/qmgr[2454]: EF1BD3408F9: removed
Jul 4 10:38:36 Ubuntu-1604-xenial-64-minimal postfix/local[4555]: 1ADA63408FB: to=<opt1@site.ru>, relay=local, delay=0.01, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced (unknown user: "opt1")
Jul 4 10:38:36 Ubuntu-1604-xenial-64-minimal postfix/qmgr[2454]: 1ADA63408FB: removed
Jul 4 10:38:36 Ubuntu-1604-xenial-64-minimal postfix/smtps/smtpd[4551]: disconnect from start-domain.cust.smartspb.net[11.130.13.220] ehlo=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=6
Jul 4 10:38:58 Ubuntu-1604-xenial-64-minimal postfix/smtps/smtpd[4551]: connect from start-domain.cust.smartspb.net[11.130.13.220]
Jul 4 10:38:59 Ubuntu-1604-xenial-64-minimal postfix/smtps/smtpd[4551]: Anonymous TLS connection established from start-domain.cust.smartspb.net[11.130.13.220]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Jul 4 10:38:59 Ubuntu-1604-xenial-64-minimal postfix/trivial-rewrite[4553]: warning: do not list domain site.ru in BOTH mydestination and virtual_mailbox_domains
Jul 4 10:38:59 Ubuntu-1604-xenial-64-minimal postfix/smtps/smtpd[4551]: 61D293408F9: client=start-domain.cust.smartspb.net[11.130.13.220], sasl_method=CRAM-MD5, sasl_username=opt@site.ru
Jul 4 10:38:59 Ubuntu-1604-xenial-64-minimal postfix/cleanup[4554]: 61D293408F9: message-id=<287aaece-0fd6-2d1f-d2d8-25513bd8f620@site.ru>
Jul 4 10:38:59 Ubuntu-1604-xenial-64-minimal postfix/qmgr[2454]: 61D293408F9: from=<opt@site.ru>, size=27034, nrcpt=1 (queue active)
Jul 4 10:38:59 Ubuntu-1604-xenial-64-minimal postfix/smtps/smtpd[4551]: disconnect from start-domain.cust.smartspb.net[11.130.13.220] ehlo=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=6
Jul 4 10:39:00 Ubuntu-1604-xenial-64-minimal postfix/smtp[4577]: 61D293408F9: to=<admiral-1@mail.ru>, relay=mxs.mail.ru[94.100.180.104]:25, delay=1.4, delays=0.25/0.01/0.45/0.74, dsn=2.0.0, status=sent (250 OK id=1dSJMK-0002NY-Bu)
Jul 4 10:39:00 Ubuntu-1604-xenial-64-minimal postfix/qmgr[2454]: 61D293408F9: removed
[/spoiler]