From f3754d957b440f6fb54a5aa97c6ac0875e13bfd4 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@hostsharing.net>
Date: Tue, 24 Jan 2012 22:30:27 +0100
Subject: [PATCH] fix #84 (untested)

---
 hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
index 310008e..a411ae3 100644
--- a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
+++ b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -134,8 +134,10 @@
 
 	private ShellProcessor createHiveEMailRemoveProcessor(String domName) {
 		return new ShellProcessor(
+			"postmap -d '" + domName + "' /etc/postfix/virtual || " + 
 			"for KEY in $(postmap -s /etc/postfix/virtual|grep '@" + domName + "\\s'|cut -f1); " +
-				"do postmap -d $KEY /etc/postfix/virtual; done");
+				"do postmap -d $KEY /etc/postfix/virtual; done"
+			);
 	}
 
 	private Processor createDNSServerSetupProcessor(String domName,

--
Gitblit v1.9.1