<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="||nwimg||/tspeak_main.css" />
<script type="text/javascript">
<!--
function setTitle(){
	||ifequal||top||_top||
		window.top.document.title = "||cust_title|| - ||current_user|| - SPAM CONTROL";
	||endif||
}

function save_friends()
{
	if (document.configform.friends[0].checked) {
		document.configform.postcmd.value = "lcmd=user_friend_save&friend_mode=disabled&recent_out_auto=on";
		document.configform.submit();
	}
	else {
		document.configform.postcmd.value = "lcmd=user_friend_save&friend_mode=smite&friend_smite=1&recent_out_auto=on";
		document.configform.submit();
	}
}

function save_spam()
{
	if (document.configform.spam[0].checked) {
		document.configform.postcmd.value = "lcmd=user_spam_save&spam_store=0&spam_bounce=0&spam_vanish=0";
		document.configform.submit();
	}
	else {
		document.configform.postcmd.value = "lcmd=user_spam_save&spam_store=5&spam_bounce=0&spam_vanish=0";
		document.configform.submit();
	}

}

function save_spf()
{
	if (document.configform.spf[0].checked) {
		document.configform.postcmd.value = "lcmd=user_save_spf&spf_block=false";
		document.configform.submit();
	}
	else {
		document.configform.postcmd.value = "lcmd=user_save_spf&spf_block=true";
		document.configform.submit();
	}
}

//-->
</script>
<title>SPAM CONTROL</title>
</head>

<body background="||cust_panel_background||" bgcolor="||cust_panel_bgcolor||" onload="setTitle();">
<form name="configform" method="post" action="||action||">
	<input type="hidden" name="cmd" value="config" />
	<input type="hidden" name="page" value="config_surge" />
	<input type="hidden" name="utoken" value="||utoken||" />

	<input type="hidden" name="postcmd" value="" />

||ifdef||error||
	||include||errorinline.tpl||
||endif||

||ifdef||msg||
	||include||msginline.tpl||
||endif||

<!-- Save CMD -->
||ifinstr||surgemail_disallow||friends||
||else||
||ifdef||postcmd||
	||post_cmd||(||user_cgi_http_prefix||/cgi/user.cgi?cmd=auto_login&||postcmd||&show=na_msg.xml&vhost=||vhost||)||
||endif||

<!-- Get Friends settings -->
	||define||xcmd||lcmd=user_load_fcommon&show=na_friends.xml||
	||post_cmd||(||user_cgi_http_prefix||/cgi/user.cgi?cmd=auto_login&||xcmd||&vhost=||vhost||)||

<!--
friend_mode = '||friend_mode||'<br />
-->
||endif||

||ifinstr||surgemail_disallow||spam||
||else||
<!-- Get Spam settings -->
	||define||xcmd||lcmd=user_spam_load&show=na_spam.xml||
	||post_cmd||(||user_cgi_http_prefix||/cgi/user.cgi?cmd=auto_login&||xcmd||&vhost=||vhost||)||

<!--
spam_store = '||spam_store||'<br />
spam_bounce = '||spam_bounce||'<br />
spam_vanish = '||spam_vanish||'<br />
-->
	||undef||spam_enable||
	||ifgreater||spam_store||0||
		||define||spam_enable||true||
	||else||
		||ifequal||spam_store||-1||
			||define||spam_enable||true||
		||endif||
	||endif||
	||ifgreater||spam_bounce||0||
		||define||spam_enable||true||
	||else||
		||ifequal||spam_bounce||-1||
			||define||spam_enable||true||
		||endif||
	||endif||
	||ifgreater||spam_vanish||0||
		||define||spam_enable||true||
	||else||
		||ifequal||spam_vanish||-1||
			||define||spam_enable||true||
		||endif||
	||endif||
||endif||

||ifinstr||surgemail_disallow||spf||
||else||
<!-- Get SPF settings -->
	||define||xcmd||lcmd=user_load_spf&show=na_spf.xml||
	||post_cmd||(||user_cgi_http_prefix||/cgi/user.cgi?cmd=auto_login&||xcmd||&vhost=||vhost||)||

	||undef||spf_enable||
	||ifequal||spf_status||true||
		||define||spf_enable||true||
	||endif||
