Back to index

courier  0.68.2
Defines | Functions
smtproutes.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ROUTE_STARTTLS   1
#define ROUTE_NOSECURITY   2

Functions

char * smtproutes (const char *, int *)

Define Documentation

#define ROUTE_NOSECURITY   2

Definition at line 16 of file smtproutes.h.

#define ROUTE_STARTTLS   1

Definition at line 15 of file smtproutes.h.


Function Documentation

char* smtproutes ( const char *  ,
int *   
)

Definition at line 117 of file smtproutes.c.

{
       char *p, *q, *r;

       *flags=0;

       p=fetch_smtproutes(domain);

       if (!p)
              return (0);

       if ((q=strrchr(p, '/')) != 0)
       {
              for (*q++=0; (q=strtok(q, ", \r\t\n")) != NULL; q=0)
              {
                     char *r;

                     for (r=q; *r; r++)
                            *r=(int)(unsigned char)toupper(*r);

                     if (strcmp(q, "SECURITY=STARTTLS") == 0)
                            *flags |= ROUTE_STARTTLS;

                     if (strcmp(q, "SECURITY=NONE") == 0)
                            *flags |= ROUTE_NOSECURITY;

              }
       }

       /* Trim trailing spaces */

       for (q=r=p; *q; q++)
       {
              if (!isspace((int)(unsigned char)*q))
              {
                     r=q+1;
              }
       }
       *r=0;

       if (!*p)
       {
              free(p);
              p=0;
       }
       return (p);
}

Here is the call graph for this function:

Here is the caller graph for this function: