On Mon, Apr 11, 2011 at 02:06:51PM +0200, Administrator Systemu wrote: > Hello all! > > I'm looking at logs of my postfix-2.6.6 and wonder how postfix chooses > which MX it'll connect.
Random DNS order, as perturbed by demand-caching of sessions. Log parsers should look at lines without "conn_use=<number>," when counting MX host frequency, and should avoid counting multi-recipient messages as multiple uses of the same MX. > There is some "cool" configured domain simplusnet.pl: > > simplusnet.pl. 300 IN MX 10 mx1.plusnet.pl. > simplusnet.pl. 300 IN MX 20 mx2.plusnet.pl. > simplusnet.pl. 300 IN MX 50 mx3.plusnet.pl. Mail deliveries will try mx1, but if that tempfails, mx2 or perhaps mx3 may be tried in turn. > mx1 & mx3 resolve to the same IP address, and permanently refuses > connections to smtp port. > > Works only mx2. And now going back to logs: > > Apr 11 00:15:27 [postfix/smtp] 77ECE33058: to=<[email protected]>, > relay=none, delay=0.07, delays=0.06/0/0.02/0, dsn=4.4.1, status=deferred > (connect to mx3.plusnet.pl[212.2.120.79]:25: Connection refused) The connection to mx2 failed. > Apr 11 00:24:37 [postfix/smtp] 77ECE33058: to=<[email protected]>, > relay=none, delay=550, delays=550/0.01/0.02/0, dsn=4.4.1, status=deferred > (connect to mx3.plusnet.pl[212.2.120.79]:25: Connection refused) The connection to mx2 failed... > Apr 11 13:14:48 [postfix/smtp] 77ECE33058: to=<[email protected]>, > relay=mx2.plusnet.pl[212.2.120.80]:25, delay=46761, > delays=46750/0.02/0.16/10, dsn=2.0.0, status=sent (250 OK > id=1Q9F4n-0000Hj-LU) Finally, after almost a day of trying, the connection to mx2 worked. > Heh after 15 tries and 13 hours mail is delivered. Why postfix uses mx3 so > many times? Because mx2 is unreachable most of the time. > And I have deliveries that not succeeded at all, because postfix was > connecting only to mx3 till delivery expired. This is not the case. You are not looing at all pertinent log entries. -- Viktor.
