Moved /etc/postfix/virtual to /etc/postfix-mailin/virtual.
Attention! The static hive configuration needs to be adjusted.
This commit is contained in:
parent
c679a19c03
commit
06a487819f
@ -138,9 +138,9 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
|||||||
|
|
||||||
private ShellProcessor createHiveEMailRemoveProcessor(String domName) {
|
private ShellProcessor createHiveEMailRemoveProcessor(String domName) {
|
||||||
return new ShellProcessor(
|
return new ShellProcessor(
|
||||||
"postmap -d '" + domName + "' /etc/postfix/virtual && " +
|
"postmap -d '" + domName + "' /etc/postfix-mailin/virtual && " +
|
||||||
"for KEY in $(postmap -s /etc/postfix/virtual|grep '@" + domName + "\\s'|cut -f1); " +
|
"for KEY in $(postmap -s /etc/postfix-mailin/virtual|grep '@" + domName + "\\s'|cut -f1); " +
|
||||||
"do postmap -d $KEY /etc/postfix/virtual; done"
|
"do postmap -d $KEY /etc/postfix-mailin/virtual; done"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ public class EMailAddressProcessorFactory implements EntityProcessorFactory {
|
|||||||
// TODO: combine both keys in a single call (optimization)
|
// TODO: combine both keys in a single call (optimization)
|
||||||
EMailAddress email = (EMailAddress) entity;
|
EMailAddress email = (EMailAddress) entity;
|
||||||
CompoundProcessor cp = new CompoundProcessor();
|
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() + " -" ) );
|
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() ) );
|
email.getEMailAddress() + " " + email.getTarget() ) );
|
||||||
if (emailAddressCount(em, email) < 2) {
|
if (emailAddressCount(em, email) < 2) {
|
||||||
WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp);
|
WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp);
|
||||||
@ -47,13 +47,13 @@ public class EMailAddressProcessorFactory implements EntityProcessorFactory {
|
|||||||
CompoundProcessor cp = new CompoundProcessor();
|
CompoundProcessor cp = new CompoundProcessor();
|
||||||
EMailAddress email = (EMailAddress) entity;
|
EMailAddress email = (EMailAddress) entity;
|
||||||
cp.appendProcessor(
|
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);
|
int emailAddressCount = emailAddressCount(em, email);
|
||||||
if (emailAddressCount == 0) {
|
if (emailAddressCount == 0) {
|
||||||
// remove the domain from virtual.db
|
// remove the domain from virtual.db
|
||||||
String fullDomain = email.getFullDomain();
|
String fullDomain = email.getFullDomain();
|
||||||
cp.appendProcessor(
|
cp.appendProcessor(
|
||||||
new ShellProcessor( "postmap -d '" + fullDomain + "' /etc/postfix/virtual" ) );
|
new ShellProcessor( "postmap -d '" + fullDomain + "' /etc/postfix-mailin/virtual" ) );
|
||||||
WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp);
|
WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp);
|
||||||
Config config = Config.getInstance();
|
Config config = Config.getInstance();
|
||||||
for (String queueName : config.getProperty("queues.mail").split(",")) {
|
for (String queueName : config.getProperty("queues.mail").split(",")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user