Re: [Postfixadmin-devel] Backupmx and redundant servers
Brought to you by:
christian_boltz,
gingerdog
From: Christian B. <pos...@cb...> - 2010-11-25 01:07:35
|
Hello, Am Mittwoch, 24. November 2010 schrieb Oliver Schinagl: > I am a happy user of postfixadmin, but have a question/comment. > > I've gathered from the postfix mailing list that backupmx is > practically dead. Dead in the sense that you can't just be a > backupmx, you do have to actually know about the other hosts users > or bounces, spam etc can become issues for your hosts. Yes, indeed. OTOH, I could even say that I have a world-wide network of backup mailservers - the sending servers cache the mail until they can deliver it to my server *g* Oh, in fact I have configured a backup MX for my domain. It's running on a second IP on the same server, and only gives out temporary errors to (in 99% of all connections) spammers. This takes away a nice amount of spam mails from the main IP that runs more checks. The message my backup MX gives out is I'm a "Faulpelz", please use the primary MX ;-) (for those who don't understand german: Faulpelz means lazybones) > With that in mind, i've changed my mailsetup so that both my > mailhosts have identical users and alias tables. Domain tables > already matched, with the difference in backupmx flag. > > Also note, that one server isn't the main and the other the backup, > but rather they each have their own domains, and are the backup for > the others. > > Ideally, I'd like to do all my postfixadministrating on one host, and > synchronize the db to the other host (pg_dump -> psql import for > example, whilst flipping the backupmx boolean). If you have only two servers, you could modify the queries in postfix ("where backupmx = false" instead of "...= true") so that you don't have to modify the table. That's a bit hacky, but easier to maintain ;-) > However the GUI at > the moment does not work for domains that have the backupmx flag. > > I am unaware of a postfixadmin config setting that allows me to edit > backupmx'ed hosts anyway. If postfixadmin would (optionally) allow > editing of backupmx'ed hosts, then just copying the database will be > ok and easy. No, there isn't a config option for this. It's a known problem. Unfortunately nobody has had the time to change it yet. I just had a quick look at the code - maybe it's easy. open functions.inc.php, search for function list_domains_for_admin ($username) Near the beginning of the function, you'll find the following code: $backupmx_sql = db_get_boolean(False); $query = "SELECT $table_domain.domain, $table_domain_admins.username FROM $table_domain LEFT JOIN $table_domain_admins ON $table_domain.domain=$table_domain_admins.domain WHERE $table_domain_admins.username='$username' AND $table_domain.active='$active_sql' AND $table_domain.backupmx='$backupmx_sql' <------- remove this line ORDER BY $table_domain_admins.domain"; Please remove the line I marked above and test if it works - or if it breaks something. And please report back so that I know if this is something I can change for future releases ;-) Regards, Christian Boltz -- > 8.1 ist nicht 9.0 Also in der Quersumme schon ;-) [> Henne Vogelsang und Manfred Tremmel in suse-linux] |