Skip to content
Permalink
Browse files

Merge branch 'master' of github.com:modoboa/modoboa

  • Loading branch information
tonioo committed Mar 9, 2020
2 parents 87914d0 + 9b27cf5 commit 156adb015dd85350995513c0e378a9cae27cb857
Showing with 20 additions and 3 deletions.
  1. +2 −0 .gitignore
  2. +18 −3 modoboa/admin/postfix_maps.py
@@ -16,3 +16,5 @@ modoboa_test
.coverage
build/
dist/
/.project
/.pydevproject
@@ -119,7 +119,12 @@ class SenderLoginMap(object):
"WHERE al.enabled=1 AND ("
" al.address='%s' OR ("
" adoma.name='%d' AND al.address=concat('%u', '@', adom.name)"
")))"
"))) "
"UNION "
"(SELECT concat(mb.address, '@', dom.name) FROM admin_mailbox mb "
"INNER JOIN admin_senderaddress sad ON sad.mailbox_id=mb.id "
"INNER JOIN admin_domain dom ON dom.id=mb.domain_id "
"WHERE sad.address=concat('@','%d')) "
)
postgres = (
"(SELECT email FROM core_user WHERE email='%s' AND is_active) "
@@ -138,7 +143,12 @@ class SenderLoginMap(object):
"WHERE al.enabled AND ("
" al.address='%s' OR ("
" adoma.name='%d' AND al.address='%u'||'@'||adom.name"
")))"
"))) "
"UNION "
"(SELECT mb.address || '@' || dom.name FROM admin_mailbox mb "
"INNER JOIN admin_senderaddress sad ON sad.mailbox_id=mb.id "
"INNER JOIN admin_domain dom ON dom.id=mb.domain_id "
"WHERE sad.address='@'||'%d') "
)
sqlite = (
"SELECT email FROM core_user WHERE email='%s' AND is_active=1 "
@@ -157,5 +167,10 @@ class SenderLoginMap(object):
"WHERE al.enabled=1 AND ("
" al.address='%s' OR ("
" adoma.name='%d' AND al.address='%u'||'@'||adom.name"
"))"
")) "
"UNION "
"(SELECT mb.address || '@' || dom.name FROM admin_mailbox mb "
"INNER JOIN admin_senderaddress sad ON sad.mailbox_id=mb.id "
"INNER JOIN admin_domain dom ON dom.id=mb.domain_id "
"WHERE sad.address='@'||'%d') "
)

0 comments on commit 156adb0

Please sign in to comment.
You can’t perform that action at this time.