postfix: FQDN에 대한 임시 조회 실패

postfix: FQDN에 대한 임시 조회 실패

나는 localhost로 확인(?)하려는 dur.bounceme.net의 FQDN을 사용하고 있습니다. 즉, 다음 주소로 메일을 보내겠습니다.[이메일 보호됨]user@localhost로 전달됩니다.

나는 다음을 시도했다이에 대한 우분투 가이드그리고 약간 원을 그리며 가는 것 같습니다.

root@dur:~#
root@dur:~# postfix stop
postfix/postfix-script: stopping the Postfix mail system
root@dur:~# postfix start
postfix/postfix-script: starting the Postfix mail system
root@dur:~# telnet dur.bounceme.net 25
Trying 127.0.1.1...
telnet: Unable to connect to remote host: Connection refused
root@dur:~#
root@dur:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 dur.bounceme.net ESMTP Postfix (Ubuntu)
ehlo dur
250-dur.bounceme.net
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]
451 4.3.0 <[email protected]>: Temporary lookup failure
rcpt to:thufir@localhost
451 4.3.0 <thufir@localhost>: Temporary lookup failure
quit
221 2.0.0 Bye
Connection closed by foreign host.
root@dur:~#
root@dur:~# grep telnet /var/log/mail.log
Aug 28 00:24:45 dur postfix/smtpd[18256]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.0 <thufir@localhost>: Temporary lookup failure; from=<[email protected]> to=<thufir@localhost> proto=ESMTP helo=<dur>
Aug 28 00:24:58 dur postfix/smtpd[18256]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<dur>
Aug 28 00:54:55 dur postfix/smtpd[18825]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<dur>
Aug 28 00:55:08 dur postfix/smtpd[18825]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.0 <thufir@localhost>: Temporary lookup failure; from=<[email protected]> to=<thufir@localhost> proto=ESMTP helo=<dur>
root@dur:~#
root@dur:~# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
default_transport = smtp
home_mailbox = Maildir/
inet_interfaces = loopback-only
mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/01-mail-stack-delivery.conf -m "${EXTENSION}"
mailbox_size_limit = 0
mailman_destination_recipient_limit = 1
mydestination = dur, dur.bounceme.net, localhost.bounceme.net, localhost
myhostname = dur.bounceme.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
readme_directory = no
recipient_delimiter = +
relay_domains = lists.dur.bounceme.net
relay_transport = relay
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/ssl-mail.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-mail.key
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport
root@dur:~# 

답변1

첫째, dur.bounceme.net의 별칭이 잘못 설정되었습니다. 127.0.0.1 대신 127.0.1.1에 연결을 시도합니다.

둘째, postfix가 어떤 도메인을 로컬로 간주해야 하는지 알려줘야 합니다. 귀하가 링크한 웹페이지는 메일링 리스트 서비스 설정에 관한 것입니다. 대신 postfix 문서를 살펴봐야 합니다. "가짜 도메인"이 작동하는 데 필요한 정보가 있습니다.읽어보기 파일.

답변2

글쎄, 나는 Jenny가 제공한 답변을 전체적으로 이해했는지 잘 모르겠습니다. 질문에는 결함이 있었습니다(물론). 해결책은 두 개의 루프백을 사용하는 것입니다. 이렇게 하면 아래와 같이 원하는 결과를 얻을 수 있습니다.

thufir@dur:~$ 
thufir@dur:~$ 
thufir@dur:~$ swaks --to thufir@localhost
=== Trying localhost:25...
=== Connected to localhost.
<-  220 dur.bounceme.net ESMTP Postfix (Ubuntu)
 -> EHLO dur.bounceme.net
<-  250-dur.bounceme.net
<-  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:<thufir@localhost>
<-  250 2.1.5 Ok
 -> DATA
<-  354 End data with <CR><LF>.<CR><LF>
 -> Date: Sun, 08 Jun 2014 04:24:58 -0700
 -> To: thufir@localhost
 -> From: [email protected]
 -> Subject: test Sun, 08 Jun 2014 04:24:58 -0700
 -> X-Mailer: swaks v20130209.0 jetmore.org/john/code/swaks/
 -> 
 -> This is a test mailing
 -> 
 -> .
<-  250 2.0.0 Ok: queued as 2FDAB221E21
 -> QUIT
<-  221 2.0.0 Bye
=== Connection closed with remote host.
thufir@dur:~$ 
thufir@dur:~$ swaks --to [email protected]
=== Trying dur.bounceme.net:25...
=== Connected to dur.bounceme.net.
<-  220 dur.bounceme.net ESMTP Postfix (Ubuntu)
 -> EHLO dur.bounceme.net
<-  250-dur.bounceme.net
<-  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>
 -> Date: Sun, 08 Jun 2014 04:25:05 -0700
 -> To: [email protected]
 -> From: [email protected]
 -> Subject: test Sun, 08 Jun 2014 04:25:05 -0700
 -> X-Mailer: swaks v20130209.0 jetmore.org/john/code/swaks/
 -> 
 -> This is a test mailing
 -> 
 -> .
<-  250 2.0.0 Ok: queued as A7365221E21
 -> QUIT
<-  221 2.0.0 Bye
=== Connection closed with remote host.
thufir@dur:~$ 
thufir@dur:~$ 

받는 사람 localhost과 받는 사람의 메일이 dur.bounceme.net올바르게 배달되었습니다.

다음과 같이 127.0.0.1 루프백과 127.0.1.1 루프백의 차이점이 확실하지 않습니다.

IPv4 네트워크 표준은 루프백 목적으로 전체 127.0.0.0/8 주소 블록을 예약합니다. 이는 16,777,214개 주소(127.0.0.1~127.255.255.254) 중 하나로 전송된 모든 패킷이 루프백된다는 의미입니다.

http://en.wikipedia.org/wiki/Localhost#Name_solution

어떤 경우에도 특정 문제는 Postfix나 Dovecot의 기본 구성으로 인해 발생한 것이 아닙니다.http://packages.ubuntu.com/trusty/mail-stack-delivery패키지는 추가 구성 없이 올바르게 작동합니다.

특정 IP 주소가 localhost용으로 예약된 이유가 확실하지 않지만 더 자세히 읽어 보겠습니다.

관련 정보