X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=zotnet%2Fmts%2Fmts.c;h=7d9b718d108cf773777e901735660a64032868c1;hp=3b0b1809d3d869b19567c7e9907b0548f5c19ebb;hb=df7b16cb148474b3b80dbf1e226e858cf1e47edb;hpb=2bb7e26c6ae27f9b8a0ca9e5b7ddd1c824bcedda diff --git a/zotnet/mts/mts.c b/zotnet/mts/mts.c index 3b0b180..7d9b718 100644 --- a/zotnet/mts/mts.c +++ b/zotnet/mts/mts.c @@ -66,11 +66,12 @@ static boolean mmailid_masquerading = FALSE; boolean username_extension_masquerading = FALSE; /* " from addrsbr.c */ static char* masquerade = ""; - /* * MTS specific variables */ -#if defined(SENDMTS) || defined(SMTPMTS) +#if defined(SMTPMTS) +static char *sm_method = "smtp"; +int sm_mts = MTS_SMTP; char *hostable = nmhetcdir(/hosts); char *sendmail = SENDMAILPATH; #endif @@ -132,12 +133,10 @@ static struct bind binds[] = { { "mmdelim2", &mmdlm2 }, { "masquerade", &masquerade }, -#if defined(SENDMTS) || defined(SMTPMTS) - { "hostable", &hostable }, -#endif - -#ifdef SENDMTS - { "sendmail", &sendmail }, +#if defined(SMTPMTS) + { "mts", &sm_method }, + { "hostable", &hostable }, + { "sendmail", &sendmail }, #endif { "clientname", &clientname }, @@ -209,6 +208,17 @@ mts_init (char *name) if (strstr(masquerade, "username_extension") != NULL) username_extension_masquerading = TRUE; + +#ifdef SMTPMTS + if (strcmp(sm_method, "smtp") == 0) + sm_mts = MTS_SMTP; + else if (strcmp(sm_method, "sendmail") == 0) + sm_mts = MTS_SENDMAIL; + else { + advise(NULL, "unsupported \"mts\" value in mts.conf: %s", sm_method); + sm_mts = MTS_SMTP; + } +#endif }