How to make real files for postfix from mysql
# Virtual mailbox maps # tabort gamla filen mv /etc/postfix/mysql-virtual-mailbox-maps /etc/postfix/old-mysql-virtual-mailbox-maps # get users from database mysql -u mailadmin –password=password -e ”SELECT email FROM mail_postfix.virtual_users INTO OUTFILE ’/tmp/mysql-virtual-mailbox-maps'” # flytta till postfix mv /tmp/mysql-virtual-mailbox-maps /etc/postfix/mysql-virtual-mailbox-maps # byt rättigheter chown root /etc/postfix/mysql-virtual-mailbox-maps chgrp root /etc/postfix/mysql-virtual-mailbox-maps chmod go-w /etc/postfix/mysql-virtual-mailbox-maps #fix file with sed sed -i ’s/\(.*\)@\(.*\)/\1@\2 \2\/\1\//g’…
Läs mer