Пример #1
0
function start()
{
    build_progress("Loading LDAP config", 15);
    LoadLDAPDBs();
    build_progress("Loading Transport data", 20);
    transport_maps_search();
    build_progress("Loading Transport data", 25);
    relais_domains_search();
    build_progress("Building Transport database", 30);
    build_transport_maps();
    build_progress("Building Transport database", 35);
    build_relay_domains();
    build_progress("Building Transport database", 40);
    restrict_relay_domains();
    build_progress("Building Transport database", 50);
    build_cyrus_lmtp_auth();
    build_progress("Building Transport database", 55);
    relay_recipient_maps_build();
    $hashT = new main_hash_table();
    $hashT->mydestination();
    build_progress("Building Transport database", 60);
    mailbox_transport_maps();
    build_progress("Building Transport database", 70);
    relayhost();
    build_progress("Building Transport database", 80);
    perso_settings();
    build_progress("{reloading_smtp_service}", 90);
    shell_exec("{$GLOBALS["postfix"]} reload >/dev/null 2>&1");
    build_progress("{done}", 100);
}
Пример #2
0
function routingTable($echo=0){
	$page=CurrentPageName();	
	$ldap=new clladp();
	$transport=new DomainsTools();
$h=$ldap->hash_load_transport();
if(!is_array($h)){return null;}




$html="

<div style='text-align:right;margin:5px;margin-top:0px'>". button("{add_routing_rule}","PostfixAddRoutingRuleTable()")."</div>

	<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>
		<thead class='thead'>
			<tr>
				<th>&nbsp;</th>
				<th><strong nowrap>{domain}</strong></th>
				<th><strong nowrap>&nbsp;</strong></th>
				<th align='center' nowrap><strong>&nbsp;</strong></th>
				<th nowraph><strong>{relay}</strong></th>
				<th align='center' nowrap><strong>{port}</strong></th>
				<th align='center' nowrap><strong>{MX_lookups}</strong></th>
				<th>&nbsp;</td>
			</tr>
		</thead>
		<tbody class='tbody'>";


	



	while (list ($domain, $ligne) = each ($h) ){
		if($classtr=="oddRow"){$classtr=null;}else{$classtr="oddRow";}
		$array=$transport->transport_maps_explode($ligne);
		$delete= imgtootltip('delete-24.png','{delete}',"PostFixDeleteRoutingTable('$domain');");
		$edit="PostfixAddRoutingTable('$domain');";
		$edit=CellRollOver($edit,'{edit}');
		if($domain=="*****@*****.**"){$delete="&nbsp;";$edit=null;}
		if($domain=="localhost.localdomain"){$delete="&nbsp;";$edit=null;}		
		
		$html=$html . "<tr class=$classtr>
		<td width=1%><img src='img/internet.png'></td>
		<td style='font-size:14px'><code $edit>$domain</strong></code></td>
		<td width=1%><img src='img/fw_bold.gif'></td>
		<td align='center' style='font-size:14px' $edit>{$array[0]}</td>
		<td $edit style='font-size:14px'><code>{$array[1]}</code></td>
		<td align='center' style='font-size:14px'><code>{$array[2]}</code></td>
		<td align='center' style='font-size:14px'><code>{$array[3]}</code></td>
		<td align='center' style='font-size:14px' width=1%>$delete</td>
		</tr>";
	}
	
	LoadLDAPDBs();
	if(is_array($GLOBALS["REMOTE_SMTP_LDAPDB_ROUTING"])){
		while (list ($domain, $ligne) = each ($GLOBALS["REMOTE_SMTP_LDAPDB_ROUTING"]) ){
			if($classtr=="oddRow"){$classtr=null;}else{$classtr="oddRow";}
			$array=$transport->transport_maps_explode($ligne);
				$html=$html . "<tr class=$classtr>
				<td width=1%><img src='img/internet.png'></td>
				<td style='font-size:14px'><code style='color:#676767'>$domain</strong></code></td>
				<td width=1%><img src='img/fw_bold.gif'></td>
				<td align='center' style='font-size:14px;color:#676767' >{$array[0]}</td>
				<td style='font-size:14px;color:#676767'><code>{$array[1]}</code></td>
				<td align='center' style='font-size:14px;color:#676767'><code>{$array[2]}</code></td>
				<td align='center' style='font-size:14px;color:#676767'><code>{$array[3]}</code></td>
				<td align='center' style='font-size:14px' width=1%>&nbsp;</td>
				</tr>";			
		}
		
		
	}
	
	
	
	

$html=$html . "</table>";
$html="<div style='width:99%;height:350px;overflow:auto' id='routing-table'>$html</div>";

$tpl=new templates();
if($echo==1){echo $tpl->_ENGINE_parse_body($html);exit;}
return $tpl->_ENGINE_parse_body($html);
	
}
Пример #3
0
function cmdline_alias()
{
    build_progress_aliases("Building LoadLDAPDBs...", 15);
    LoadLDAPDBs();
    build_progress_aliases("Building maillings_table...", 20);
    maillings_table();
    build_progress_aliases("Building aliases_users...", 25);
    aliases_users();
    build_progress_aliases("Building aliases...", 30);
    aliases();
    build_progress_aliases("Building catch_all...", 35);
    catch_all();
    build_progress_aliases("Building build_aliases_maps...", 40);
    build_aliases_maps();
    build_progress_aliases("Building build_virtual_alias_maps...", 45);
    build_virtual_alias_maps();
    build_progress_aliases("Building postmaster...", 50);
    postmaster();
    build_progress_aliases("Building recipient_canonical_maps_build...", 55);
    recipient_canonical_maps_build();
    build_progress_aliases("Building recipient_canonical_maps...", 60);
    recipient_canonical_maps();
    build_progress_aliases("Building aliases {done}...", 65);
}
function cmdline_transport()
{
    LoadLDAPDBs();
    transport_maps_search();
    relais_domains_search();
    build_transport_maps();
    build_relay_domains();
    restrict_relay_domains();
    build_cyrus_lmtp_auth();
    relay_recipient_maps_build();
    $hashT = new main_hash_table();
    $hashT->mydestination();
    mailbox_transport_maps();
    relayhost();
}
Пример #5
0
    smtp_sasl_password_maps();
    perso_settings();
    echo "Starting......: Postfix reloading\n";
    shell_exec("{$GLOBALS["postfix"]} reload >/dev/null 2>&1");
    die;
}
if ($argv[1] == "--smtp-generic-maps") {
    sender_canonical_maps_build();
    smtp_generic_maps_build_global();
    smtp_generic_maps();
    perso_settings();
    echo "Starting......: Postfix reloading\n";
    shell_exec("{$GLOBALS["postfix"]} reload >/dev/null 2>&1");
    die;
}
LoadLDAPDBs();
maillings_table();
aliases_users();
aliases();
catch_all();
build_aliases_maps();
build_virtual_alias_maps();
relais_domains_search();
build_relay_domains();
relay_recipient_maps_build();
recipient_canonical_maps_build();
recipient_canonical_maps();
sender_canonical_maps_build();
sender_canonical_maps();
smtp_generic_maps_build_global();
smtp_generic_maps();
Пример #6
0
function cmdline_alias()
{
    LoadLDAPDBs();
    maillings_table();
    aliases_users();
    aliases();
    catch_all();
    build_aliases_maps();
    build_virtual_alias_maps();
    postmaster();
    recipient_canonical_maps_build();
    recipient_canonical_maps();
}