Postfix가 호스트 이름 대신 도메인에 연결을 시도합니다.

Postfix가 호스트 이름 대신 도메인에 연결을 시도합니다.

Postfix 구성에 몇 가지 문제가 있습니다. 이것부터 시작해 보겠습니다. Postfix 로그에서 Postfix는 . example.org대신 에 연결(SMTP)을 시도합니다 mailer.example.org. example.org다른 컴퓨터입니다.

example.org참고: 아래 도메인을 내가 소유한 도메인으로 대체했습니다 . example.org(웹 서버를 실행하는 컴퓨터)와 mailer.example.org(postfix를 실행하는 컴퓨터) 모두에 대한 DNS 확인이 정확합니다.

이메일을 보내려는 테스트:

ubuntu@mailer:~$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mailer.example.org ESMTP Postfix (Ubuntu)
ehlo mailer.example.org
250-mailer.example.org
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: <[email protected]>
250 2.1.0 Ok
rcpt to: <[email protected]>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
asdfasdf
.
250 2.0.0 Ok: queued as 3AB5A41927

/var/log/mail.log:

Sep  6 20:10:15 mailer postfix/smtpd[2785]: connect from localhost[127.0.0.1]
Sep  6 20:10:23 mailer postfix/smtp[2779]: connect to example.org[54.229.20.238]:25: Connection timed out
Sep  6 20:10:23 mailer postfix/smtp[2779]: 253C641852: to=<[email protected]>, relay=none, delay=1059, delays=1029/0.02/30/0, dsn=4.4.1, status=deferred (connect to example.org[54.229.20.238]:25: Connection timed out)
Sep  6 20:10:40 mailer postfix/smtpd[2785]: 3AB5A41927: client=localhost[127.0.0.1]
Sep  6 20:10:48 mailer postfix/cleanup[2789]: 3AB5A41927: message-id=<[email protected]>
Sep  6 20:10:48 mailer postfix/qmgr[2776]: 3AB5A41927: from=<[email protected]>, size=422, nrcpt=1 (queue active)
Sep  6 20:10:50 mailer postfix/smtpd[2785]: disconnect from localhost[127.0.0.1]

postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
local_recipient_maps =
mailbox_size_limit = 0
mydestination =
myhostname = mailer.example.org
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = $mydomain
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /mnt/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 5000
virtual_transport = virtual
virtual_uid_maps = static:5000

가능한 도움에 미리 감사드립니다. 차단 당했다 :(

건배, 크리스토프

답변1

댓글에서 복사됨:

example.org의 DNS MX 레코드는 어떤 모습인가요? 전혀 설정하지 않은 경우 기본적으로 도메인 이름이 사용됩니다. 최소한 mailer.example.org 및 임의의 가중치(예: 10)가 포함된 MX 레코드가 있어야 합니다. 또한 이 상자가 메일을 수신하려면 example.org가 가상 도메인(mysql에 있으므로 여기에 표시되지 않음)에 있거나 mydestination에 넣어야 합니다.

관련 정보