check_recipient_access in MySQL

2012-02-15 Thread Jack Knowlton
Hi guys. I'm looking into implementing a check_recipient_access as a table inside a MySQL database. It's basically a list of users that have been banned from the system and for whom I don't want a simple 550 user unknown bounce. Currently the list is a flat file hash map: u...@domain.com REJECT

Re: check_recipient_access in MySQL

2012-02-15 Thread /dev/rob0
On Wed, Feb 15, 2012 at 03:50:00PM +0100, Jack Knowlton wrote: I'm looking into implementing a check_recipient_access as a table inside a MySQL database. It's basically a list of users that have been banned from the system and for whom I don't want a simple 550 user unknown bounce.

Re: check_recipient_access in MySQL

2012-02-15 Thread Jack Knowlton
On Wed, February 15, 2012 5:37 pm, /dev/rob0 wrote: On Wed, Feb 15, 2012 at 03:50:00PM +0100, Jack Knowlton wrote: I'm looking into implementing a check_recipient_access as a table inside a MySQL database. It's basically a list of users that have been banned from the system and for whom I

Re: check_recipient_access in MySQL

2012-02-15 Thread /dev/rob0
On Wed, Feb 15, 2012 at 05:57:55PM +0100, Jack Knowlton wrote: Do you think this could work postmap(1) is your friend. postmap -q listed@address mysql:/path/to/your/query Where listed@address is in the recipient_access table address column. CREATE TABLE IF NOT EXISTS `recipient_access` (

Re: check_recipient_access in MySQL

2012-02-15 Thread Brian Evans - Postfix List
On 2/15/2012 11:57 AM, Jack Knowlton wrote: On Wed, February 15, 2012 5:37 pm, /dev/rob0 wrote: On Wed, Feb 15, 2012 at 03:50:00PM +0100, Jack Knowlton wrote: I'm looking into implementing a check_recipient_access as a table inside a MySQL database. It's basically a list of users that have

Re: check_recipient_access in MySQL

2012-02-15 Thread Jack Knowlton
On Wed, February 15, 2012 6:08 pm, Brian Evans - Postfix List wrote: On 2/15/2012 11:57 AM, Jack Knowlton wrote: On Wed, February 15, 2012 5:37 pm, /dev/rob0 wrote: On Wed, Feb 15, 2012 at 03:50:00PM +0100, Jack Knowlton wrote: I'm looking into implementing a check_recipient_access as a table

Re: check_recipient_access in MySQL

2012-02-15 Thread Benny Pedersen
Den 2012-02-15 15:50, Jack Knowlton skrev: u...@domain.com REJECT This particular user has been banned. us...@domain.com REJECT This particular user has been banned. select concat(´REJECT This user is banned´) from banned_usertable where useremail = ´%s´ test as usual with postmap that it

Re: check_recipient_access in MySQL

2012-02-15 Thread Reindl Harald
Am 16.02.2012 00:14, schrieb Benny Pedersen: Den 2012-02-15 15:50, Jack Knowlton skrev: u...@domain.com REJECT This particular user has been banned. us...@domain.com REJECT This particular user has been banned. select concat(´REJECT This user is banned´) from banned_usertable where

Re: check_recipient_access in MySQL

2012-02-15 Thread Benny Pedersen
Den 2012-02-15 17:57, Jack Knowlton skrev: u...@domain.com REJECT This particular user has been banned. us...@domain.com REJECT This particular user has been banned. dbname = postfix hosts = 10.0.1.54 query = SELECT action FROM recipient_access WHERE address='%s' postmap -q

Re: check_recipient_access in MySQL

2012-02-15 Thread Benny Pedersen
Den 2012-02-16 00:16, Reindl Harald skrev: select 'REJECT This user is banned' from banned_usertable where useremail = '%s' will do exactly the same missing limit so postfix only get one hit if listed and NULL if not listed

Re: check_recipient_access in MySQL

2012-02-15 Thread /dev/rob0
On Wed, Feb 15, 2012 at 11:24:30PM +0100, Jack Knowlton wrote: Same thing can be done for check_sender_access, right? Any check_*_access or other kind of lookup. And what about storing a CIDR table into a database - is it possible? PostgreSQL has a CIDR data type. I do not think other