ic_rbl,
ic_spamass,
ic_masq,
+ ic_clamav,
ic_max
};
ic_keyword[3] = "rbl";
ic_keyword[4] = "spamassassin";
ic_keyword[5] = "masqdomain";
+ ic_keyword[6] = "clamav";
ic_boxtitle[0] = _("Local host aliases");
ic_boxtitle[1] = _("Directory domains");
ic_boxtitle[3] = _("RBL hosts");
ic_boxtitle[4] = _("SpamAssassin hosts");
ic_boxtitle[5] = _("Masqueradable domains");
+ ic_boxtitle[6] = _("ClamAV clamd hosts");
ic_desc[0] = _("(domains for which this host receives mail)");
ic_desc[1] = _("(domains mapped with the Global Address Book)");
ic_desc[3] = _("(hosts running a Realtime Blackhole List)");
ic_desc[4] = _("(hosts running the SpamAssassin service)");
ic_desc[5] = _("(Domains as which users are allowed to masquerade)");
+ ic_desc[6] = _("(hosts running the ClamAV clamd service)");
for (i=0; i<ic_max; ++i) {
ic_spec[i] = strdup("");
wprintf("<div id=\"content\" class=\"service\">\n");
wprintf("<div class=\"fix_scrollbar_bug\">"
- "<table border=0 width=100%% cellspacing=\"10px\" cellpadding=\"10px\"> "
+ "<table border=0 width=100%% cellspacing=\"10\" cellpadding=\"10\"> "
"<tr><td valign=top width=50%%>\n");
for (which=0; which<ic_max; ++which) {
if (which == (ic_max / 2)) {
wprintf("</td><td valign=top>");
}
svput("BOXTITLE", WCS_STRING, ic_boxtitle[which]);
- do_template("beginbox", NULL);
+ do_template("beginboxx", NULL);
wprintf("<span class=\"menudesc\">");
escputs(ic_desc[which]);
wprintf("</span><br />");
ic_rbl,
ic_spamass,
ic_masq,
+ ic_clamav,
ic_max
} ECfg;
{ HKEY("smarthost") },
{ HKEY("rbl") },
{ HKEY("spamassassin") },
- { HKEY("masqdomain") }
+ { HKEY("masqdomain") },
+ { HKEY("clamav") }
};
SVPutBuf("SERVCFG:INET:HOSTNAME", vContext, 1);
}
-void DeleteInectConfHash(StrBuf *Target, int nArgs, WCTemplateToken *Token, void *Context, int ContextType)
+void DeleteInetConfHash(StrBuf *Target, int nArgs, WCTemplateToken *Token, void *Context, int ContextType)
{
struct wcsession *WCC = WC;
- if (WCC->InetCfg == NULL)
- load_inetconf();
- DeleteHash(&WCC->InetCfg);
+
+ if (WCC->InetCfg != NULL)
+ DeleteHash(&WCC->InetCfg);
}
-HashList *GetInetConfHash(WCTemplateToken *Token)
+HashList *GetInetConfHash(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
{
struct wcsession *WCC = WC;
void *vHash;
if (WCC->InetCfg == NULL)
load_inetconf();
GetHash(WCC->InetCfg,
- Token->Params[2]->Start,
- Token->Params[2]->len,
+ Tokens->Params[2]->Start,
+ Tokens->Params[2]->len,
&vHash);
- svprintf(HKEY("SERVCFG:INET:TYPE"), WCS_STRING, Token->Params[2]->Start);
+ svprintf(HKEY("SERVCFG:INET:TYPE"), WCS_STRING, Tokens->Params[2]->Start);
return vHash;
}
{
WebcitAddUrlHandler(HKEY("display_inetconf"), display_inetconf, 0);
WebcitAddUrlHandler(HKEY("save_inetconf"), new_save_inetconf, AJAX);
- RegisterIterator("SERVCFG:INET", 1, NULL, GetInetConfHash, InetCfgSubst, NULL, CTX_INETCFG);
- RegisterNamespace("SERVCFG:FLUSHINETCFG",0, 0, DeleteInectConfHash, CTX_INETCFG);
+ RegisterIterator("SERVCFG:INET", 1, NULL, GetInetConfHash, InetCfgSubst, NULL, CTX_INETCFG, CTX_NONE);
+ RegisterNamespace("SERVCFG:FLUSHINETCFG",0, 0, DeleteInetConfHash, CTX_NONE);
}