||endif||

<center>
<p>&nbsp;</p>

||undef||using_https||
||ifnempty||user_cgi_http_prefix||
	||ifinstr||user_cgi_http_prefix||https:||
		||define||using_https||true||
	||endif||
||else||
	||ifinstr||http_action||https:||
		||define||using_https||true||
	||endif||
||endif||
||ifdef||using_https||
<table cellpadding="5" bgcolor="#eeeeff" >
<tr>
	<td bgcolor="#D6D6CE">
		The command: <b>'<a href="||post_cmd_sent||">||lchop||post_cmd_sent||40||</a>'</b><br>
		is attempting to talk to an HTTPS server, which does not work you need to setup the
		webmai.ini setting:<br>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
||define||xshow||imaphost||
||ifempty||xshow||||define||xshow||pophost||||endif||
||ifempty||xshow||||define||xshow||mail.server.com||||endif||
		<b>user_cgi_http_prefix http://||xshow||:7080</b><br>
		To correctly point to surgemail's http user.cgi location.

		<br>&nbsp;<br>
		Due to this error, the details below could be incorrect.
	</td>
</tr>
</table>
<br>
||endif||
||ifdef||post_cmd_failed||
<table cellpadding="5" bgcolor="#eeeeff" >
<tr>
	<td bgcolor="#D6D6CE">
		The command: <b>'<a href="||post_cmd_sent||">||lchop||post_cmd_sent||40||</a>'</b><br>
		failed and returned the error:<br>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<b>'||post_cmd_failed||'</b>
		<br>&nbsp;<br>
		This could be caused by the mail server being currently unavailable.<br>
		Or that you will need to setup the webmail.ini setting:<br>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
||define||xshow||imaphost||
||ifempty||xshow||||define||xshow||pophost||||endif||
||ifempty||xshow||||define||xshow||mail.server.com||||endif||
		<b>user_cgi_http_prefix http://||xshow||:7080</b><br>

		To correctly point to surgemail's user.cgi location.

		<br>&nbsp;<br>
		Due to this error, the details below could be incorrect.
	</td>
</tr>
</table>
||endif||

<table cellpadding="5" bgcolor="#eeeeff" width="70%">
<tr>
	<td bgcolor="#D6D6CE" colspan="4">
		<table border="0" cellspacing="0" cellpadding="0" width="100%">
		<tr>
			<th width="100%">SPAM CONTROL</th>
			<td align="right" nowrap="nowrap"><a href="||action||?cmd=config&amp;force_connection=true&amp;utoken=||utoken||&amp;&amp;"><img border="0" alt="Back to main options page" src="||nwimg||/smallback.gif" /></a></td>
		</tr>
		</table>
	</td>
</tr>

||ifinstr||surgemail_disallow||friends||
||else||
<tr>
	<td nowrap="nowrap"><b>Friends:</b></td>
	<td nowrap="nowrap"><input type="radio" name="friends" value="on" disabled ||ifnequal||friend_mode||disabled||checked="checked"||endif||/> On
		<input type="radio" name="friends" value="off" disabled ||ifequal||friend_mode||disabled||checked="checked"||endif||/> Off
	</td>
	||ifequal||(||check_id||11||)||true||
		<td nowrap="nowrap"><a href="||action||?cmd=netwin_login_id-11&amp;utoken=||utoken||&amp;&amp;">Pending Emails</a></td>
	||endif||

	||ifequal||(||check_id||1||)||true||
		<td><a href="||action||?cmd=netwin_login_id-1&amp;utoken=||utoken||&amp;&amp;">Advanced</a></td>
	||endif||
</tr>
<tr>
	<td>&nbsp;</td>
	<td><a href="javascript:save_friends();"><b>||ifequal||friend_mode||disabled||Enable Friends||else||Disable Friends||endif||</b></a> </td>
</tr>
<tr>
	<td colspan="4" class="c">
	If Friends is turned on, a request for confirmation is sent back to any unknown sender and the message will be stored in your 'pending' folder.  The message is put in your Inbox when the sender confirms.
	</td>
