Back to index

courier  0.68.2
comesmtpidstring.c
Go to the documentation of this file.
00001 /*
00002 ** Copyright 1998 - 1999 Double Precision, Inc.
00003 ** See COPYING for distribution information.
00004 */
00005 
00006 #include      "courier.h"
00007 #include      <stdlib.h>
00008 #include      <string.h>
00009 
00010 static const char *esmtpidstring;
00011 
00012 const char *config_esmtpgreeting()
00013 {
00014        if (!esmtpidstring)
00015        {
00016        char   *f=config_localfilename("esmtpgreeting");
00017 
00018               if ((esmtpidstring=readfile(f, 0)) == 0)
00019               {
00020               const char *me=config_me();
00021 
00022                      esmtpidstring=strcat(strcpy(courier_malloc(
00023                             strlen(me)+sizeof(" ESMTP")), me), " ESMTP");
00024               }
00025               free(f);
00026        }
00027        return (esmtpidstring);
00028 }