From 2e961201be67cc348e7da22ad7c32c87c9f3d30d Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 11 May 2010 07:00:08 -0400
Subject: [PATCH] Fixed: FS#1186 - Error in Installer r1728

---
 server/plugins-available/postfix_server_plugin.inc.php |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/postfix_server_plugin.inc.php b/server/plugins-available/postfix_server_plugin.inc.php
index a63eb95..216df11 100644
--- a/server/plugins-available/postfix_server_plugin.inc.php
+++ b/server/plugins-available/postfix_server_plugin.inc.php
@@ -36,6 +36,19 @@
 	
 	var $postfix_config_dir = '/etc/postfix';
 	
+	//* This function is called during ispconfig installation to determine
+	//  if a symlink shall be created for this plugin.
+	function onInstall() {
+		global $conf;
+		
+		if($conf['services']['mail'] == true) {
+			return true;
+		} else {
+			return false;
+		}
+		
+	}
+	
 	/*
 	 	This function is called when the plugin is loaded
 	*/
@@ -89,8 +102,8 @@
 			exec("postconf -e 'relayhost ='");
 		}
 		
-		exec("postconf -e 'mailbox_size_limit = ".intval($mail_config["mailbox_size_limit"])."'");
-		exec("postconf -e 'message_size_limit = ".intval($mail_config["message_size_limit"])."'");
+		exec("postconf -e 'mailbox_size_limit = ".intval($mail_config["mailbox_size_limit"]*1024*1024)."'");
+		exec("postconf -e 'message_size_limit = ".intval($mail_config["message_size_limit"]*1024*1024)."'");
 		
 	}
 

--
Gitblit v1.9.1