Am 25.10.19 um 10:55 schrieb Matus UHLAR - fantomas: >>> Lars Liedtke: >>>> I am having trouble using reject_unknown_sender_domain. I boiled the >>>> whole restrictions down to >>>> >>>> smtpd_recipient_restrictions = warn_if_reject >>>> reject_unknown_sender_domain >>>> >>>> and still a mail do an invalid domain is not rejected or I am not >>>> warned >>>> about rejection: > >> Am 24.10.19 um 20:20 schrieb Wietse Venema: >>> reject_unknown_sender_domain will consider the domain as "existing" >>> - if a DNS query of type MX, A, or AAAA (if compiled with IPv6 >>> support) produces a resource record, >>> - or the above query produces a response and you have configured >>> an smtpd_dns_reply_filter that removed those resource records. > > On 25.10.19 10:00, Lars Liedtke wrote: >> Unfortunately both cases turn out negative: >> >> - $ drill domain.invalid any >> ;; ->>HEADER<<- opcode: QUERY, rcode: SERVFAIL, id: 49179 > > this is your problem, the rcode should be NXDOMAIN. > > SERVFAIL means that the dns server failed to find out whether the domain > exists. > > it's a DNS problem.
Right and not :-( Right: The SERVFAIL part. Wrong: even with a domain that does not exist and a DNS-Lookup delievers NXDOMAIN still the Domain ist not rejected. $ drill dgibsjaganicht.de ;; ->>HEADER<<- opcode: QUERY, rcode: NXDOMAIN, id: 31428 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; dgibsjaganicht.de. IN A ;; ANSWER SECTION: ;; AUTHORITY SECTION: ;; ADDITIONAL SECTION: ;; Query time: 0 msec ;; SERVER: 10.0.2.3 ;; WHEN: Fri Oct 25 11:31:55 2019 ;; MSG SIZE rcvd: 35 Oct 25 11:25:26 mailstore postfix/smtpd[16444]: >>> START Recipient address RESTRICTIONS <<< Oct 25 11:25:26 mailstore postfix/smtpd[16444]: generic_checks: name=reject_unknown_sender_domain Oct 25 11:25:26 mailstore postfix/smtpd[16444]: reject_unknown_address: [email protected] Oct 25 11:25:26 mailstore postfix/smtpd[16444]: ctable_locate: leave existing entry key [email protected][email protected] Oct 25 11:25:26 mailstore postfix/smtpd[16444]: generic_checks: name=reject_unknown_sender_domain status=0 Oct 25 11:25:26 mailstore postfix/smtpd[16444]: generic_checks: name=reject_unknown_recipient_domain Oct 25 11:25:26 mailstore postfix/smtpd[16444]: reject_unknown_address: [email protected] Oct 25 11:25:26 mailstore postfix/smtpd[16444]: ctable_locate: move existing entry key [email protected][email protected] Additionally, I only see the status=0 in the logfile if reject_unknown_sender_domain is inside the smtpd_recipient_restrictions; if it is in the smtpd_sender_restrictions I only see this: Oct 25 11:25:26 mailstore postfix/smtpd[16444]: generic_checks: name=reject_non_fqdn_sender Oct 25 11:25:26 mailstore postfix/smtpd[16444]: reject_non_fqdn_address: [email protected] Oct 25 11:25:26 mailstore postfix/smtpd[16444]: generic_checks: name=reject_non_fqdn_sender status=0 Oct 25 11:25:26 mailstore postfix/smtpd[16444]: generic_checks: name=reject_unknown_sender_domain Oct 25 11:25:26 mailstore postfix/smtpd[16444]: reject_unknown_address: [email protected] Oct 25 11:25:26 mailstore postfix/smtpd[16444]: rewrite_clnt: cached: local: [email protected] -> [email protected] -- punkt.de GmbH * Kaiserallee 13a * 76133 Karlsruhe Tel. 0721 9109 0 * Fax 0721 9109 100 [email protected] https://www.punkt.de Gf: Jürgen Egeling AG Mannheim 108285
0xDD6D744EC1628062.asc
Description: application/pgp-keys
