| | |
| | | // TODO: combine both keys in a single call (optimization) |
| | | EMailAddress email = (EMailAddress) entity; |
| | | CompoundProcessor cp = new CompoundProcessor(); |
| | | cp.appendProcessor(new ShellProcessor( "postmap -r -i /etc/postfix/virtual", |
| | | cp.appendProcessor(new ShellProcessor( "postmap -r -i /etc/postfix-mailin/virtual", |
| | | email.getFullDomain() + " -" ) ); |
| | | cp.appendProcessor(new ShellProcessor( "postmap -r -i /etc/postfix/virtual", |
| | | cp.appendProcessor(new ShellProcessor( "postmap -r -i /etc/postfix-mailin/virtual", |
| | | email.getEMailAddress() + " " + email.getTarget() ) ); |
| | | if (emailAddressCount(em, email) < 2) { |
| | | WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp); |
| | |
| | | CompoundProcessor cp = new CompoundProcessor(); |
| | | EMailAddress email = (EMailAddress) entity; |
| | | cp.appendProcessor( |
| | | new ShellProcessor( "postmap -d '" + email.getEMailAddress() + "' /etc/postfix/virtual" ) ); |
| | | new ShellProcessor( "postmap -d '" + email.getEMailAddress() + "' /etc/postfix-mailin/virtual" ) ); |
| | | int emailAddressCount = emailAddressCount(em, email); |
| | | if (emailAddressCount == 0) { |
| | | // remove the domain from virtual.db |
| | | String fullDomain = email.getFullDomain(); |
| | | cp.appendProcessor( |
| | | new ShellProcessor( "postmap -d '" + fullDomain + "' /etc/postfix/virtual" ) ); |
| | | new ShellProcessor( "postmap -d '" + fullDomain + "' /etc/postfix-mailin/virtual" ) ); |
| | | WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp); |
| | | Config config = Config.getInstance(); |
| | | for (String queueName : config.getProperty("queues.mail").split(",")) { |