Created
February 7, 2014 14:54
-
-
Save dachi-gh/8864123 to your computer and use it in GitHub Desktop.
Integrating PostfixAdmin with Postfix + Dovecot Personal SQL Auth with SASL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
driver = mysql | |
connect = host=127.0.0.1 dbname=postfixadmin user=postfixadmin password=MYPASS | |
default_pass_scheme = SHA512-CRYPT | |
password_query = SELECT username, password FROM mailbox WHERE username='%u' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!include_try /usr/share/dovecot/protocols.d/*.protocol | |
protocols = imap pop3 lmtp | |
!include conf.d/*.conf | |
!include_try local.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) | |
biff = no | |
append_dot_mydomain = no | |
readme_directory = no | |
smtpd_tls_cert_file=/etc/ssl/dachi.pem | |
smtpd_tls_key_file=/etc/ssl/private/dachi.pem | |
smtpd_use_tls=yes | |
smtpd_tls_auth_only = yes | |
smtpd_sasl_type = dovecot | |
smtpd_sasl_path = private/auth | |
smtpd_sasl_auth_enable = yes | |
smtpd_recipient_restrictions = | |
permit_sasl_authenticated, | |
permit_mynetworks, | |
reject_unauth_destination | |
myhostname = dachi.co | |
alias_maps = hash:/etc/aliases | |
alias_database = hash:/etc/aliases | |
myorigin = /etc/mailname | |
mydestination = localhost | |
relayhost = | |
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 | |
mailbox_size_limit = 0 | |
recipient_delimiter = + | |
inet_interfaces = all | |
virtual_transport = lmtp:unix:private/dovecot-lmtp | |
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf | |
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf | |
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smtp inet n - - - - smtpd | |
submission inet n - - - - smtpd | |
pickup fifo n - - 60 1 pickup | |
cleanup unix n - - - 0 cleanup | |
qmgr fifo n - n 300 1 qmgr | |
tlsmgr unix - - - 1000? 1 tlsmgr | |
rewrite unix - - - - - trivial-rewrite | |
bounce unix - - - - 0 bounce | |
defer unix - - - - 0 bounce | |
trace unix - - - - 0 bounce | |
verify unix - - - - 1 verify | |
flush unix n - - 1000? 0 flush | |
proxymap unix - - n - - proxymap | |
proxywrite unix - - n - 1 proxymap | |
smtp unix - - - - - smtp | |
relay unix - - - - - smtp | |
showq unix n - - - - showq | |
error unix - - - - - error | |
retry unix - - - - - error | |
discard unix - - - - - discard | |
local unix - n n - - local | |
virtual unix - n n - - virtual | |
lmtp unix - - - - - lmtp | |
anvil unix - - - - 1 anvil | |
scache unix - - - - 1 scache | |
maildrop unix - n n - - pipe | |
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} | |
uucp unix - n n - - pipe | |
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) | |
ifmail unix - n n - - pipe | |
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) | |
bsmtp unix - n n - - pipe | |
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient | |
scalemail-backend unix - n n - 2 pipe | |
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension} | |
mailman unix - n n - - pipe | |
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py | |
${nexthop} ${user} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user = mailuser | |
password = mailuserpass | |
hosts = 127.0.0.1 | |
dbname = mailserver | |
query = SELECT destination FROM virtual_aliases WHERE source='%s' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user = postfixadmin | |
password = MYPASS | |
hosts = 127.0.0.1 | |
dbname = postfixadmin | |
query = SELECT goto FROM alias WHERE address='%s' AND active=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user = postfixadmin | |
password = MYPASS | |
hosts = 127.0.0.1 | |
dbname = postfixadmin | |
query = SELECT domain FROM domain WHERE domain='%s' and backupmx = 0 and active = 1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user = mailuser | |
password = mailuserpass | |
hosts = 127.0.0.1 | |
dbname = mailserver | |
query = SELECT 1 FROM virtual_domains WHERE name='%s' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user = postfixadmin | |
password = MYPASS | |
hosts = 127.0.0.1 | |
dbname = postfixadmin | |
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user = mailuser | |
password = mailuserpass | |
hosts = 127.0.0.1 | |
dbname = mailserver | |
query = SELECT 1 FROM virtual_users WHERE email='%s' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$CONF['encrypt'] = 'dovecot:SHA512-CRYPT'; | |
$CONF['dovecotpw'] = "/usr/bin/doveadm pw"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chown -R www-data:www-data /usr/share/postfixadmin
chmod -R 775 /etc/dovecot