changes in mail system

This commit is contained in:
2022-12-22 11:06:25 +01:00
committed by Gitea
parent 252acb85c7
commit 6e9572a5e0
5 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -573,7 +573,7 @@ maybe chgrp 'dovecot' 'dovecot/dovecot-dict-auth.conf.ext'
maybe chmod 0640 'dovecot/dovecot-dict-auth.conf.ext'
maybe chgrp 'dovecot' 'dovecot/dovecot-dict-sql.conf.ext'
maybe chmod 0640 'dovecot/dovecot-dict-sql.conf.ext'
maybe chmod 0644 'dovecot/dovecot-mysql.conf'
maybe chmod 0440 'dovecot/dovecot-mysql.conf'
maybe chgrp 'dovecot' 'dovecot/dovecot-sql.conf.ext'
maybe chmod 0640 'dovecot/dovecot-sql.conf.ext'
maybe chmod 0644 'dovecot/dovecot.conf'
BIN
View File
Binary file not shown.
+4 -2
View File
@@ -1,6 +1,8 @@
driver = mysql
connect = host=localhost dbname=postfixdb user=postfix password=e9EEBSJCxPHw
default_pass_scheme = MD5-CRYPT
password_query = SELECT password FROM mailbox WHERE username = '%u'
#password_query = SELECT username AS user, domain, password FROM mailbox WHERE username = '%u' AND domain = '%d' and active = true;
password_query = SELECT password FROM mailbox WHERE username = '%u' and active = true;
user_query = SELECT CONCAT('maildir:/var/opt/vmail/',maildir) AS mail, 5000 AS uid, 5000 AS gid FROM mailbox INNER JOIN domain WHERE username = '%u' AND mailbox.active = '1' AND domain.active = '1'
#user_query = SELECT concat('*:storage=', quota, 'M') AS quota_rule FROM mailbox WHERE username = '%n' AND domain = '%d' AND sendonly = false;
iterate_query = SELECT username, domain FROM mailbox where sendonly = false;
+1 -1
View File
@@ -126,7 +126,7 @@ smtpd_relay_restrictions = reject_non_fqdn_recipient
### Bedingungen, damit Postfix ankommende E-Mails als Empfängerserver entgegennimmt (zusätzlich zu relay-Bedingungen)
### check_recipient_access prüft, ob ein account sendonly ist
#smtpd_recipient_restrictions = check_recipient_access mysql:/etc/postfix/mysql_virtual_recipient_access.cf
smtpd_recipient_restrictions = check_recipient_access mysql:/etc/postfix/mysql_virtual_recipient_access.cf
### Bedingungen, die SMTP-Clients erfüllen müssen (sendende Server)
+2 -1
View File
@@ -2,4 +2,5 @@ user = postfix
password = e9EEBSJCxPHw
hosts = localhost
dbname = postfixdb
query = select if(sendonly = true, 'REJECT', 'OK') AS access from accounts where username = '%u' and domain = '%d' and enabled = true LIMIT 1;
#query = select if(sendonly = true, 'REJECT', 'OK') AS access from mailbox where username = '%u' and domain = '%d' and enabled = true LIMIT 1;
query = select if(sendonly = true, 'REJECT', 'OK') AS access from mailbox where username = '%u' and active = true LIMIT 1;