Quanah Gibson-Mount: > --On Monday, October 29, 2012 2:21 PM -0400 Wietse Venema > <wie...@porcupine.org> wrote: > > > Quanah Gibson-Mount: > >> When I execute postconf -d mynetworks, it returns: > >> > >> zimbra@zre-ldap002:~$ postconf -d mynetworks > >> mynetworks = 127.0.0.0/8 10.137.242.0/24 [::1]/128 > >> [fc00:10:137:242::]/64 [fe80::%eth0]/64 > > > > Try this. Build Postfix without installing it, then execute > > ``bin/postconf -d'' to check that Postfix removes the datalink > > suffix that is added by the system. > > Thanks Wietse, > > The patch definitely strips off the %eth0 bit. > > [root@zre-rhel6-64 postfix]# /opt/zimbra/postfix/sbin/postconf -d mynetworks > mynetworks = 127.0.0.0/8 10.137.242.0/24 [::1]/128 [fc00:10:137:242::]/64 > [fe80::]/64
Good. Maybe it is worthwhile to strip the datalink suffix from the result if the getaddrinfo() system library routine. Instead of the previous patch, can you try this one? It will get rid of all instances where a datalink suffix might pop up as Postfix collects system information. Wietse *** ./src/util/myaddrinfo.c- Tue Feb 1 15:04:28 2011 --- ./src/util/myaddrinfo.c Mon Oct 29 15:42:36 2012 *************** *** 78,83 **** --- 78,84 ---- /* into printable form. The result buffers should be large /* enough to hold the printable address or port including the /* null terminator. + /* This function strips off the IPv6 datalink suffix. /* /* sockaddr_to_hostname() converts a binary network address /* into a hostname or service. The result buffer should be *************** *** 202,207 **** --- 203,209 ---- #include <msg.h> #include <inet_proto.h> #include <myaddrinfo.h> + #include <split_at.h> /* Application-specific. */ *************** *** 607,622 **** } return (0); #else /* * Native getnameinfo(3) version. */ ! return (getnameinfo(sa, salen, ! hostaddr ? hostaddr->buf : (char *) 0, ! hostaddr ? sizeof(hostaddr->buf) : 0, ! portnum ? portnum->buf : (char *) 0, ! portnum ? sizeof(portnum->buf) : 0, ! NI_NUMERICHOST | NI_NUMERICSERV)); #endif } --- 609,628 ---- } return (0); #else + int ret; /* * Native getnameinfo(3) version. */ ! ret = getnameinfo(sa, salen, ! hostaddr ? hostaddr->buf : (char *) 0, ! hostaddr ? sizeof(hostaddr->buf) : 0, ! portnum ? portnum->buf : (char *) 0, ! portnum ? sizeof(portnum->buf) : 0, ! NI_NUMERICHOST | NI_NUMERICSERV); ! if (ret == 0 && sa->sa_family == AF_INET6) ! (void) split_at(hostaddr->buf, '%'); ! return (ret); #endif } *** ./src/util/Makefile.in- Sun Sep 23 19:28:54 2012 --- ./src/util/Makefile.in Mon Oct 29 15:44:12 2012 *************** *** 1526,1531 **** --- 1526,1532 ---- myaddrinfo.o: myaddrinfo.h myaddrinfo.o: mymalloc.h myaddrinfo.o: sock_addr.h + myaddrinfo.o: split_at.h myaddrinfo.o: stringops.h myaddrinfo.o: sys_defs.h myaddrinfo.o: valid_hostname.h