Back to index

courier  0.68.2
cmaildropfilter.c
Go to the documentation of this file.
00001 /*
00002 ** Copyright 1998 - 2000 Double Precision, Inc.
00003 ** See COPYING for distribution information.
00004 */
00005 
00006 #include      "courier.h"
00007 #include      <stdio.h>
00008 #include      <stdlib.h>
00009 #if    HAVE_UNISTD_H
00010 #include      <unistd.h>
00011 #endif
00012 
00013 static char *maildrop;
00014 
00015 const char *config_maildropfilter()
00016 {
00017        if (!maildrop)
00018        {
00019        char   *filename=config_localfilename("maildropfilter");
00020 
00021               maildrop=config_read1l(filename);
00022               free(filename);
00023 
00024               if (!maildrop)
00025                      maildrop="";
00026        }
00027        return (*maildrop ? maildrop:0);
00028 }