Correction template pour postfix + bugfixes des classes de gestion des mails
This commit is contained in:
parent
7c08903376
commit
a465a09e49
|
@ -28,7 +28,7 @@
|
||||||
*/
|
*/
|
||||||
require_once("../class/config.php");
|
require_once("../class/config.php");
|
||||||
$fields = array (
|
$fields = array (
|
||||||
"alias" => array ("request", "string",0),
|
"mail_arg" => array ("request", "string",0),
|
||||||
"mail_id" => array ("request", "integer",0),
|
"mail_id" => array ("request", "integer",0),
|
||||||
"domain" => array ("request", "string",0),
|
"domain" => array ("request", "string",0),
|
||||||
"address_full" => array ("request", "string",0),
|
"address_full" => array ("request", "string",0),
|
||||||
|
@ -38,12 +38,12 @@ $fields = array (
|
||||||
getFields($fields);
|
getFields($fields);
|
||||||
|
|
||||||
$alias_retour=array ();
|
$alias_retour=array ();
|
||||||
$alias_retour=$mail->create($dom_id,$alias);
|
$alias_retour=$mail->create($dom_id,$mail_arg);
|
||||||
//setting up the alias.
|
//setting up the alias.
|
||||||
if(!$mail_alias->setalias($alias_retour["mail_id"],$address_full)){
|
if(!$mail_alias->setalias($alias_retour["mail_id"],$address_full)){
|
||||||
//if fails redirect to creation with error message.
|
//if fails redirect to creation with error message.
|
||||||
$error=sprintf(_("Alias: %s already created"), $alias);
|
$error=sprintf(_("Alias: %s already created"), $mail_arg);
|
||||||
include("mail_alias_create.php");
|
include("mail_alias_create.inc.php");
|
||||||
}else{
|
}else{
|
||||||
//redirection to the properties list.
|
//redirection to the properties list.
|
||||||
header ("Location: mail_properties.php?mail_id=$mail_id");
|
header ("Location: mail_properties.php?mail_id=$mail_id");
|
||||||
|
|
|
@ -51,8 +51,7 @@ if(isset($is_local) && intval($is_local) == 1){
|
||||||
//if user chose yes to localbox
|
//if user chose yes to localbox
|
||||||
if($local == 1){
|
if($local == 1){
|
||||||
$error = _("Already Activated");
|
$error = _("Already Activated");
|
||||||
include ("mail_edit.php");
|
header ("Location: /mail_properties.php?mail_id=$mail_id");
|
||||||
exit();
|
|
||||||
}else{
|
}else{
|
||||||
$mail_localbox->unset_localbox($mail_id);
|
$mail_localbox->unset_localbox($mail_id);
|
||||||
header ("Location: /mail_properties.php?mail_id=$mail_id");
|
header ("Location: /mail_properties.php?mail_id=$mail_id");
|
||||||
|
@ -60,9 +59,8 @@ if(isset($is_local) && intval($is_local) == 1){
|
||||||
}elseif( intval($is_local) == 0 ){
|
}elseif( intval($is_local) == 0 ){
|
||||||
|
|
||||||
if($local == 0){
|
if($local == 0){
|
||||||
$error = _("Already Activated");
|
$error = _("Already disactivated");
|
||||||
include ("mail_edit.php");
|
header ("Location: /mail_properties.php?mail_id=$mail_id");
|
||||||
exit();
|
|
||||||
}else{
|
}else{
|
||||||
//echo "processing mail to localbox";
|
//echo "processing mail to localbox";
|
||||||
$mail_localbox->set_localbox($mail_id);
|
$mail_localbox->set_localbox($mail_id);
|
||||||
|
|
|
@ -75,7 +75,8 @@ Class m_mail_alias{
|
||||||
function form($mail_id, $edit_id) {
|
function form($mail_id, $edit_id) {
|
||||||
global $mail,$err;
|
global $mail,$err;
|
||||||
if ($edit_id) {
|
if ($edit_id) {
|
||||||
echo "<a href='mail_redirection_edit.php?mail_id=$edit_id'>";__("Edit");echo "</a>";
|
//echo "<a href='mail_redirection_edit.inc.php?mail_id=$edit_id'>";__("Edit");echo "</a>";
|
||||||
|
echo "<a href='mail_properties.php?mail_id=$edit_id'>";__("Edit");echo "</a>";
|
||||||
} else {
|
} else {
|
||||||
include('mail_alias_create.inc.php');
|
include('mail_alias_create.inc.php');
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
# Get the quota
|
# Get the quota
|
||||||
#
|
#
|
||||||
|
|
||||||
user = sysusr
|
user = %%db_mail_user%%
|
||||||
password = bGwD2GlLOX
|
password = %%db_mail_pwd%%
|
||||||
hosts =127.0.0.1
|
hosts =%%dbhost%%
|
||||||
dbname = alternc
|
dbname = %%dbname%%
|
||||||
query = select quota from mailbox join address on mailbox.id = address.id join domaines on domaines.id = address.id where concat(address.address,'@',domaines.domaine) = '%s'
|
query = select quota from mailbox join address on mailbox.id = address.id join domaines on domaines.id = address.id where concat(address.address,'@',domaines.domaine) = '%s'
|
||||||
|
|
||||||
|
|
|
@ -295,7 +295,7 @@ grep -v '^\ *#' $postfix_conf |while read line ; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Conviguring delivery used bu Postfix FIXME change script name
|
# Conviguring delivery used bu Postfix FIXME change script name
|
||||||
echo `/usr/bin/postfix-add-policy dovecot vmail:vmail DRhu pipe'/usr/bin/sudo /usr/lib/dovecot/deliver -f ${sender} -d ${recipient} '`
|
echo `/usr/bin/postfix-add-policy dovecot vmail:vmail DRhu pipe '/usr/bin/sudo /usr/lib/dovecot/deliver -f ${sender} -d ${recipient} '`
|
||||||
|
|
||||||
# Bug #1215: configure mydestination when $FQDN is not in
|
# Bug #1215: configure mydestination when $FQDN is not in
|
||||||
OLDDESTINATION=`postconf mydestination | awk -F '=' '{print $2}'`
|
OLDDESTINATION=`postconf mydestination | awk -F '=' '{print $2}'`
|
||||||
|
|
Loading…
Reference in New Issue