On Tue, Aug 20, 2013 at 02:23:21PM -0400, Wietse Venema wrote: > Nicolas KOWALSKI: > > I am not able to have an IPv6 rDNS record with my ISP, only an IPv4 one. > > I guess this is why it works when using IPv4 (tested by forcing > > inet_protocols = ipv4), and does not work any more with IPv6. > > > > Is it possible to have outgoing mail to gmail (or another domain) sent > > using my IPv4 interface? > > /etc/postfix/main.cf: > transport_maps = hash:/etc/postfix/transport > > /etc/postfix/transport: > gmail.com smtp-ipv4: > > /etc/postfix/master.cf: > smtp-ipv4 unix .. .. .. .. smtp > -o inet_protocols=ipv4 > > # postmap /etc/postfix/transport > # postfix reload
Thanks, it works perfectly. > > For more automatic kludge, you could try to match the server reply > (with your IP address or other distinctive text), and replace "5XX > SPACE text" with "4XX SPACE text": > > /etc/postfix/main.cf: > smtp_reply_filter = pcre:/etc/postfix/smtp_reply_filter > > /etc/postfix/smtp_reply_filter: > # Postfix uses the last reply code in a multi-line reply. > /^5(\d\d .*your:ipv6:addr:here.*)/ 4$1 > > Then, Postfix will try to deliver to a different IP address. I also tried this workaround, but it does not seem to work as expected: the server reply is replaced, but the mail is still bounced: Aug 21 09:56:42 petole postfix/smtp[6690]: Trusted TLS connection established to gmail-smtp-in.l.google.com[2a00:1450:400c:c03::1b]:25: TLSv1.2 with cipher ECDHE-RSA-RC4-SHA (128/128 bits) Aug 21 09:56:42 petole postfix/smtp[6690]: gmail-smtp-in.l.google.com[2a00:1450:400c:c03::1b]:25: replacing server reply "550-5.7.1 [2a01:e35:8ae7:65f0::2 16] The sender does not meet basic ipv6" with "450-5.7.1 [2a01:e35:8ae7:65f0::2 16] The sender does not meet basic ipv6" Aug 21 09:56:42 petole postfix/smtp[6690]: 0275E402B6: to=<nicolas.kowal...@gmail.com>, relay=gmail-smtp-in.l.google.com[2a00:1450:400c:c03::1b]:25, delay=0.92, delays=0.03/0.06/0.63/0.2, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[2a00:1450:400c:c03::1b] said: 450-5.7.1 [2a01:e35:8ae7:65f0::2 16] The sender does not meet basic ipv6 550-5.7.1 sending guidelines of authentication and rdns resolution of sending 550-5.7.1 ip. Please review 550 5.7.1 https://support.google.com/mail/answer/81126for more information. q6si3458600wiz.0 - gsmtp (in reply to end of DATA command)) -- Nicolas