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 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. Wietse