-/* $Cambridge: exim/src/src/verify.c,v 1.53 2009/01/21 19:14:53 fanf2 Exp $ */
-
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 2007 */
+/* Copyright (c) University of Cambridge 1995 - 2009 */
/* See the file NOTICE for conditions of use and distribution. */
/* Functions concerned with verifying things. The original code for callout
*/
static void PRINTF_FUNCTION(2,3)
-respond_printf(FILE *f, char *format, ...)
+respond_printf(FILE *f, const char *format, ...)
{
va_list ap;
}
else /* Single-key style */
{
- int sep = (Ustrcmp(lookup_list[search_type].name, "iplsearch") == 0)?
+ int sep = (Ustrcmp(lookup_list[search_type]->name, "iplsearch") == 0)?
':' : '.';
insize = host_aton(cb->host_address, incoming);
host_mask(insize, incoming, mlen);
/*************************************************
-* Invert an IP address for a DNS black list *
+* Invert an IP address *
*************************************************/
-/*
+/* Originally just used for DNS xBL lists, now also used for the
+reverse_ip expansion operator.
+
Arguments:
buffer where to put the answer
address the address to invert
*/
-static void
+void
invert_address(uschar *buffer, uschar *address)
{
int bin[4];
for (s = domain; *s != 0; s++)
{
- if (!isalnum(*s) && *s != '-' && *s != '.')
+ if (!isalnum(*s) && *s != '-' && *s != '.' && *s != '_')
{
log_write(0, LOG_MAIN, "dnslists domain \"%s\" contains "
"strange characters - is this right?", domain);
if (domain_txt != domain) for (s = domain_txt; *s != 0; s++)
{
- if (!isalnum(*s) && *s != '-' && *s != '.')
+ if (!isalnum(*s) && *s != '-' && *s != '.' && *s != '_')
{
log_write(0, LOG_MAIN, "dnslists domain \"%s\" contains "
"strange characters - is this right?", domain_txt);