Back to index

courier  0.68.2
Functions
addrlower.c File Reference
#include "courier.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

void domainlower (char *c)
void locallower (char *c)

Function Documentation

void domainlower ( char *  c)

Definition at line 16 of file addrlower.c.

{
       if ((c=strchr(c, '@')) != 0)
       {
              while (*c)
              {
                     *c=tolower((int)(unsigned char)*c);
                     ++c;
              }
       }
}

Here is the caller graph for this function:

void locallower ( char *  c)

Definition at line 28 of file addrlower.c.

{
static int islocallower=0;

       if (islocallower == 0)
       {
       char   *s=config_localfilename("locallowercase");

              islocallower = access(s, 0) == 0 ? 1:-1;
              free(s);
       }

       if ( islocallower > 0 || (
#if     HAVE_STRNCASECMP
              strncasecmp(c, "postmaster", 10)
#else
              strnicmp(c, "postmaster", 10)
#endif
                     == 0 && (c[10] == '\0' || c[10] == '@')))
       {
              while (*c)
              {
                     *c=tolower((int)(unsigned char)*c);
                     if (*c++ == '@')     break;
              }
       }
}

Here is the call graph for this function:

Here is the caller graph for this function: