LINUX.ORG.RU
ФорумAdmin

Postfix не видит свой домен - не определяет хост

 


0

1

На виртуалке настраиваю почту Postfix+Dovecot, инфу брал из разных источников. Столкнулся с ошибкой:

Mar 16 01:05:32 ml postfix/smtpd[2453]: connect from unknown[192.168.1.2]
Mar 16 01:05:32 ml postfix/smtpd[2453]: 858F7FFB4B: client=unknown[192.168.1.2], sasl_method=PLAIN, sasl_username=t1@test.loc
Mar 16 01:05:32 ml postfix/cleanup[2463]: 858F7FFB4B: message-id=<56ECE98A.9050107@test.loc>
Mar 16 01:05:32 ml postfix/qmgr[2439]: 858F7FFB4B: from=<t1@test.loc>, size=686, nrcpt=1 (queue active)
Mar 16 01:05:32 ml postfix/smtpd[2453]: disconnect from unknown[192.168.1.2]
Mar 16 01:05:32 ml postfix/smtp[2465]: 858F7FFB4B: to=<t2@test.loc>, relay=none, delay=0.3, delays=0.07/0.01/0.22/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=test.loc type=A: Host not found)
Mar 16 01:05:32 ml postfix/cleanup[2463]: CE786FFBD9: message-id=<20160315200532.CE786FFBD9@ml.test.loc>
Mar 16 01:05:32 ml postfix/qmgr[2439]: CE786FFBD9: from=<>, size=2509, nrcpt=1 (queue active)
Mar 16 01:05:32 ml postfix/bounce[2466]: 858F7FFB4B: sender non-delivery notification: CE786FFBD9
Mar 16 01:05:32 ml postfix/qmgr[2439]: 858F7FFB4B: removed
Mar 16 01:05:33 ml postfix/smtp[2465]: CE786FFBD9: to=<t1@test.loc>, relay=none, delay=0.16, delays=0.01/0/0.15/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=test.loc type=A: Host not found)
Mar 16 01:05:33 ml postfix/qmgr[2439]: CE786FFBD9: removed
Конфиг postfix:
myhostname = ml.test.loc
mydomain = test.loc

mynetworks = 127.0.0.0/8  192.168.1.0/24
# Размер почтового ящика (0 - неограничено)
mailbox_size_limit = 0
#recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4

# Текст приветственного баннера, который отображается после кода состояния 220 в SMTP
smtpd_banner = $myhostname ESMTP $mail_name 
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

readme_directory = no

# SMTP server response code when recipient or domain not found.
unknown_local_recipient_reject_code = 550

debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    ddd $daemon_directory/$process_name $process_id & sleep 5

debug_peer_level = 2

# Default message_size_limit.
message_size_limit = 15728640
# Mailbox type
home_mailbox = Maildir/

# TLS конфигурация
smtpd_use_tls = yes
smtpd_tls_cert_file=/etc/postfix/certificate/smtpd.pem
smtpd_tls_key_file=/etc/postfix/certificate/smtpd.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes

# MySQL конфигурация
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysqlconf/virtual_forwardings.cf, mysql:/etc/postfix/mysqlconf/virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysqlconf/virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysqlconf/virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000

# SASL конфигурация
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
broken_sasl_auth_clients = yes

# Настройка ограничений SMTPD
#smtpd_delay_reject = yes

# Accepted local emails
mydestination = $myhostname, localhost, localhost.localdomain
#
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps 
virtual_transport = dovecot

# Алиасы
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

# HELO restriction
smtpd_helo_required = yes
smtpd_helo_restrictions =
    permit_mynetworks
    permit_sasl_authenticated

# Sender restrictions
smtpd_sender_restrictions =
    permit_mynetworks
    permit_sasl_authenticated

# Recipient restrictions
smtpd_recipient_restrictions =
    permit_mynetworks
    permit_sasl_authenticated

Почту отправляю через Thunderbird

На этой же виртуалке развернул iRedMail - почта ходит Не могу понять, в чем отличия...



Последнее исправление: cetjs2 (всего исправлений: 1)

Добавить $mydomain в mydestination.

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