From: Art Cancro Date: Sun, 15 Nov 2009 04:41:43 +0000 (+0000) Subject: * Added a new category 'fallback smart host'. These are smart hosts that are used... X-Git-Tag: v7.86~616 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=6603cb8689e1da5f8d48cabc5075280601a9e63c * Added a new category 'fallback smart host'. These are smart hosts that are used only when direct delivery fails. It's just the thing for those sites that have a smart host available but prefer not to use it. --- diff --git a/citadel/domain.c b/citadel/domain.c index 304cf0ef8..7b862e97d 100644 --- a/citadel/domain.c +++ b/citadel/domain.c @@ -224,5 +224,10 @@ int getmx(char *mxbuf, char *dest) { strcat(mxbuf, "|"); } free(mxrecs); + + /* Append any fallback smart hosts we have configured. + */ + num_mxrecs += get_hosts(&mxbuf[strlen(mxbuf)], "fallbackhost"); + CtdlLogPrintf(CTDL_DEBUG, "\033[33m%d: %s\033[0m\n", num_mxrecs, mxbuf); return(num_mxrecs); } diff --git a/citadel/textclient/tuiconfig.c b/citadel/textclient/tuiconfig.c index a6cfde352..61f8e5837 100644 --- a/citadel/textclient/tuiconfig.c +++ b/citadel/textclient/tuiconfig.c @@ -393,27 +393,30 @@ void get_inet_rec_type(CtdlIPC *ipc, char *buf) { int sel; keyopt(" <1> localhost (Alias for this computer)\n"); - keyopt(" <2> smart-host (Forward all outbound mail to this host)\n"); - keyopt(" <3> directory (Consult the Global Address Book)\n"); - keyopt(" <4> SpamAssassin (Address of SpamAssassin server)\n"); - keyopt(" <5> RBL (domain suffix of spam hunting RBL)\n"); - keyopt(" <6> masq domains (Domains as which users are allowed to masquerade)\n"); - keyopt(" <7> ClamAV (Address of ClamAV clamd server)\n"); + keyopt(" <2> smart host (Forward all outbound mail to this host)\n"); + keyopt(" <3> fallback host (Send mail to this host only if direct delivery fails)\n"); + keyopt(" <4> directory (Consult the Global Address Book)\n"); + keyopt(" <5> SpamAssassin (Address of SpamAssassin server)\n"); + keyopt(" <6> RBL (domain suffix of spam hunting RBL)\n"); + keyopt(" <7> masq domains (Domains as which users are allowed to masquerade)\n"); + keyopt(" <8> ClamAV (Address of ClamAV clamd server)\n"); sel = intprompt("Which one", 1, 1, 7); switch(sel) { case 1: strcpy(buf, "localhost"); return; case 2: strcpy(buf, "smarthost"); return; - case 3: strcpy(buf, "directory"); + case 3: strcpy(buf, "fallbackhost"); return; - case 4: strcpy(buf, "spamassassin"); + case 4: strcpy(buf, "directory"); return; - case 5: strcpy(buf, "rbl"); + case 5: strcpy(buf, "spamassassin"); return; - case 6: strcpy(buf, "masqdomain"); + case 6: strcpy(buf, "rbl"); return; - case 7: strcpy(buf, "clamav"); + case 7: strcpy(buf, "masqdomain"); + return; + case 8: strcpy(buf, "clamav"); return; } } diff --git a/webcit/inetconf.c b/webcit/inetconf.c index d29594c1f..269967e4a 100644 --- a/webcit/inetconf.c +++ b/webcit/inetconf.c @@ -12,6 +12,7 @@ typedef enum _e_cfg { ic_localhost, ic_directory, ic_smarthost, + ic_fallback, ic_rbl, ic_spamass, ic_masq, @@ -31,6 +32,7 @@ ConstStrBuf CfgNames[] = { { HKEY("localhost") }, { HKEY("directory") }, { HKEY("smarthost") }, + { HKEY("fallbackhost") }, { HKEY("rbl") }, { HKEY("spamassassin") }, { HKEY("masqdomain") }, diff --git a/webcit/static/t/aide_inet_fallbackhosts.html b/webcit/static/t/aide_inet_fallbackhosts.html new file mode 100644 index 000000000..a2b190b1b --- /dev/null +++ b/webcit/static/t/aide_inet_fallbackhosts.html @@ -0,0 +1,14 @@ + + +
+ + + + +
+ + + + + +
diff --git a/webcit/static/t/aide_inetconf.html b/webcit/static/t/aide_inetconf.html index dc3264908..2f6e3621e 100644 --- a/webcit/static/t/aide_inetconf.html +++ b/webcit/static/t/aide_inetconf.html @@ -8,15 +8,16 @@
-
+


- +
+
-
+