OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: mynetworks lookups using postgresql

From: Victor Duchovni (Victor.DuchovniMorganStanley.com)
Date: Mon Mar 05 2007 - 19:56:51 CST


On Mon, Mar 05, 2007 at 06:21:46PM -0500, Jonathan Towne wrote:

> Hello all,
>
>
> I'm trying to setup a pgsql based map for mynetworks lookups
> because I've got 60+ mailservers to deal with and separate
> networks for each. They'll all be using one database server
> for vmailbox lookups, and I'd prefer they do the same for the
> mynetworks settings.
>
> My problem is: I've got it setup with what I think is a
> reasonable configuration, but it looks like postfix is
> passing the FQDN instead of the connecting IP to my query.
>
>
> The error is as follows:
>
> Mar 5 18:17:31 mail postfix/smtpd[64488]: warning: pgsql query failed: fatal error from host 1.2.3.4: ERROR: invalid input syntax for type inet: "my.clienthost.com"?
> Mar 5 18:17:31 mail postfix/smtpd[64488]: fatal: pgsql:/usr/local/etc/postfix/relaynets-db.cf(0,lock|fold_fix): table lookup problem
>

You need to filter out input keys that don't look like IP addresses.

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomopostfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.