From ef55b578effea959ed4fdcdb0fd4bbab38209fef Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Thu, 06 Sep 2012 11:21:32 -0400
Subject: [PATCH] - New feature: you can now add directive snippets for Apache, nginx, and PHP under System > Directive Snippets. These snippets are then available on the Options tab of a web site where they can be easily added to the respective textarea by simply clicking the name of the directive snippet.
---
interface/web/mail/mail_forward_edit.php | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/interface/web/mail/mail_forward_edit.php b/interface/web/mail/mail_forward_edit.php
index f89cd36..b8c8d92 100644
--- a/interface/web/mail/mail_forward_edit.php
+++ b/interface/web/mail/mail_forward_edit.php
@@ -74,7 +74,8 @@
$app->tpl->setVar("email_local_part",$email_parts[0]);
// Getting Domains of the user
- $sql = "SELECT domain FROM mail_domain WHERE ".$app->tform->getAuthSQL('r').' ORDER BY domain';
+ //$sql = "SELECT domain FROM mail_domain WHERE ".$app->tform->getAuthSQL('r').' ORDER BY domain';
+ $sql = "SELECT domain FROM mail_domain WHERE domain NOT IN (SELECT SUBSTR(source,2) FROM mail_forwarding WHERE type = 'aliasdomain') AND ".$app->tform->getAuthSQL('r')." ORDER BY domain";
$domains = $app->db->queryAllRecords($sql);
$domain_select = '';
foreach( $domains as $domain) {
@@ -117,8 +118,8 @@
unset($this->dataRecord["email_local_part"]);
unset($this->dataRecord["email_domain"]);
- //* Check if there is no mailbox with this address
- $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE email = '".$app->db->quote($this->dataRecord["source"])."'");
+ //* Check if there is no active mailbox with this address
+ $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE postfix = 'y' AND email = '".$app->db->quote($this->dataRecord["source"])."'");
if($tmp['number'] > 0) $app->tform->errorMessage .= $app->tform->lng("duplicate_mailbox_txt")."<br>";
unset($tmp);
--
Gitblit v1.9.1