mailsystem: Use newly added 'mailnix' package to generate postfix/dovecot files
This commit is contained in:
parent
955a0ec8ba
commit
c1b19d6e33
9 changed files with 52 additions and 85 deletions
|
|
@ -134,18 +134,16 @@ impl Config {
|
|||
|
||||
// check whether aliases have corresponding accounts/domains
|
||||
for (from, dests) in self.aliases.iter() {
|
||||
let is_domain = from.contains("@");
|
||||
if is_domain && !self.accounts.contains_key(from) {
|
||||
panic!("Aliased from-account \"{from}\" does not exist");
|
||||
} else if !is_domain && !self.domains.contains(from) {
|
||||
let is_domain = !from.contains("@");
|
||||
if is_domain && !self.domains.contains(from) {
|
||||
panic!("Aliased from-domain \"{from}\" does not exist");
|
||||
}
|
||||
for dest in dests.iter() {
|
||||
let is_domain = dest.contains("@");
|
||||
if is_domain && !self.accounts.contains_key(dest) {
|
||||
panic!("Aliased dest-account \"{dest}\" does not exist");
|
||||
} else if !is_domain && !self.domains.contains(dest) {
|
||||
let is_domain = !dest.contains("@");
|
||||
if is_domain && !self.domains.contains(dest) {
|
||||
panic!("Aliased dest-domain \"{dest}\" does not exist");
|
||||
} else if !is_domain && !self.accounts.contains_key(dest) {
|
||||
panic!("Aliased dest-account \"{dest}\" does not exist");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue