From 5de63ed7fed8e7e86686da1346fee0590d8316b2 Mon Sep 17 00:00:00 2001 From: Marcello Coutinho Date: Tue, 18 Nov 2014 16:31:09 -0200 Subject: Postfix - indent / spaces fixes --- config/postfix/postfix.inc | 126 ++++++++++++++++----------------- config/postfix/postfix.php | 50 ++++++------- config/postfix/postfix.widget.php | 25 +++---- config/postfix/postfix.xml | 2 +- config/postfix/postfix_about.php | 10 +-- config/postfix/postfix_acl.xml | 2 +- config/postfix/postfix_antispam.xml | 4 +- config/postfix/postfix_domains.xml | 4 +- config/postfix/postfix_queue.php | 30 ++++---- config/postfix/postfix_recipients.xml | 2 +- config/postfix/postfix_search.php | 20 +++--- config/postfix/postfix_sync.xml | 2 +- config/postfix/postfix_view_config.php | 22 +++--- 13 files changed, 150 insertions(+), 149 deletions(-) diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc index 50979f38..8f27680d 100755 --- a/config/postfix/postfix.inc +++ b/config/postfix/postfix.inc @@ -3,7 +3,7 @@ postfix.inc part of the Postfix package for pfSense Copyright (C) 2010 Erik Fonnesbeck - Copyright (C) 2011-2013 Marcello Coutinho + Copyright (C) 2011-2014 Marcello Coutinho All rights reserved. @@ -40,14 +40,14 @@ if ($pf_version > 2.0) define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m")); else define('POSTFIX_LOCALBASE','/usr/local'); - + $uname=posix_uname(); if ($uname['machine']=='amd64') ini_set('memory_limit', '250M'); function px_text_area_decode($text){ - return preg_replace('/\r\n/', "\n",base64_decode($text)); + return preg_replace('/\r\n/', "\n",base64_decode($text)); } function px_get_real_interface_address($iface) { @@ -85,8 +85,8 @@ function sync_relay_recipients($via_cron="cron"){ if (!file_exists($ldap_recipients)) system('/usr/bin/touch '. $ldap_recipients); $relay_ldap_recipients=file_get_contents($ldap_recipients); - } - else{ + } + else{ #running via crontab, time to get ldap content. $ldap_temp=array(); foreach ($postfix_recipients_config['row'] as $postfix_ldap) { @@ -121,7 +121,7 @@ function sync_relay_recipients($via_cron="cron"){ print "Total ldap recipients:".count($ldap_all)."\tunique:".count($ldap_unique)."\n"; foreach($ldap_unique as $recipient) $relay_ldap_recipients.=($recipient != ""?preg_replace("/\s+/","",$recipient)." OK\n":""); - + #save ldap relay recipients file_put_contents(POSTFIX_LOCALBASE."/etc/postfix/relay_ldap_recipients.txt",$relay_ldap_recipients, LOCK_EX); } @@ -137,11 +137,11 @@ function sync_relay_recipients($via_cron="cron"){ } if($relay_recipients !="" || $relay_ldap_recipients!="") return("relay_recipient_maps = hash:".POSTFIX_LOCALBASE."/etc/postfix/relay_recipients\n"); - + } function check_cron(){ global $config, $g; - #check crontab + #check crontab $new_cron=array(); $cron_cmd_sqlite = ""; $cron_postfix_sqlite=""; @@ -207,7 +207,7 @@ function check_cron(){ } } } - + #check crontab relay recipients $cron_found=""; if (is_array($config['cron']['item'])){ @@ -224,7 +224,7 @@ function check_cron(){ } } } - #check sqlite update queue + #check sqlite update queue else if(!preg_match("/.usr.local.www.postfix.php/",$cron["command"])){ #keep all non postfix cron cmds if not empty if ($cron["command"] != "") @@ -235,7 +235,7 @@ function check_cron(){ # Check if crontab must be changed to valid recipients cmd if ($postfix_recipients_config['enable_ldap'] || $postfix_recipients_config['enable_url']){ if ($cron_found!=$cron_postfix){ - #update postfix cron schedule + #update postfix cron schedule if (! is_array($cron_found) && $postfix_enabled=="on") $new_cron['item'][]=$cron_postfix; $write_cron=1; @@ -255,7 +255,7 @@ function check_cron(){ } } - #call cron functions + #call cron functions if ($write_cron==1){ $config['cron']=$new_cron; write_config('Postfix - sync remote sqlite database',$backup = false); @@ -271,17 +271,17 @@ function check_cron(){ else $new_crontab .= $line; } - if ($old_cron==1) + if ($old_cron==1) file_put_contents("/etc/crontab",$new_crontab, LOCK_EX); - + #print "
". var_dump($new_cron). var_dump($cron_postfix_sqlite).var_dump($config['cron']);
 			#exit;
-			
-		
+
+
 }
 function sync_package_postfix($via_rpc="no") {
 	global $config;
-	
+
 	log_error("sync_package_postfix called with via_rpc={$via_rpc}");
 	# detect boot process
 	if (is_array($_POST)){
@@ -290,10 +290,10 @@ function sync_package_postfix($via_rpc="no") {
 		else
 			$boot_process="on";
 	}
-		
+
 	if(is_process_running("master") && isset($boot_process) && $via_rpc=="no")
 		return;
-		
+
 	#check patch in /etc/inc/config.
 	$relay_domains = "";
 	$transport = "";
@@ -346,10 +346,10 @@ function sync_package_postfix($via_rpc="no") {
             }
             file_put_contents($sys_log_file,$new_sys_log, LOCK_EX);
             #mwexec('/usr/local/bin/php -q /usr/local/www/postfix_syslog.php');
-            #restart syslog daemon	
+            #restart syslog daemon
             system_syslogd_start();
 		}
-           
+
 	#check_debug
 	if($postfix_config['debug_list'] && $postfix_config['debug_list']!=""){
 	$check_debug ="\n#Debugging postfix\n";
@@ -358,7 +358,7 @@ function sync_package_postfix($via_rpc="no") {
 	}
 	#check relay recipients
 	$all_relay_recipients=sync_relay_recipients('gui');
-	
+
 	$copyright=<< "postfix.sh", "start" => $start, "stop" => $stop));
 
 	sleep(1);
@@ -797,7 +797,7 @@ EOF;
 		mwexec("/usr/local/etc/rc.d/postfix.sh stop");
 		system('/bin/chmod -x /usr/local/etc/rc.d/postfix.sh');
 		}
-		
+
 	conf_mount_ro();
 }
 
