////////////////////////////////////////////////////////////////////////////
-$Cambridge: exim/doc/doc-docbook/spec.ascd,v 1.3 2005/11/15 16:10:50 ph10 Exp $
+$Cambridge: exim/doc/doc-docbook/spec.ascd,v 1.4 2005/12/05 14:38:18 ph10 Exp $
This is the primary source of the Exim Manual. It is an AsciiDoc document
that is converted into DocBook XML for subsequent conversion into printing
%check_rfc2047_length% check length of RFC 2047 ``encoded words''
%delivery_date_remove% from incoming messages
%envelope_to_remote% from incoming messages
-%extract_addresses_remove_arguments%affects %-t% processing
+%extract_addresses_remove_arguments% affects %-t% processing
%headers_charset% default for translations
%qualify_domain% default for senders
%qualify_recipient% default for recipients
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.269 2005/12/01 14:21:25 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.270 2005/12/05 14:38:18 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
that it would not match correctly against @[] and not recognize the IPv6
addresses as local.
+PH/02 The ipliteral router was not recognizing addresses of the form user@
+ [ipv6:....] because it didn't know about the "ipv6:" prefix.
+
Exim version 4.60
-----------------
-/* $Cambridge: exim/src/src/routers/ipliteral.c,v 1.5 2005/09/12 15:09:55 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/ipliteral.c,v 1.6 2005/12/05 14:38:18 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
*/
host_item *h;
uschar *domain = addr->domain;
+uschar *ip;
int len = Ustrlen(domain);
int rc;
DEBUG(D_route) debug_printf("%s router called for %s: domain = %s\n",
rblock->name, addr->address, addr->domain);
-/* Check that the domain is an IP address enclosed in square brackets. If
-not, the router declines. Otherwise route to the single IP address, setting the
-host name to "(unnamed)". */
+/* Check that the domain is an IP address enclosed in square brackets. Remember
+to allow for the "official" form of IPv6 addresses. If not, the router
+declines. Otherwise route to the single IP address, setting the host name to
+"(unnamed)". */
if (domain[0] != '[' || domain[len-1] != ']') return DECLINE;
domain[len-1] = 0; /* temporarily */
-if (string_is_ip_address(domain+1, NULL) == 0)
+ip = domain + 1;
+if (strncmpic(ip, US"IPV6:", 5) == 0 || strncmpic(ip, US"IPV4:", 5) == 0)
+ ip += 5;
+
+if (string_is_ip_address(ip, NULL) == 0)
{
domain[len-1] = ']';
return DECLINE;
but if it is set, it should probably work. */
if (verify_check_this_host(&(rblock->ignore_target_hosts), NULL, domain,
- domain + 1, NULL) == OK)
+ ip, NULL) == OK)
{
DEBUG(D_route)
- debug_printf("%s is in ignore_target_hosts\n", domain+1);
+ debug_printf("%s is in ignore_target_hosts\n", ip);
addr->message = US"IP literal host explicitly ignored";
domain[len-1] = ']';
return DECLINE;
h = store_get(sizeof(host_item));
h->next = NULL;
-h->address = string_copy(domain+1);
+h->address = string_copy(ip);
h->port = PORT_NONE;
domain[len-1] = ']'; /* restore */
h->name = string_copy(domain);