</tr>
<tr><td>&nbsp;</td></tr>
||endif||

||ifinstr||surgemail_disallow||spam||
||else||
<tr>
	<td nowrap="nowrap"><b>Spam Filtering:</b></td>
	<td nowrap="nowrap"><input type="radio" name="spam" value="on" disabled ||ifdef||spam_enable||checked="checked"||endif||/> On
		<input type="radio" name="spam" value="off" disabled ||ifndef||spam_enable||checked="checked"||endif||/> Off
	</td>

	||ifequal||(||check_id||10||)||true||
		<td nowrap="nowrap"><a href="||action||?cmd=netwin_login_id-10&amp;utoken=||utoken||&amp;&amp;">Held Emails</a></td>
	||endif||

	||ifequal||(||check_id||4||)||true||
		<td><a href="||action||?cmd=netwin_login_id-4&amp;utoken=||utoken||&amp;&amp;">Advanced</a></td>
	||endif||
</tr>
<tr>
	<td>&nbsp;</td>
	<td><a href="javascript:save_spam();"><b>||ifdef||spam_enable||Disable Spam Filtering||else||Enable Spam Filtering||endif||</b></a> </td>
</tr>
<tr>
	<td colspan="4" class="c">
	If Spam Filtering is turned on, a message that has been flagged as spam will be put into your 'held' folder for 2 weeks, and then be deleted automatically.
	</td>
</tr>
<tr><td>&nbsp;</td></tr>
||endif||

||ifinstr||surgemail_disallow||spf||
||else||
<tr>
	<td nowrap="nowrap" ><b>SPF:</b></td>
	<td ><input type="radio" name="spf" class="clear" value="on" disabled ||ifdef||spf_enable||checked="checked"||endif||/> On
		<input type="radio" name="spf" class="clear" value="off" disabled ||ifndef||spf_enable||checked="checked"||endif||/> Off
	</td>

	||ifequal||(||check_id||12||)||true||
		<td><a href="||action||?cmd=netwin_login_id-12&amp;utoken=||utoken||&amp;&amp;">Advanced</a></td>
	||endif||
</tr>
<tr>
	<td>&nbsp;</td>
	<td> <a href="javascript:save_spf();"><b>||ifdef||spf_enable||Disable SPF||else||Enable SPF||endif||</b></a> </td>
</tr>
<tr>
	<td colspan="4" class="c">
	SPF (Sender Permitted From) ||lang_str||determines whether the connecting machine is allowed to send email for the domain in the 'from' address||.
	</td>
</tr>
<tr><td>&nbsp;</td></tr>
||endif||


		||ifdef||surgemail||
			||ifequal||(||check_id||9||)||true||
				||ifequal||use_id_autologin||true||
					<tr>
						<td colspan="4">
							<a href="||action||?cmd=netwin_login_id-9&amp;utoken=||utoken||&amp;&amp;">Filters and Exceptions</a><br />
							Use exceptions and filtering rules to organise your incoming mail.
						</td>
					</tr>
				||else||
					<tr>
						<td colspan="4">
							<a href="||action||?cmd=netwin_login-9&amp;utoken=||utoken||&amp;&amp;">Exceptions</a><br />
							Use exceptions and filtering rules to organise your incoming mail.
						</td>
					</tr>
				||endif||
			||else||
				||ifequal||cust_no_surgemail_links||true||
				||else||
					<tr>
						<td colspan="4">
							<a href="||action||?cmd=no_surgemail&amp;utoken=||utoken||">Exceptions</a><br />
							Use exceptions and filtering rules to organise your incoming mail.
						</td>
					</tr>
				||endif||
			||endif||
		||else||
			<tr>
				<td colspan="4">
					<a href="||action||?cmd=config&amp;force_connection=true&amp;page=config_rules&amp;utoken=||utoken||">||cust_display_name|| Filtering Rules</a><br />
					Setup filters to help you organise your email into folders.
				</td>
			</tr>
		||endif||
</table>


</td></tr>
</table>

<br />
</center>
</form>

</body>
</html>
