HSAdmin Backend Domains, E-Mail, Datenbanken
Michael Hierweck
2017-09-17 0ac2abbcd09e4f03bf54ddccecac33d6d1e6d706
Logging.
1 files modified
10 ■■■■ changed files
hsarback/src/de/hsadmin/mods/email/EMailAddressProcessorFactory.java 10 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/email/EMailAddressProcessorFactory.java
@@ -26,7 +26,7 @@
            cp.appendProcessor(new ShellProcessor("postmap -r -i /etc/postfix-mailin/virtual || true",
                    email.getFullDomain() + " -\n" +
                    "." + email.getFullDomain() + " -\n"));
            logger.log(Level.INFO, "Queue: virtual => create domain record");
            logger.log(Level.INFO, "Queue: virtual => create domain record (" + email.getEMailAddress()+ ")");
        }
        cp.appendProcessor(new ShellProcessor("postmap -r -i /etc/postfix-mailin/virtual || true",
                email.getEMailAddress() + " " + email.getTarget() + "\n"));
@@ -38,7 +38,7 @@
                    new ShellProcessor("postmap -r -i /etc/postfix-mailin/relayrecipients || true",
                            email.getEMailAddress() + " anything\n"),
                    "Add to relayrecipients");
            logger.log(Level.INFO, "Queue: relayrecipients => create email address record for " + queueName);
            logger.log(Level.INFO, "Queue: relayrecipients => create email address record for " + queueName  + (" + email.getEMailAddress()+ "));
        }
        return waitingTasksProcessor;
    }
@@ -58,11 +58,11 @@
            cp.appendProcessor(new ShellProcessor("postmap -d - /etc/postfix-mailin/virtual || true",
                    email.getFullDomain() + "\n" +
                    "." + email.getFullDomain() + "\n"));
                    logger.log(Level.INFO, "Queue: virtual => remove domain record");
                    logger.log(Level.INFO, "Queue: virtual => remove domain record (" + email.getEMailAddress()+ ")");
        }
        cp.appendProcessor(new ShellProcessor("postmap -d - /etc/postfix-mailin/virtual || true", 
                email.getEMailAddress() + "\n"));
        logger.log(Level.INFO, "Queue: virtual => remove email address record");
        logger.log(Level.INFO, "Queue: virtual => remove email address record (" + email.getEMailAddress()+ ")");
        Config config = Config.getInstance();
        WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp);
        for (String queueName : config.getProperty("queues.mail").split(",")) {
@@ -70,7 +70,7 @@
                    new ShellProcessor("postmap -d - /etc/postfix-mailin/relayrecipients || true", 
                            email.getEMailAddress() + "\n"),
                    "Remove from relayrecipients");
            logger.log(Level.INFO, "Queue: relayrecipients => remove email address record for " + queueName);
            logger.log(Level.INFO, "Queue: relayrecipients => remove email address record for " + queueName + (" + email.getEMailAddress()+ "));
        }
        return waitingTasksProcessor;
    }