diff --git a/README.md b/README.md index 7ae5c91..37a6de2 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,6 @@ create table if not exists virtual_aliases ( destination text not null ); -create table if not exists virtual_senders ( - email text not null references virtual_users(email) -); ``` # Volumes diff --git a/rootfs/etc/confd/templates/main.cf.tmpl b/rootfs/etc/confd/templates/main.cf.tmpl index 37aaeb6..c9ac846 100644 --- a/rootfs/etc/confd/templates/main.cf.tmpl +++ b/rootfs/etc/confd/templates/main.cf.tmpl @@ -70,7 +70,6 @@ non_smtpd_milters=$smtpd_milters milter_mail_macros="i {mail_addr} {client_addr} {client_name} {auth_authen}" milter_default_action = accept milter_macro_daemon_name = ORIGINATING -milter_connect_macros = "i j {daemon_name} v {if_name} _" message_size_limit = {{getenv "MESSAGE_SIZELIMIT" "20000000"}} diff --git a/rootfs/etc/confd/templates/pgsql-login-maps.cf.tmpl b/rootfs/etc/confd/templates/pgsql-login-maps.cf.tmpl index 98f90dd..ee0c956 100644 --- a/rootfs/etc/confd/templates/pgsql-login-maps.cf.tmpl +++ b/rootfs/etc/confd/templates/pgsql-login-maps.cf.tmpl @@ -2,4 +2,4 @@ hosts = {{ getenv "DB_HOST" }} user = {{ getenv "DB_USER" "email" }} password = {{ getenv "DB_PASSWORD" }} dbname = {{ getenv "DB_NAME" "email" }} -query = SELECT email FROM virtual_users WHERE email='%s' UNION SELECT destination FROM virtual_aliases WHERE email='%s' +query = SELECT email FROM virtual_users WHERE email='%u' UNION SELECT destination FROM virtual_aliases WHERE source='%u' diff --git a/rootfs/etc/confd/templates/pgsql-virtual-alias-maps.cf.tmpl b/rootfs/etc/confd/templates/pgsql-virtual-alias-maps.cf.tmpl index 302129d..d7e5ef4 100644 --- a/rootfs/etc/confd/templates/pgsql-virtual-alias-maps.cf.tmpl +++ b/rootfs/etc/confd/templates/pgsql-virtual-alias-maps.cf.tmpl @@ -2,4 +2,4 @@ hosts = {{ getenv "DB_HOST" }} user = {{ getenv "DB_USER" "email" }} password = {{ getenv "DB_PASSWORD" }} dbname = {{ getenv "DB_NAME" "email" }} -query = SELECT destination FROM virtual_aliases WHERE email='%s' +query = SELECT destination FROM virtual_aliases WHERE source='%u' diff --git a/rootfs/etc/confd/templates/pgsql-virtual-mailbox-domains.cf.tmpl b/rootfs/etc/confd/templates/pgsql-virtual-mailbox-domains.cf.tmpl index 6fd5b58..89292e5 100644 --- a/rootfs/etc/confd/templates/pgsql-virtual-mailbox-domains.cf.tmpl +++ b/rootfs/etc/confd/templates/pgsql-virtual-mailbox-domains.cf.tmpl @@ -2,4 +2,4 @@ hosts = {{ getenv "DB_HOST" }} user = {{ getenv "DB_USER" "email" }} password = {{ getenv "DB_PASSWORD" }} dbname = {{ getenv "DB_NAME" "email" }} -query = SELECT name FROM virtual_domains WHERE name='%s' +query = SELECT name FROM virtual_domains WHERE name='%u' diff --git a/rootfs/etc/confd/templates/pgsql-virtual-mailbox-maps.cf.tmpl b/rootfs/etc/confd/templates/pgsql-virtual-mailbox-maps.cf.tmpl index 971fa97..addd0fb 100644 --- a/rootfs/etc/confd/templates/pgsql-virtual-mailbox-maps.cf.tmpl +++ b/rootfs/etc/confd/templates/pgsql-virtual-mailbox-maps.cf.tmpl @@ -2,4 +2,4 @@ hosts = {{ getenv "DB_HOST" }} user = {{ getenv "DB_USER" "email" }} password = {{ getenv "DB_PASSWORD" }} dbname = {{ getenv "DB_NAME" "email" }} -query = SELECT email FROM virtual_users WHERE email ='%s' +query = SELECT email FROM virtual_users WHERE email ='%u'