Compare commits

...

2 Commits

Author SHA1 Message Date
Adrian aca84ffe4e Add postfix setting table 2022-07-02 15:56:06 +02:00
Adrian 6959ac1eba Rename postfix db files 2022-07-02 15:34:01 +02:00
16 changed files with 24 additions and 24 deletions

View File

@ -1,2 +0,0 @@
dbpath = /data/mail/config/vmail.db
query = SELECT action FROM access WHERE address = '%s'

View File

@ -1,2 +0,0 @@
dbpath = /data/mail/config/vmail.db
query = SELECT goto FROM alias WHERE address = '%s' AND active = 1

View File

@ -0,0 +1,2 @@
dbpath = /data/mail/config/vmail.db
query = SELECT v FROM setting WHERE active = 1 AND k = '%s' AND name = 'recipient_access'

View File

@ -0,0 +1,2 @@
dbpath = /data/mail/config/vmail.db
query = SELECT v FROM setting WHERE active = 1 AND k = '%s' AND name = 'alias'

View File

@ -0,0 +1,2 @@
dbpath = /data/mail/config/vmail.db
query = SELECT domain FROM domain WHERE active = 1 AND domain = '%s' AND NOT (transport LIKE 'smtp%%' OR transport LIKE 'relay%%')

View File

@ -0,0 +1,2 @@
dbpath = /data/mail/config/vmail.db
query = SELECT username FROM mailbox WHERE active = 1 AND username = '%s'

View File

@ -0,0 +1,2 @@
dbpath = /data/mail/config/vmail.db
query = SELECT domain FROM domain WHERE active = 1 AND domain = '%s' AND (transport LIKE 'smtp%%' OR transport LIKE 'relay%%')

View File

@ -0,0 +1,2 @@
dbpath = /data/mail/config/vmail.db
query = SELECT transport FROM domain WHERE active = 1 AND domain = '%s'

View File

@ -0,0 +1,2 @@
dbpath = /data/mail/config/vmail.db
query = SELECT maildir FROM mailbox WHERE active = 1 AND username = '%s'

View File

@ -1,2 +0,0 @@
dbpath = /data/mail/config/vmail.db
query = SELECT domain FROM domain WHERE domain = '%s' AND active = 1 AND NOT (transport LIKE 'smtp%%' OR transport LIKE 'relay%%')

View File

@ -1,2 +0,0 @@
dbpath = /data/mail/config/vmail.db
query = SELECT username FROM mailbox WHERE username = '%s' AND active = 1

View File

@ -6,6 +6,7 @@ disable_vrfy_command = yes
mailbox_size_limit = 0 mailbox_size_limit = 0
message_size_limit = 0 message_size_limit = 0
mynetworks_style = subnet mynetworks_style = subnet
alias_maps = hash:/etc/aliases
# Custom # Custom
@ -25,27 +26,26 @@ tls_server_sni_maps = hash:/etc/postfix/sni.cf
smtpd_tls_received_header = yes smtpd_tls_received_header = yes
relay_domains = sqlite:/etc/postfix/relay.cf relay_domains = sqlite:/etc/postfix/db-relay.cf
transport_maps = sqlite:/etc/postfix/transport.cf transport_maps = sqlite:/etc/postfix/db-transport.cf
virtual_mailbox_base = /data/mail/mail virtual_mailbox_base = /data/mail/mail
virtual_uid_maps = static:2000 virtual_uid_maps = static:2000
virtual_gid_maps = static:2000 virtual_gid_maps = static:2000
virtual_mailbox_domains = sqlite:/etc/postfix/domains.cf virtual_mailbox_domains = sqlite:/etc/postfix/db-domains.cf
virtual_mailbox_maps = sqlite:/etc/postfix/virtual.cf virtual_mailbox_maps = sqlite:/etc/postfix/db-virtual.cf
virtual_alias_maps = sqlite:/etc/postfix/alias.cf virtual_alias_maps = sqlite:/etc/postfix/db-alias.cf
virtual_mailbox_limit = 0 virtual_mailbox_limit = 0
smtpd_sasl_auth_enable = yes smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth smtpd_sasl_path = private/auth
smtpd_sender_login_maps = sqlite:/etc/postfix/login.cf, $virtual_alias_maps smtpd_sender_login_maps = sqlite:/etc/postfix/db-login.cf, $virtual_alias_maps
smtpd_delay_reject = no
smtpd_hard_error_limit = 1 smtpd_hard_error_limit = 1
smtpd_client_restrictions = reject_unknown_reverse_client_hostname smtpd_client_restrictions = reject_unknown_reverse_client_hostname
smtpd_sender_restrictions = reject_sender_login_mismatch smtpd_sender_restrictions = reject_sender_login_mismatch
smtpd_recipient_restrictions = check_recipient_access sqlite:/etc/postfix/access.cf smtpd_recipient_restrictions = check_recipient_access sqlite:/etc/postfix/db-access.cf
smtpd_milters = unix:private/opendkim smtpd_milters = unix:private/opendkim
non_smtpd_milters = $smtpd_milters non_smtpd_milters = $smtpd_milters

View File

@ -1,2 +0,0 @@
dbpath = /data/mail/config/vmail.db
query = SELECT domain FROM domain WHERE domain = '%s' AND active = 1 AND (transport LIKE 'smtp%%' OR transport LIKE 'relay%%')

View File

@ -1,2 +0,0 @@
dbpath = /data/mail/config/vmail.db
query = SELECT transport FROM domain WHERE domain = '%s' AND active = 1

View File

@ -1,2 +0,0 @@
dbpath = /data/mail/config/vmail.db
query = SELECT maildir FROM mailbox WHERE username = '%s' AND active = 1

View File

@ -1,7 +1,7 @@
create table alias (address varchar(255) not null primary key, goto varchar(255) not null, active int not null default 1);
create table domain (domain varchar(255) not null primary key, transport varchar(255) not null default 'virtual', active int not null default 1); create table domain (domain varchar(255) not null primary key, transport varchar(255) not null default 'virtual', active int not null default 1);
create table mailbox (username varchar(255) not null primary key, password varchar(255) not null default '', name varchar(255) not null default '', maildir varchar(255) not null, active int not null default 1); create table mailbox (username varchar(255) not null primary key, password varchar(255) not null default '', name varchar(255) not null default '', maildir varchar(255) not null, active int not null default 1);
create table setting (name varchar(255) not null, k varchar(255) not null, v varchar(255) not null, active int not null default 1, primary key (name, k));
create table dkim (match varchar(255) not null primary key, key varchar(255) not null); create table dkim (match varchar(255) not null primary key, key varchar(255) not null);
create table dkim_key (key varchar(255) not null primary key, domain varchar(255) not null, selector varchar(255) not null, private_key varchar(65535) not null); create table dkim_key (key varchar(255) not null primary key, domain varchar(255) not null, selector varchar(255) not null, private_key varchar(65535) not null);
create table access (address varchar(255) not null primary key, action varchar(255) not null);