2 msgRemote backup Postfix server
7 msgchose interface for outgoing mail
2 msgIllegal address syntax ... in MAIL command: <...
1 msgMail Infrastructure and Zertificon
1 msgsasl password
6 msgpostfix TLS (configuration/user) problem
7 msgVirtual Alias Domain
3 msgcopy of email
2 msgDNS Caching?

Using mysql for mynetworks
\ Keith (12 Mar 2008)
. \ Magnus Bäck (12 Mar 2008)
. . \ Keith (12 Mar 2008)
. . . \ mouss (12 Mar 2008)
. . . . \ Keith (12 Mar 2008)

5 msgBlocking e-mail from a domain, to a particular ...
5 msgprevent open relay
15 msgcannot get mail from outside to my smtp server
6 msgError connecting Postfix to LDAP
5 msgConfig ok for TLS/SASL/Client Cert via port 587?
7 msgmail flow architecture
3 msgvirtual forward + deliver
1 msgRe: RESOLVED: Using Canonical Maps as an Overri...
14 msgdual mail server
3 msghow to specify different outgoing IP
Subject:Re: Using mysql for mynetworks
Group:Postfix-users
From:Keith
Date:12 Mar 2008


 
On Wed, 12 Mar 2008, mouss wrote:

|->if you really want to put cidr nets in mysql, then you can either use
|->inet_aton or between depending how you store the networks.
|->
|->you can have {network, mask, action} columns, in which case you can use
|->
|->query = select action where '%s' & mask = network & mask
|->
|->an alternative is to store {start, end, action} where start and end are
|->the first and last IP in "binary" form (a 32 bits integer). then you can
|->use between.
|->
|->In both cases, you'll have a problem with hostnames (inet_aton error).
|->you can "prevent" this using a REGEXP call. but then it's too much,
|->isn't it?
|->
|->if what you want is the ability to manage the infos in mysql, then do
|->that but dump the table (periodically or at update time).

After seeing whats involved with that, I prefer to keep it simple and a
flat text file is as simple as it gets. That file changes so rarely its
not worth the effort to store it into a database.

Thanks for the info though.
Keith


© 2004-2008 readlist.com