[tpop3d-discuss] auth-mysql-onlogin-query

Chris Lightfoot chris at ex-parrot.com
Sat, 18 Jan 2003 01:30:17 +0000


On Fri, Jan 17, 2003 at 11:07:10PM +0200, Chad Jackson wrote:
> Hello,
> 
> I have tpop3d up and working, although I have had to make the
> auth-mysql-onlogin-query realy simple to allow postfix to handle the
> response. I created the ip_access table with the ip field as the primary key
> and a field that returns 'OK'. Having the primary key stops multiple records
> with the same IP address from being added. I am using the following sql
> statement
> 
>  insert into ip_access values ('$(clienthost)','OK' )
> 
> Prior to this postmap -q ADDRESS mysql:... was returning OK,OK,OK,OK,OK
> depending on how often the client was checking for mail.
> 
> Although what I have is working I am not happy with the the following entry
> in the logs continuosly.
> 
> local0.error] auth_mysql_onlogin: mysql_query: Duplicate entry 'ADDRESS' for
> key 1
> 
> I am looking for info on being more creative with the
> auth-mysql-onlogin-query

Can't you use the MySQL REPLACE statement?

-- 
``Of course we are not patronising women. We are just going to explain to
  them, in words of one syllable, what it is all about.'' (Olga Maitland)