Am 05.12.2011 10:42, schrieb Sebastian Wiesinger:
>> Do not use SQL in virtual_mailbox_domains[1]; instead, set the latter to
>> a regular list.  Then, even when MySQL is down, Postfix will defer mail
>> with 4.3.0 instead of appearing to freeze.
> 
> Hi Sahil,
> 
> that's not really an option for me, I need these lists in MySQL. It
> seems I have to live with it and make MySQL as stable as possible.

there is no need not use mysql for any postfix configuration
since 2009 ALL or mailservices are mysql-backed inclduing mail-storage and
there are much more options used than on most other mailservers out there

as said, use replication and the slave as fallback for postfix

[root@mail:~]$ cat /etc/postfix/mysql-transport.cf
user     = dbmailro
password = **************
dbname   = dbmail
hosts    = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307
query    = select transport from dbma_transports where mydestination='%s' or 
mydestination='%d' order by transport
desc limit 1;
__________________________________

normally mysql is rock stable and never down

rebuild mysql-packages at your own the remove the idiotic restarts
on update which most distributions do, stop mailservices before restart
mysqld and start them after that
__________________________________

finally work with scripts to maintain services
this way i do a "dbmail-stop-all.sh; reboot" and change the
Before/After of systemd to make sure all services are started
in the right order - thats why i throwed away the mysql-package
from Fedora 15 and make my own things

[root@mail:~]$ cat /scripts/dbmail-stop-all.sh
#!/bin/bash
/sbin/service crond stop
/sbin/service postfix stop
/sbin/service dovecot stop
/sbin/service dbmail-imapd stop
/sbin/service dbmail-lmtpd stop
/sbin/service dbmail-pop3d stop
/sbin/service dbmail-timsieved stop
/sbin/service mysqld stop

[root@mail:~]$ cat /scripts/dbmail-start-all.sh
#!/bin/bash
/sbin/service mysqld start
/sbin/service dbmail-lmtpd start
/sbin/service dovecot start
/sbin/service postfix start
/sbin/service dbmail-imapd start
/sbin/service dbmail-pop3d start
/sbin/service dbmail-timsieved start
/sbin/service crond start

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to