@@ -806,11 +806,11 @@ function postfix_validate_input($post, &$input_errors) {
 		if (empty($value))
 			continue;
 		if($key == "greet_time" && !preg_match("/(\d+),(\d+)(s|m|h|w)/",$value))
-				$input_errors[] = "Wrong greet time sintax.";			
+				$input_errors[] = "Wrong greet time sintax.";
 		if($key == "message_size_limit" && !is_numeric($value))
 				$input_errors[] = "Message size limit must be numeric.";
 		if($key == "process_limit" && !is_numeric($value))
-				$input_errors[] = "Process limit must be numeric.";	
+				$input_errors[] = "Process limit must be numeric.";
 		if($key == "freq" && (!preg_match("/^\d+(h|m|d)$/",$value) || $value == 0))
 				$input_errors[] = "A valid number with a time reference is required for the field 'Frequency'";
 		if (substr($key, 0, 2) == "dc" && !is_hostname($value))
@@ -845,7 +845,7 @@ function postfix_php_deinstall_command() {
 
 /* Uses XMLRPC to synchronize the changes to a remote node */
 function postfix_sync_on_changes() {
-	global $config, $g;			
+	global $config, $g;
 	if (is_array($config['installedpackages']['postfixsync']['config'])){
 		$postfix_sync=$config['installedpackages']['postfixsync']['config'][0];
 		$synctimeout = $postfix_sync['synctimeout'];
@@ -877,7 +877,7 @@ function postfix_sync_on_changes() {
 						log_error("[postfix] xmlrpc sync is enabled but there is no system backup hosts to push postfix config.");
 						return;
 					}
-				break;			
+				break;
 			default:
 				return;
 			break;
@@ -905,13 +905,13 @@ function postfix_do_xmlrpc_sync($sync_to_ip,$username,$password,$sync_type,$sync
 
 	if(!$username)
 		$username="admin";
-	
+
 	if(!$password)
 		return;
 
 	if(!$sync_to_ip)
 		return;
-		
+
 	if(!$synctimeout)
 		$synctimeout=120;
 
@@ -923,9 +923,9 @@ function postfix_do_xmlrpc_sync($sync_to_ip,$username,$password,$sync_type,$sync
     $port = $config['system']['webgui']['port'];
     /* if port is empty lets rely on the protocol selection */
     if($port == "") {
-		if($config['system']['webgui']['protocol'] == "http") 
+		if($config['system']['webgui']['protocol'] == "http")
 			$port = "80";
-		else 
+		else
 			$port = "443";
     }
 	$synchronizetoip .= $sync_to_ip;
@@ -948,7 +948,7 @@ function postfix_do_xmlrpc_sync($sync_to_ip,$username,$password,$sync_type,$sync
 			XML_RPC_encode($password),
 			XML_RPC_encode($xml)
 		);
-	
+
 		/* set a few variables needed for sync code borrowed from filter.inc */
 		$url = $synchronizetoip;
 		log_error("Beginning Postfix XMLRPC sync to {$url}:{$port}.");
@@ -973,18 +973,18 @@ function postfix_do_xmlrpc_sync($sync_to_ip,$username,$password,$sync_type,$sync
 		} else {
 			log_error("Postfix XMLRPC sync successfully completed with {$url}:{$port}.");
 		}
-		
+
 		/* tell postfix to reload our settings on the destionation sync host. */
 		$method = 'pfsense.exec_php';
 		$execcmd  = "require_once('/usr/local/pkg/postfix.inc');\n";
 		$execcmd .= "sync_package_postfix('yes');";
-		
+
 		/* assemble xmlrpc payload */
 		$params = array(
 			XML_RPC_encode($password),
 			XML_RPC_encode($execcmd)
 		);
-	
+
 		log_error("postfix XMLRPC reload data {$url}:{$port}.");
 		$msg = new XML_RPC_Message($method, $params);
 		$cli = new XML_RPC_Client('/xmlrpc.php', $url, $port);
diff --git a/config/postfix/postfix.php b/config/postfix/postfix.php
index 774c7573..4cf85033 100644
--- a/config/postfix/postfix.php
+++ b/config/postfix/postfix.php
@@ -2,7 +2,7 @@
 /*
 	postfix.php
 	part of pfSense (https://www.pfsense.org/)
-	Copyright (C) 2011-2013 Marcello Coutinho 
+	Copyright (C) 2011-2014 Marcello Coutinho 
 	based on varnish_view_config.
 	All rights reserved.
 
@@ -42,13 +42,13 @@ function get_remote_log(){
 	$curr_time = time();
 	$log_time=date('YmdHis',$curr_time);
 	#get protocol
-    if($config['system']['webgui']['protocol'] != "") 
+    if($config['system']['webgui']['protocol'] != "")
 		$synchronizetoip = $config['system']['webgui']['protocol']. "://";
    	#get port
     $port = $config['system']['webgui']['port'];
-    #if port is empty lets rely on the protocol selection 
+    #if port is empty lets rely on the protocol selection
     if($port == "")
-    	$port =($config['system']['webgui']['protocol'] == "http"?"80":"443"); 
+    	$port =($config['system']['webgui']['protocol'] == "http"?"80":"443");
 	$synchronizetoip .= $sync_to_ip;
 	if (is_array($config['installedpackages']['postfixsync']))
 		foreach($config['installedpackages']['postfixsync']['config'][0]['row'] as $sh){
@@ -59,7 +59,7 @@ function get_remote_log(){
 			#get remote data
 			if ($sync_type=='fetch'){
 				$url= $synchronizetoip . $sync_to_ip;
-				print "$sync_to_ip $url, $port\n";			
+				print "$sync_to_ip $url, $port\n";
 				$method = 'pfsense.exec_php';
 				$execcmd  = "require_once('/usr/local/www/postfix.php');\n";
 				$execcmd .= '$toreturn=get_sql('.$log_time.');';
@@ -93,7 +93,7 @@ function get_remote_log(){
 									die ("Cannot execute query. $error\n".$update['sql']."\n");
 								}
 								else{
-									if ($debug=true)	
+									if ($debug=true)
 										print "ok\n";
 								}
 								sqlite_close($dbhandle);
@@ -114,12 +114,12 @@ function get_remote_log(){
 					$resp = $cli->send($msg, "250");
 					}
 				}
-		}	
+		}
 }
 function get_sql($log_time){
 	global $config,$xmlrpc_g;
 	$server=$_SERVER['REMOTE_ADDR'];
-	
+
 	if (is_array($config['installedpackages']['postfixsync']))
 		foreach($config['installedpackages']['postfixsync']['config'][0]['row']  as $sh){
 			$sync_to_ip = $sh['ipaddress'];
@@ -141,7 +141,7 @@ function flush_sql($log_time){
 
 function grep_log(){
 	global $postfix_dir,$postfix_arg,$config,$g;
-	
+
 	$total_lines=0;
 	$days=array();
 	$grep="\(MailScanner\|postfix.cleanup\|postfix.smtp\|postfix.error\|postfix.qmgr\)";
@@ -203,7 +203,7 @@ function grep_log(){
 		#Nov 16 00:00:14 srvch011 postfix/smtp[7363]: 7AEB91F797D: to=, relay=mail.mg.test.com[172.25.3.5]:25, delay=39, delays=35/1.1/0.04/2.7, dsn=5.7.1, status=bounced (host mail.mg.test.com[172.25.3.5] said: 550 5.7.1 Unable to relay for alessandra.bueno@mg.test.com (in reply to RCPT TO command))
 		else if(preg_match("/(\w+\s+\d+\s+[0-9,:]+) (\w+) postfix.\w+\W\d+\W+(\w+): to=\<(.*)\>, relay=(.*), delay=([0-9,.]+), .* dsn=([0-9,.]+), status=(\w+) (.*)/",$line,$email)){
 			$stm_queue[$day].= "insert or ignore into mail_status (info) values ('".$email[8]."');\n";
-			$stm_queue[$day].= "insert or ignore into mail_to (from_id,too,status,status_info,relay,delay,dsn) values ((select id from mail_from where sid='".$email[3]."' and server='".$email[2]."'),'".strtolower($email[4])."',(select id from mail_status where info='".$email[8]."'),'".preg_replace("/(\<|\>|\s+|\'|\")/"," ",$email[9])."','".$email[5]."','".$email[6]."','".$email[7]."');\n";	
+			$stm_queue[$day].= "insert or ignore into mail_to (from_id,too,status,status_info,relay,delay,dsn) values ((select id from mail_from where sid='".$email[3]."' and server='".$email[2]."'),'".strtolower($email[4])."',(select id from mail_status where info='".$email[8]."'),'".preg_replace("/(\<|\>|\s+|\'|\")/"," ",$email[9])."','".$email[5]."','".$email[6]."','".$email[7]."');\n";
 			$stm_queue[$day].= "update or ignore mail_to set status=(select id from mail_status where info='".$email[8]."'), status_info='".preg_replace("/(\<|\>|\s+|\'|\")/"," ",$email[9])."', dsn='".$email[7]."', delay='".$email[6]."', relay='".$email[5]."', too='".strtolower($email[4])."' where from_id in (select id from mail_from where sid='".$email[3]."' and server='".$email[2]."');\n";
 		}
 		#Nov 13 01:48:44 srvch011 postfix/cleanup[16914]: D995B1F570B: message-id=<61.40.11745.10E3FBE4@ofertas6>
@@ -223,7 +223,7 @@ function grep_log(){
 	  		$stm_queue[$day].= "insert or ignore into mail_status (info) values ('".$email[8]."');\n";
 			$stm_queue[$day].= "update mail_to set status=(select id from mail_status where info='reject'), status_info='queue file size limit exceeded' where from_id in (select id from mail_from where sid='".$email[3]."' and server='".$email[2]."');\n";
 		}
-		
+
 		#Nov  9 02:14:57 srvch011 postfix/cleanup[6856]: 617A51F5AC5: warning: header Subject: Mapeamento de Processos from lxalpha.12b.com.br[66.109.29.225]; from= to= proto=ESMTP helo=
 		#Nov  8 09:31:50 srvch011 postfix/cleanup[11471]: 19C281F59C8: reject: header From: "Giuliana Flores - Parceiro do Grupo Virtual"  from pm03-974.auinmeio.com.br[177.70.232.225]; from= to= proto=ESMTP helo=: 5.7.1 [SN007]
 		#Nov 13 00:03:24 srvch011 postfix/cleanup[4192]: 8A5B31F52D2: reject: body http://platform.roastcrack.info/mj0ie6p-48qtiyq from move2.igloojack.info[173.239.63.16]; from= to= proto=SMTP helo=: 5.7.1 [BD040]
@@ -271,9 +271,9 @@ function grep_log(){
 			$status['status_info']=$email[4];
 			$status['from']=$email[5];
 			$status['to']=$email[6];
-			$status['helo']=$email[7];	
+			$status['helo']=$email[7];
 			$values="'".$status['date']."','".$status['status']."','".$status['status_info']."','".strtolower($status['from'])."','".strtolower($status['to'])."','".$status['helo']."','".$status['server']."'";
-			$stm_noqueue[$day].='insert or ignore into mail_noqueue(date,status,status_info,fromm,too,helo,server) values ('.$values.');'."\n";		
+			$stm_noqueue[$day].='insert or ignore into mail_noqueue(date,status,status_info,fromm,too,helo,server) values ('.$values.');'."\n";
 		}
 		if ($total_lines%1500 == 0){
 			#save log in database
@@ -295,7 +295,7 @@ function grep_log(){
 		$stm_queue[$d]="BEGIN;\n";
 		}
 	}
-	
+
 	$config=parse_xml_config("{$g['conf_path']}/config.xml", $g['xml_rootobj']);
 	//print count($config['installedpackages']);
 	#start db replication if configured
@@ -310,7 +310,7 @@ function grep_log(){
 					postfix_do_xmlrpc_sync($sync_to_ip, $password,$sync_type);
 				print "ok\n";
 				}
-	
+
 }
 
 function write_db($stm,$table,$days){
@@ -341,7 +341,7 @@ function write_db($stm,$table,$days){
 			if ($debug=true)
 				print " writing to local db $day...";
 			$dbhandle = sqlite_open($postfix_dir.$day.".db", 0666, $error);
-			if (!$dbhandle) die ($error);	
+			if (!$dbhandle) die ($error);
 			#file_put_contents("/tmp/".$key.'-'.$update['day'].".sql",gzuncompress(base64_decode($update['sql'])), LOCK_EX);
 			$ok = sqlite_exec($dbhandle, $stm[$day]."COMMIT;", $error);
 			if (!$ok){
@@ -356,13 +356,13 @@ function write_db($stm,$table,$days){
 			}
 	#write update sql files
 	if (count ($do_sync) > 0 ){
-		
+
 		foreach($do_sync as $ip)
 			file_put_contents('/var/db/postfix/'.$ip.'.sql',${$ip},LOCK_EX);
 		conf_mount_ro();
 	}
 	#write local file
-	
+
 }
 
 function create_db($postfix_db){
@@ -513,14 +513,14 @@ switch ($argv[1]){
 											'12:','13:','14:','15:','16:','17:','18:','19:','20:','21:','22:','23:'),
 							'time' => '-03 day');
 		break;
-		
+
 		default:
 		die ("invalid parameters\n");
 }
 # get remote log from remote server
 get_remote_log();
 # get local log from logfile
-grep_log();	
+grep_log();
 }
 
 #http client call
@@ -540,7 +540,7 @@ if ($_REQUEST['files']!= ""){
 	$stm_fetch=array();
 	$total_result=0;
 	foreach ($files as $postfix_db)
-		if (file_exists($postfix_dir.'/'.$postfix_db)){ 
+		if (file_exists($postfix_dir.'/'.$postfix_db)){
 			$dbhandle = sqlite_open($postfix_dir.'/'.$postfix_db, 0666, $error);
 			if ($_REQUEST['from']!= ""){
 				$next=($last_next==" and "?" and ":" where ");
@@ -595,7 +595,7 @@ if ($_REQUEST['files']!= ""){
 				else
 					$stm .=$next."server = '".$_REQUEST['server']."'";
 				}
-				
+
 		if ($_REQUEST['status']!= ""){
 				$next=($last_next==" and "?" and ":" where ");
 				$last_next=" and ";
@@ -604,7 +604,7 @@ if ($_REQUEST['files']!= ""){
 					#print "
".$stm;
 				#$stm = "select * from mail_to,mail_status where mail_to.status=mail_status.id";
 				$result = sqlite_query($dbhandle, $stm." order by date desc $limit_prefix $limit ");
-				#$result = sqlite_query($dbhandle, $stm."  $limit_prefix $limit ");	
+				#$result = sqlite_query($dbhandle, $stm."  $limit_prefix $limit ");
 			if (preg_match("/\d+/",$_REQUEST['limit'])){
 				for ($i = 1; $i <= $limit; $i++) {
 					$row = sqlite_fetch_array($result, SQLITE_ASSOC);
@@ -744,8 +744,8 @@ if ($_REQUEST['files']!= ""){
 	print '';
 	print 'Total:';
 	print ''.$total_result.'';
-	print '';	
+	print '';
 	print '';
-	}				
+	}
 }
 ?>
\ No newline at end of file
diff --git a/config/postfix/postfix.widget.php b/config/postfix/postfix.widget.php
index b7fc7af9..e61274b9 100755
--- a/config/postfix/postfix.widget.php
+++ b/config/postfix/postfix.widget.php
@@ -1,6 +1,7 @@
-";
 	echo"  ";
@@ -39,7 +40,7 @@ function open_table(){
 function close_table(){
 	echo"  ";
 	echo"";
-	
+
 }
 
 $pfb_table=array();
@@ -49,20 +50,20 @@ $img['Healthy']="
$days; $z--){ @@ -71,7 +72,7 @@ if ($z==0) $postfix_db=date("Y-m-d"); else $postfix_db=date("Y-m-d",strtotime("$z day",$curr_time)); - + if (file_exists($postfix_dir.'/'.$postfix_db.".db")){ #noqueue open_table(); @@ -83,7 +84,7 @@ if (file_exists($postfix_dir.'/'.$postfix_db.".db")){ $stm="select count(*) as total from mail_noqueue"; $result = sqlite_query($dbhandle, $stm); $row_noqueue = sqlite_fetch_array($result, SQLITE_ASSOC); - + #queue $result = sqlite_query($dbhandle, $stm); $stm="select mail_status.info as status,count(*) as total from mail_to,mail_status where mail_to.status=mail_status.id group by status order by mail_status.info"; @@ -96,7 +97,7 @@ if (file_exists($postfix_dir.'/'.$postfix_db.".db")){ if (preg_match("/\w+/",$row['status'])){ $reader.="".ucfirst($row['status'])."\n"; if ($row['status']=="reject") - $row['total']=+$row_noqueue['total']; + $row['total']=+$row_noqueue['total']; $count.="".$row['total']."\n"; } } @@ -111,7 +112,7 @@ if (file_exists($postfix_dir.'/'.$postfix_db.".db")){ } close_table(); echo "
"; - + } } echo" "; diff --git a/config/postfix/postfix.xml b/config/postfix/postfix.xml index 46233828..8e70fd7a 100644 --- a/config/postfix/postfix.xml +++ b/config/postfix/postfix.xml @@ -10,7 +10,7 @@ postfix.xml part of the Postfix package for pfSense Copyright (C) 2010 Erik Fonnesbeck - Copyright (C) 2011-2013 Marcello Coutinho + Copyright (C) 2011-2014 Marcello Coutinho All rights reserved. */ diff --git a/config/postfix/postfix_about.php b/config/postfix/postfix_about.php index 87d0cf69..397c8e06 100755 --- a/config/postfix/postfix_about.php +++ b/config/postfix/postfix_about.php @@ -2,7 +2,7 @@ /* postfix_about.php part of pfSense (https://www.pfsense.org/) - Copyright (C) 2011-2013 Marcello Coutinho + Copyright (C) 2011-2014 Marcello Coutinho based on varnish_view_config. All rights reserved. @@ -48,7 +48,7 @@ include("head.inc"); - +
- + - +
@@ -68,7 +68,7 @@ include("head.inc"); ?>
@@ -86,11 +86,11 @@ include("head.inc"); If you want that your donation goes to this package developer, make a note on donation forwarding it to me.

");?>
- +

diff --git a/config/postfix/postfix_acl.xml b/config/postfix/postfix_acl.xml index 60b23a22..8df5255e 100644 --- a/config/postfix/postfix_acl.xml +++ b/config/postfix/postfix_acl.xml @@ -9,7 +9,7 @@ /* postfix.xml part of the Postfix package for pfSense - Copyright (C) 2011-2013 Marcello Coutinho + Copyright (C) 2011-2014 Marcello Coutinho All rights reserved. */ /* ========================================================================== */ diff --git a/config/postfix/postfix_antispam.xml b/config/postfix/postfix_antispam.xml index 6c3f5911..9d55e47e 100644 --- a/config/postfix/postfix_antispam.xml +++ b/config/postfix/postfix_antispam.xml @@ -7,9 +7,9 @@ /* $Id$ */ /* ========================================================================== */ /* - postfix.xml + postfix_antispam.xml part of the Postfix package for pfSense - Copyright (C) 2011 Marcello Coutinho + Copyright (C) 2011-2014 Marcello Coutinho All rights reserved. */ diff --git a/config/postfix/postfix_domains.xml b/config/postfix/postfix_domains.xml index 539ef60e..ea19297d 100644 --- a/config/postfix/postfix_domains.xml +++ b/config/postfix/postfix_domains.xml @@ -7,10 +7,10 @@ /* $Id$ */ /* ========================================================================== */ /* - postfix.xml + postfix_domains.xml part of the Postfix package for pfSense Copyright (C) 2010 Erik Fonnesbeck - Copyright (C) 2011 Marcello Coutinho + Copyright (C) 2011-2014 Marcello Coutinho All rights reserved. */ diff --git a/config/postfix/postfix_queue.php b/config/postfix/postfix_queue.php index 7afd8fe7..4f072eba 100755 --- a/config/postfix/postfix_queue.php +++ b/config/postfix/postfix_queue.php @@ -2,7 +2,7 @@ /* postfix_view_config.php part of pfSense (https://www.pfsense.org/) - Copyright (C) 2011-2013 Marcello Coutinho + Copyright (C) 2011-2014 Marcello Coutinho based on varnish_view_config. All rights reserved. @@ -39,7 +39,7 @@ if ($pf_version > 2.0) define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m")); else define('POSTFIX_LOCALBASE','/usr/local'); - + function get_cmd(){ if ($_REQUEST['cmd'] =='mailq'){ #exec("/usr/local/bin/mailq" . escapeshellarg('^'.$m.$j." ".$hour.".*".$grep)." /var/log/maillog", $lists); @@ -67,13 +67,13 @@ function get_cmd(){ elseif (preg_match("/\s+(\w+.*)/",$line,$matches) && $sid !=""){ print $td.$matches[1].''; $sid=""; - } + } } print ''; } if ($_REQUEST['cmd'] =='qshape'){ if ($_REQUEST['qshape']!="") - exec(POSTFIX_LOCALBASE."/bin/qshape -".preg_replace("/\W/","",$_REQUEST['type'])." ". preg_replace("/\W/","",$_REQUEST['qshape']), $qshape); + exec(POSTFIX_LOCALBASE."/bin/qshape -".preg_replace("/\W/","",$_REQUEST['type'])." ". preg_replace("/\W/","",$_REQUEST['qshape']), $qshape); else exec(POSTFIX_LOCALBASE."/bin/qshape", $qshape); print ''; @@ -107,22 +107,22 @@ else{ $pf_version=substr(trim(file_get_contents("/etc/version")),0,3); if ($pf_version < 2.0) $one_two = true; - + $pgtitle = "Status: Postfix Mail Queue"; include("head.inc"); - + ?> - +

- + - + - +
- + - +
@@ -167,7 +167,7 @@ else{

- +
@@ -223,7 +223,7 @@ else{ } return(selectedArray); } - + function get_queue(loop) { //prevent multiple instances if ($('run').value=="show queue" || loop== 'running'){ @@ -255,7 +255,7 @@ else{ } } - diff --git a/config/postfix/postfix_recipients.xml b/config/postfix/postfix_recipients.xml index d8f9707e..946bd79f 100644 --- a/config/postfix/postfix_recipients.xml +++ b/config/postfix/postfix_recipients.xml @@ -9,7 +9,7 @@ /* postfix_recipients.xml part of the Postfix package for pfSense - Copyright (C) 2011-2013 Marcello Coutinho + Copyright (C) 2011-2014 Marcello Coutinho All rights reserved. */ /* ========================================================================== */ diff --git a/config/postfix/postfix_search.php b/config/postfix/postfix_search.php index c29d8cf2..5e146269 100755 --- a/config/postfix/postfix_search.php +++ b/config/postfix/postfix_search.php @@ -2,7 +2,7 @@ /* postfix_search.php part of pfSense (https://www.pfsense.org/) - Copyright (C) 2011-2013 Marcello Coutinho + Copyright (C) 2011-2014 Marcello Coutinho based on varnish_view_config. All rights reserved. @@ -52,7 +52,7 @@ include("head.inc"); - +
- + - +
@@ -72,7 +72,7 @@ include("head.inc"); ?>
@@ -151,7 +151,7 @@ include("head.inc"); '; - }?> + }?> @@ -188,17 +188,17 @@ include("head.inc");
- +
- + '.$file[1]."\n" . $select_output; - + echo '
'.gettext("Select what database files you want to use in your search.").'
" onclick="getsearch_results('search')">  " onclick="getsearch_results('export')">
- +

diff --git a/config/postfix/postfix_sync.xml b/config/postfix/postfix_sync.xml index 97a88e2c..727305ff 100644 --- a/config/postfix/postfix_sync.xml +++ b/config/postfix/postfix_sync.xml @@ -9,7 +9,7 @@ /* postfix_sync.xml part of the Postfix package for pfSense - Copyright (C) 2011-2013 Marcello Coutinho + Copyright (C) 2011-2014 Marcello Coutinho All rights reserved. */ /* ========================================================================== */ diff --git a/config/postfix/postfix_view_config.php b/config/postfix/postfix_view_config.php index 24bfd575..f82c9371 100644 --- a/config/postfix/postfix_view_config.php +++ b/config/postfix/postfix_view_config.php @@ -2,7 +2,7 @@ /* postfix_view_config.php part of pfSense (https://www.pfsense.org/) - Copyright (C) 2011-2013 Marcello Coutinho + Copyright (C) 2011-2014 Marcello Coutinho based on varnish_view_config. All rights reserved. @@ -34,7 +34,7 @@ if ($pf_version > 2.0) define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m")); else define('POSTFIX_LOCALBASE','/usr/local'); - + function get_file($file){ $files['main']=POSTFIX_LOCALBASE."/etc/postfix/main.cf"; $files['master']=POSTFIX_LOCALBASE."/etc/postfix/master.cf"; @@ -59,22 +59,22 @@ else{ $pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); if ($pf_version < 2.0) $one_two = true; - + $pgtitle = "Services: Postfix View Configuration"; include("head.inc"); - + ?> - +

- + - + - +
@@ -117,7 +117,7 @@ else{
- +
@@ -153,8 +153,8 @@ else{ scroll(0,0); } - -- cgit v1.2.3