Welches Postfix-Timeout ist für smtpd_recipient_restrictions Scripte zuständig?
Hallo,
ich habe bei 2 Domains die bei mir Mails einliefern wollen ein Timeout-Problem. Die Server verbinden sich, senden mir ihre RCPT-To Daten, und dann überprüft ein SPF-Script ob alles korrekt ist. Nach 3 Minuten 30 Sekunden bricht unser Server wegen Timeout ab. Nach 5 Miniuten bekommt er die Antwort vom SPF-Script.
1.) Ich weiss dass der eigentliche Hauptgrund für das Timeout eine wahnsinnig langsame SPF auflösung bei diesen beiden speziellen Domains ist. 2.) Aber ich verstehe nicht welches Postfix-Timeout dafür zuständig ist für den Abbruch.
So wie ich die Parameter command_time_limit und policy-spf_time_limit verstehe müsste er mindestens 16 Minuten warten und bei SPF sogar unglaubliche 60 Minuten.
Welches Timeout übersehe ich, oder welches Timeout verstehe ich falsch?
Gruß Benedikt
Postconf:
command_time_limit = 1000s policy-spf_time_limit = 3600s
smtp_data_init_timeout = 120s smtp_mail_timeout = 300s smtp_rcpt_timeout = 300s
Log des Einlieferungsversuchs:
2015-04-12T15:35:43.452512+02:00 s16510537 postfix/smtpd[30673]: connect from mail-bn1bon0090.outbound.protection.outlook.com[157.56.111.90] 2015-04-12T15:35:43.890736+02:00 s16510537 postfix/smtpd[30673]: Anonymous TLS connection established from mail-bn1bon0090.outbound.protection.outlook.com[157.56.111.90]: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits) 2015-04-12T15:35:53.898612+02:00 s16510537 postgrey[27193]: action=pass, reason=triplet found, client_name=mail-bn1bon0090.outbound.protection.outlook.com, client_address=157.56.111.90, sender=[...]@starwoodhotels.com, recipient=[...]@owayo.com 2015-04-12T15:39:15.062377+02:00 s16510537 postfix/smtpd[30673]: NOQUEUE: reject: RCPT from mail-bn1bon0090.outbound.protection.outlook.com[157.56.111.90]: 451 4.3.5 Server configuration problem; from=<[...]@starwoodhotels.com> to=<[...]@owayo.com> proto=ESMTP helo=<na01-bn1-obe.outbound.protection.outlook.com> 2015-04-12T15:39:15.215569+02:00 s16510537 postfix/smtpd[30673]: disconnect from mail-bn1bon0090.outbound.protection.outlook.com[157.56.111.90] 2015-04-12T15:40:00.501212+02:00 s16510537 postfix/policy-spf[30675]: : Policy action=PREPEND Received-SPF: none (starwoodhotels.com: No applicable sender policy available) receiver=s16510537.onlinehome-server.info; identity=mailfrom; envelope-from="[...]@starwoodhotels.com"; helo=na01-bn1-obe.outbound.protection.outlook.com; client-ip=157.56.111.90 2015-04-12T15:41:40.049505+02:00 s16510537 postfix/policy-spf[30709]: : Policy action=PREPEND Received-SPF: none (starwoodhotels.com: No applicable sender policy available) receiver=s16510537.onlinehome-server.info; identity=mailfrom; envelope-from="[...]@starwoodhotels.com"; helo=na01-bn1-obe.outbound.protection.outlook.com; client-ip=157.56.111.90 2
Am 13.04.2015 um 11:21 schrieb Benedikt Schindler:
Hallo,
ich habe bei 2 Domains die bei mir Mails einliefern wollen ein Timeout-Problem. Die Server verbinden sich, senden mir ihre RCPT-To Daten, und dann überprüft ein SPF-Script ob alles korrekt ist. Nach 3 Minuten 30 Sekunden bricht unser Server wegen Timeout ab. Nach 5 Miniuten bekommt er die Antwort vom SPF-Script.
1.) Ich weiss dass der eigentliche Hauptgrund für das Timeout eine wahnsinnig langsame SPF auflösung bei diesen beiden speziellen Domains ist. 2.) Aber ich verstehe nicht welches Postfix-Timeout dafür zuständig ist für den Abbruch.
So wie ich die Parameter command_time_limit und policy-spf_time_limit verstehe müsste er mindestens 16 Minuten warten und bei SPF sogar unglaubliche 60 Minuten.
Welches Timeout übersehe ich, oder welches Timeout verstehe ich falsch?
Gruß Benedikt
Postconf:
command_time_limit = 1000s policy-spf_time_limit = 3600s
smtp_data_init_timeout = 120s smtp_mail_timeout = 300s smtp_rcpt_timeout = 300s
schaetze du willst
http://www.postfix.org/postconf.5.html#smtpd_timeout
aber warum dauert denn bitte die SPF DNS Aufloesung so lange daran solltest du arbeiten, wenn es nur ein best domain betrifft , besser diese whitelisten fuer das spf script als workaround ,statt an den timeouts zu drehen, ausserdem evtl nach besseren spf "script" suchen
Log des Einlieferungsversuchs:
2015-04-12T15:35:43.452512+02:00 s16510537 postfix/smtpd[30673]: connect from mail-bn1bon0090.outbound.protection.outlook.com[157.56.111.90] 2015-04-12T15:35:43.890736+02:00 s16510537 postfix/smtpd[30673]: Anonymous TLS connection established from mail-bn1bon0090.outbound.protection.outlook.com[157.56.111.90]: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits) 2015-04-12T15:35:53.898612+02:00 s16510537 postgrey[27193]: action=pass, reason=triplet found, client_name=mail-bn1bon0090.outbound.protection.outlook.com, client_address=157.56.111.90, sender=[...]@starwoodhotels.com, recipient=[...]@owayo.com 2015-04-12T15:39:15.062377+02:00 s16510537 postfix/smtpd[30673]: NOQUEUE: reject: RCPT from mail-bn1bon0090.outbound.protection.outlook.com[157.56.111.90]: 451 4.3.5 Server configuration problem; from=<[...]@starwoodhotels.com> to=<[...]@owayo.com> proto=ESMTP helo=<na01-bn1-obe.outbound.protection.outlook.com> 2015-04-12T15:39:15.215569+02:00 s16510537 postfix/smtpd[30673]: disconnect from mail-bn1bon0090.outbound.protection.outlook.com[157.56.111.90] 2015-04-12T15:40:00.501212+02:00 s16510537 postfix/policy-spf[30675]: : Policy action=PREPEND Received-SPF: none (starwoodhotels.com: No applicable sender policy available) receiver=s16510537.onlinehome-server.info; identity=mailfrom; envelope-from="[...]@starwoodhotels.com"; helo=na01-bn1-obe.outbound.protection.outlook.com; client-ip=157.56.111.90 2015-04-12T15:41:40.049505+02:00 s16510537 postfix/policy-spf[30709]: : Policy action=PREPEND Received-SPF: none (starwoodhotels.com: No applicable sender policy available) receiver=s16510537.onlinehome-server.info; identity=mailfrom; envelope-from="[...]@starwoodhotels.com"; helo=na01-bn1-obe.outbound.protection.outlook.com; client-ip=157.56.111.90 2
Best Regards MfG Robert Schetterer
schaetze du willst http://www.postfix.org/postconf.5.html#smtpd_timeout
aber warum dauert denn bitte die SPF DNS Aufloesung so lange daran
solltest du arbeiten, wenn es nur ein best domain betrifft , besser
diese whitelisten fuer das spf script als workaround ,statt an den
timeouts zu drehen, ausserdem evtl nach besseren spf "script"
suchen
Best Regards MfG Robert Schetterer
Danke,
ich habe inzwischen das Script (Standard OpenSuse 13.2 SPF-Script) mit einer Whitelist versehen. Das Problem liegt tatsächlich an ihrem DNS-Server. Wenn ich "dig -t TXT domain.com" ausführe, so sagt er mir dass die Antwort zu groß ist für UDP, und der Versuch es per TCP abzurufen dauert dann auch mit "dig" 4 Minuten.
Ich denke smtpd_timeout ist das Timeout was bei mir den abbruch auslöst.
Ich hoffe jedoch diese Wissen jetzt nie wieder benutzen zu müssen ;) .
Gruß Benedikt
Am 14.04.2015 um 13:50 schrieb Benedikt Schindler:
Das Problem liegt tatsächlich an ihrem DNS-Server. Wenn ich "dig -t TXT domain.com" ausführe, so sagt er mir dass die Antwort zu groß ist für UDP, und der Versuch es per TCP abzurufen dauert dann auch mit "dig" 4 Minuten.
Geht's da um dieses starwoodhotels.com?
Das dauert bei mir 5ms.
Du könntest unbound auf deinem Server installieren.
$ dig -t TXT starwoodhotels.com ;; Truncated, retrying in TCP mode.
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> -t TXT starwoodhotels.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48110 ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 0
;; QUESTION SECTION: ;starwoodhotels.com. IN TXT
;; ANSWER SECTION: starwoodhotels.com. 1596 IN TXT "v=spf1 ip4:155.72.128.80 ip4:155.72.128.81 ip4:155.72.92.61 ip4:155.72.92.62 ip4:155.72.128.163 ip4:155.72.128.164 ip4:155.72.100.4 ip4:155.72.224.1 ip4:155.72.193.11 ip4:155.72.128.174 ip4:155.72.128.175 ip4:155.72.92.26 ip4:155.72.92.27 ip4:155.72.92.28" " ip4:155.72.92.63 ip4:155.72.92.64 ip4:155.72.89.11 ip4:155.72.86.11 ip4:155.72.84.25 ip4:207.97.220.0/24 include:spf.protection.outlook.com ~all" starwoodhotels.com. 5196 IN TXT "google-site-verification=eu4wRG73jh3ttuk8PyIg52VKaYPI89txQ9yyP3Tf9kY" starwoodhotels.com. 1596 IN TXT "eNkem3X2IQIvumEa6Pmv9WGoXpBxXh6pXHT5x5Tfcyiq1Ul4FYibVxzegztxzvhJJacJLaBvACI7/WMGkyPcqw=="
;; AUTHORITY SECTION: starwoodhotels.com. 23588 IN NS pdns156.ultradns.org. starwoodhotels.com. 23588 IN NS pdns156.ultradns.com. starwoodhotels.com. 23588 IN NS pdns156.ultradns.net. starwoodhotels.com. 23588 IN NS pdns156.ultradns.biz.
;; Query time: 5 msec ;; SERVER: 213.133.98.98#53(213.133.98.98) ;; WHEN: Tue Apr 14 14:30:32 2015 ;; MSG SIZE rcvd: 765
participants (3)
-
Benedikt Schindler
-
Jochen Fahrner
-
Robert Schetterer