|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Christian Winter (thepoet
a-za-z0-9.de)
Date: Fri Dec 07 2007 - 11:08:20 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Simone Felici wrote:
> Hi to all!
>
> I've installed postfix with SMTP AUTH (SASL2-PAM) based on MySQL
> autentication.
> All works perfectly. I've only a simple question:
> All my postfix checks are made by mysql queries (relay_domains, ...)
> to two different hosts:
>
> (...)
> hosts = <host1> <host2>
> (...)
>
> If the host1 goes DOWN, host2 can answer.
> How can I implement this failover with SMTP AUTH autentication?
> As far I've understood, the file /etc/pam.d/smtp contain the
> connection string, like this:
>
> #%PAM-1.0
> auth required pam_mysql.so user=database passwd=password host=<host1>
> db=postfix table=mailbox usercolumn=username passwdcolumn=password
> crypt=0
> account sufficient pam_mysql.so user=database passwd=password
> host=<host1> db=postfix table=mailbox usercolumn=username
> passwdcolumn=password crypt=0
>
> How can i specify the queries should be done to host1 or to host2 if
> host1 isn't reachable?
Why not simply use the pam fallback mechanism itself and list alternatives
in your pam.d/smtp?
------------------------------------------------------------------------
auth sufficient pam_mysql.so user=database passwd=password host=<host1>
db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=0
auth required pam_mysql.so user=database passwd=password host=<host2>
db=postfix table=mailbox usercolumn=username passwdcolumn=password
crypt=0 use_first_pass
...
------------------------------------------------------------------------
If the first auth attempts succeeds, everything is fine, otherwise
the next entry is invoked.
-Chris
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]