X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fmts.c;h=3588fecdcd7b902434761cfbd3f94495c9676492;hp=46f5990e655cc5ebcc387cde72c78b6480139838;hb=f6aa95b724fd8c791164abe7ee5468bf5c34f226;hpb=128545e06224233b7e91fc4c83f8830252fe16c9 diff --git a/sbr/mts.c b/sbr/mts.c index 46f5990..3588fec 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -48,10 +48,6 @@ static void mts_read_conf_file (FILE *fp); */ static char *mtsconf = nmhetcdir(/mts.conf); -static char *localname = ""; -static char *localdomain = ""; -static char *systemname = ""; - char *mmdfldir = MAILSPOOL; char *mmdflfil = ""; char *uucpldir = "/usr/spool/mail"; @@ -65,7 +61,7 @@ static char username[BUFSIZ]; static char fullname[BUFSIZ]; /* Variables for username masquerading: */ - boolean draft_from_masquerading = FALSE; /* also used from post.c */ + boolean draft_from_masquerading = FALSE; static boolean mmailid_masquerading = FALSE; boolean username_extension_masquerading = FALSE; /* " from addrsbr.c */ static char* masquerade = ""; @@ -73,16 +69,7 @@ static char* masquerade = ""; /* * MTS specific variables */ -#if defined(SMTPMTS) -static char *sm_method = "sendmail"; -int sm_mts = MTS_SENDMAIL; char *sendmail = SENDMAILPATH; -#endif - -/* - * SMTP stuff - */ -char *clientname = NULL; /* * Global MailDelivery file @@ -108,9 +95,6 @@ struct bind { }; static struct bind binds[] = { - { "localname", &localname }, - { "localdomain", &localdomain }, - { "systemname", &systemname }, { "mmdfldir", &mmdfldir }, { "mmdflfil", &mmdflfil }, { "uucpldir", &uucpldir }, @@ -118,14 +102,7 @@ static struct bind binds[] = { { "mmdelim1", &mmdlm1 }, { "mmdelim2", &mmdlm2 }, { "masquerade", &masquerade }, - -#if defined(SMTPMTS) - { "mts", &sm_method }, - { "sendmail", &sendmail }, -#endif - - { "clientname", &clientname }, - + { "sendmail", &sendmail }, { "maildelivery", &maildelivery }, { "everyone", &everyone }, { "noshell", &NoShell }, @@ -242,37 +219,23 @@ LocalName (void) mts_init ("mts"); - /* check if the mts.conf file specifies a "localname" */ - if (*localname) { - strncpy (buffer, localname, sizeof(buffer)); - } else { - memset(buffer, 0, sizeof(buffer)); + memset(buffer, 0, sizeof(buffer)); #ifdef HAVE_UNAME - /* first get our local name */ - uname (&name); - strncpy (buffer, name.nodename, sizeof(buffer) - 1); + /* first get our local name */ + uname (&name); + strncpy (buffer, name.nodename, sizeof(buffer) - 1); #else - /* first get our local name */ - gethostname (buffer, sizeof(buffer) - 1); + /* first get our local name */ + gethostname (buffer, sizeof(buffer) - 1); #endif - /* now fully qualify our name */ - - memset(&hints, 0, sizeof(hints)); - hints.ai_flags = AI_CANONNAME; - hints.ai_family = PF_UNSPEC; - if (getaddrinfo(buffer, NULL, &hints, &res) == 0) { - strncpy(buffer, res->ai_canonname, sizeof(buffer) - 1); - freeaddrinfo(res); - } - } - - /* - * If the mts.conf file specifies a "localdomain", - * we append that now. This should rarely be needed. - */ - if (*localdomain) { - strcat (buffer, "."); - strcat (buffer, localdomain); + /* now fully qualify our name */ + + memset(&hints, 0, sizeof(hints)); + hints.ai_flags = AI_CANONNAME; + hints.ai_family = PF_UNSPEC; + if (getaddrinfo(buffer, NULL, &hints, &res) == 0) { + strncpy(buffer, res->ai_canonname, sizeof(buffer) - 1); + freeaddrinfo(res); } return buffer; @@ -299,12 +262,6 @@ SystemName (void) mts_init ("mts"); - /* check if mts.conf file specifies a "systemname" */ - if (*systemname) { - strncpy (buffer, systemname, sizeof(buffer)); - return buffer; - } - #ifdef HAVE_UNAME uname (&name); strncpy (buffer, name.nodename, sizeof(buffer));