Duane Hill: > A quick search on the web I found this for IPv6 (all on one line): > > /^(((?=(?>.*?::)(?!.*::)))(::)?(([0-9A-F]{1,4})::?){0,5}|((?5):){6})(\2((?5)(::? > |$)){0,2}|((25[0-5]|(2[0-4]|1[0-9]|[1-9])?[0-9])(\.|$)){4}|(?5):(?5))(?<![^:]:|\ > .)\z/i
That may be overkill. While looking up the remote SMTP client hostname, Postfix enforces proper domain name syntax (well almost - it allows "_" in hostnames). Names that don't satisfy the rule are treated as "unknown". Thus, for check_client_access table lookups, Postfix does the following queries: - A domain name (which never contains ":"), and perhaps suffixes of the domain. - An IPv4 address (which never contains ":"), and perhaps prefixes of the address. - An IPv6 address (which always contains ":"), and perhaps prefixes of the addres. Some table types such as CIDR ignore the domain name. With table types such as CIDR, regexp and pcre, check_client_access does no prefix/suffix lookups. Given this, a pcre rule with ``/:/ DUNNO'' is sufficient to skip IPv6 addresses. Wietse