* Added a new category 'fallback smart host'. These are smart hosts that are used...
authorArt Cancro <ajc@citadel.org>
Sun, 15 Nov 2009 04:41:43 +0000 (04:41 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 15 Nov 2009 04:41:43 +0000 (04:41 +0000)
citadel/domain.c
citadel/textclient/tuiconfig.c
webcit/inetconf.c
webcit/static/t/aide_inet_fallbackhosts.html [new file with mode: 0644]
webcit/static/t/aide_inetconf.html

index 304cf0ef846d9fc63ba9f863e05adf3c03bc20dd..7b862e97dba97d0e42b7a70388af1d5487402b0f 100644 (file)
@@ -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);
 }
index a6cfde35281361a0879e5c71e529de61a7d49e6d..61f8e58371760e25b910db509231d5a59014ebdc 100644 (file)
@@ -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;
        }
 }
index d29594c1f2aa32d24751885595809625b1ac7ce5..269967e4a7f9c243d7184c66fcd6885633f76a3c 100644 (file)
@@ -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 (file)
index 0000000..a2b190b
--- /dev/null
@@ -0,0 +1,14 @@
+<span class="menudesc">
+<?_("(send outbound mail to these hosts only when direct delivery fails)")>
+</span><br />
+<table border=0 cellspacing="2" cellpadding="2" width=94% class="altern" >
+<?ITERATE("SERVCFG:INET", "section_aide_inetconf_entry", 0, 0, -1, "fallbackhost")>
+<form method="post" action="save_inetconf">
+<input type="hidden" name="nonce" value='<?NONCE>'>
+<tr><td>
+<input type="text" name="ename" maxlength="64">
+<input type="hidden" name="etype" VALUE="fallbackhost">
+</td><td align=left>
+<input type="submit" name="oper" value="Add">
+<input type="hidden" name="template" value="aide_inetconf">
+</td></tr></table></form>
index dc3264908da8b51e41870061855b6175dc2a437e..2f6e3621e2f1e92c6a1aa1360a2627c72d303988 100644 (file)
@@ -8,15 +8,16 @@
 </div>
 <div id="content" class="service">
 <div class="fix_scrollbar_bug">
-<table border=0 width=100% cellspacing="10" cellpadding="10"> <tr><td valign=top width=50%>
+<table border=0 width=100% cellspacing="10" cellpadding="10"> <tr><td valign=top width="50%">
 
 
 <?DOBOXED("aide_inet_aliases", _("Local host aliases"))><br />
 <?DOBOXED("aide_inet_dirnames", _("Directory domains"))><br />
-<?DOBOXED("aide_inet_smarthosts", _("Smart hosts"))>
+<?DOBOXED("aide_inet_smarthosts", _("Smart hosts"))><br />
+<?DOBOXED("aide_inet_fallbackhosts", _("Fallback smart hosts"))><br />
 <?DOBOXED("aide_inet_notify", _("Notification hosts"))>
 
-</td><td valign=top>
+</td><td valign=top width="50%">
 
 
 <?DOBOXED("aide_inet_rbldns", _("RBL hosts"))><br />