aboutsummaryrefslogtreecommitdiffstats
path: root/config/postfix/postfix_search.php
diff options
context:
space:
mode:
authormarcelloc <marcellocoutinho@gmail.com>2011-12-01 13:36:59 -0200
committermarcelloc <marcellocoutinho@gmail.com>2011-12-01 13:36:59 -0200
commit1536d3590d52e56a67f3443df9aa3dfe378c3c18 (patch)
tree5cb97c85f5e752f00be45f9d2a78c7a6a6df0782 /config/postfix/postfix_search.php
parentd4c84dfdbad19306d1ef2827fcb4fc436b908106 (diff)
downloadpfsense-packages-1536d3590d52e56a67f3443df9aa3dfe378c3c18.tar.gz
pfsense-packages-1536d3590d52e56a67f3443df9aa3dfe378c3c18.tar.bz2
pfsense-packages-1536d3590d52e56a67f3443df9aa3dfe378c3c18.zip
postfix - package version 2.3
Diffstat (limited to 'config/postfix/postfix_search.php')
-rwxr-xr-xconfig/postfix/postfix_search.php66
1 files changed, 44 insertions, 22 deletions
diff --git a/config/postfix/postfix_search.php b/config/postfix/postfix_search.php
index d11505d4..b76f0554 100755
--- a/config/postfix/postfix_search.php
+++ b/config/postfix/postfix_search.php
@@ -55,12 +55,15 @@ include("head.inc");
<?php
$tab_array = array();
$tab_array[] = array(gettext("General"), false, "/pkg_edit.php?xml=postfix.xml&id=0");
- $tab_array[] = array(gettext("ACLs / Filter Maps"), false, "/pkg_edit.php?xml=postfix_acl.xml&id=0");
- $tab_array[] = array(gettext("Valid Recipients"), false, "/pkg_edit.php?xml=postfix_recipients.xml&id=0");
+ $tab_array[] = array(gettext("Domains"), false, "/pkg_edit.php?xml=postfix_domains.xml&id=0");
+ $tab_array[] = array(gettext("Recipients"), false, "/pkg_edit.php?xml=postfix_recipients.xml&id=0");
+ $tab_array[] = array(gettext("Access Lists"), false, "/pkg_edit.php?xml=postfix_acl.xml&id=0");
$tab_array[] = array(gettext("Antispam"), false, "/pkg_edit.php?xml=postfix_antispam.xml&id=0");
- $tab_array[] = array(gettext("XMLRPC Sync"), false, "/pkg_edit.php?xml=postfix_sync.xml&id=0");
- $tab_array[] = array(gettext("View config files"), false, "/postfix_view_config.php");
- $tab_array[] = array(gettext("Search Email"), true, "/postfix_search.php");
+ $tab_array[] = array(gettext("Sync"), false, "/pkg_edit.php?xml=postfix_sync.xml&id=0");
+ $tab_array[] = array(gettext("View config"), false, "/postfix_view_config.php");
+ $tab_array[] = array(gettext("Search mail"), true, "/postfix_search.php");
+ $tab_array[] = array(gettext("Queue"), false, "/postfix_queue.php");
+ $tab_array[] = array(gettext("About"), false, "/postfix_about.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -76,12 +79,12 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("From: ");?></td>
<td width="78%" class="vtable"><textarea id="from" rows="2" cols="50%"></textarea>
- <br><?=gettext("One email per line.");?></td>
+ <br><?=gettext("with wildcard'*' only one line else one email per line.<br>");?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("To: ");?></td>
<td width="78%" class="vtable"><textarea id="to" rows="2" cols="50%"></textarea>
- <br><?=gettext("One email per line.");?></td>
+ <br><?=gettext("with wildcard'*' only one line else one email per line.");?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("SID: ");?></td>
@@ -91,13 +94,23 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Subject: ");?></td>
<td width="78%" class="vtable"><input type="text" class="formfld unknown" id="subject" size="65%">
- <br><?=gettext("Subject to search, wildcard is '%'");?></td>
+ <br><?=gettext("Subject to search, wildcard is '*'");?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Message_id: ");?></td>
<td width="78%" class="vtable"><input type="text" class="formfld unknown" id="msgid" size="65%">
<br><?=gettext("Message unique id.");?></td>
</tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("server: ");?></td>
+ <td width="78%" class="vtable"><input type="text" class="formfld unknown" id="server" size="30%">
+ <br><?=gettext("postfix server.");?></td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Relay: ");?></td>
+ <td width="78%" class="vtable"><input type="text" class="formfld unknown" id="relay" size="30%">
+ <br><?=gettext("Message destination server");?></td>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Message Status: ");?></td>
<td width="78%" class="vtable">
@@ -106,7 +119,7 @@ include("head.inc");
<option value="sent">sent</option>
<option value="bounced">bounced</option>
<option value="reject">reject</option>
- <option value="warning">warning</option>
+ <option value="incoming">incoming</option>
</select><br><?=gettext("Max log messages to fetch per Sqlite file.");?></td>
</tr>
<tr>
@@ -135,13 +148,16 @@ include("head.inc");
<?php if ($handle = opendir('/var/db/postfix')) {
$total_files=0;
- while (false !== ($file = readdir($handle)))
- if (preg_match("/(\d+-\d+-\d+).db$/",$file,$matches)){
- $total_files++;
- $select_output= '<option value="'.$file.'">'.$matches[1]."</option>\n" . $select_output;
- }
- closedir($handle);
- echo '<select name="drop1" id="Select1" size="'.($total_files>8?8:$total_files+2).'" multiple="multiple">';
+ $array_files=array();
+ while (false !== ($file = readdir($handle)))
+ if (preg_match("/(\d+-\d+-\d+).db$/",$file,$matches))
+ $array_files[]=array($file,$matches[1]);
+ closedir($handle);
+ asort($array_files);
+ foreach ($array_files as $file)
+ $select_output= '<option value="'.$file[0].'">'.$file[1]."</option>\n" . $select_output;
+
+ echo '<select name="drop1" id="Select1" size="'.(count($array_files)>10?10:count($array_files)+2).'" multiple="multiple">';
echo $select_output;
echo '</select><br>'.gettext("Select what database files you want to use in your search.").'</td></td>';
}?>
@@ -156,6 +172,7 @@ include("head.inc");
<option value="delay" selected="selected">Delay</option>
<option value="status" selected="selected">Status</option>
<option value="status_info">Status Info</option>
+ <option value="server">Server</option>
<option value="subject">Subject</option>
<option value="size">Size</option>
<option value="sid">SID</option>
@@ -168,7 +185,8 @@ include("head.inc");
<tr>
<td width="22%" valign="top"></td>
- <td width="78%"><input name="Submit" type="submit" class="formbtn" id="search" value="<?=gettext("Search");?>" onclick="getsearch_results(true)">
+ <td width="78%"><input name="Submit" type="submit" class="formbtn" id="search" value="<?=gettext("Search");?>" onclick="getsearch_results('search')">
+ &nbsp;<input name="Submit" type="submit" class="formbtn" id="export" value="<?=gettext("Export");?>" onclick="getsearch_results('export')"></td>
</table>
</div>
@@ -196,7 +214,7 @@ function loopSelected(id)
return(selectedArray);
}
-function getsearch_results() {
+function getsearch_results(sbutton) {
var $new_from=$('from').value.replace("\n", "','");
var $new_to=$('to').value.replace("\n", "','");
var $new_sid=$('sid').value.replace("\n", "','");
@@ -209,12 +227,15 @@ function getsearch_results() {
alert ("Please select at least one message field to display results.");
}
else{
- $('search').value="Searching...";
+ if (sbutton == "search"){
+ $('search').value="Searching...";}
+ else{
+ $('export').value="exporting...";}
$('search_results').innerHTML="";
var $queuetype=$('queuetype').options[$('queuetype').selectedIndex].text;
var $queuemax=$('queuemax').options[$('queuemax').selectedIndex].text;
- var $pars="from="+$new_from+"&to="+$new_to+"&sid="+$new_sid+"&limit="+$queuemax+"&fields="+$fields+"&status="+$('status').value;
- var $pars= $pars+"&subject="+$('subject').value+"&msgid="+$('msgid').value+"&files="+$files+"&queue="+$queuetype;
+ var $pars="from="+$new_from+"&to="+$new_to+"&sid="+$new_sid+"&limit="+$queuemax+"&fields="+$fields+"&status="+$('status').value+"&server="+$('server').value;
+ var $pars= $pars+"&subject="+$('subject').value+"&msgid="+$('msgid').value+"&files="+$files+"&queue="+$queuetype+"&relay="+$('relay').value+"&sbutton="+sbutton;
//alert($pars);
var url = "/postfix.php";
var myAjax = new Ajax.Request(
@@ -228,8 +249,9 @@ function getsearch_results() {
}
function activitycallback_postfix_search(transport) {
$('search_results').innerHTML = transport.responseText;
- scroll(0,900);
+ scroll(0,1100);
$('search').value="Search";
+ $('export').value="Export";
}
</script>
<!-- </form> -->