Re: [Exim] SQL POP before SMTP method?

Top Page
Delete this message
Reply to this message
Author: Torsten Mueller
Date:  
To: exim-users@exim.org
Subject: Re: [Exim] SQL POP before SMTP method?

"Eric Renfro (by way of Eric Renfro )" schrieb:
...
>
> I just noticed dbmail's pbsp table structure isn't defined yet for their
> PostgreSQL implementation, yet there's source code that looks like it might
> utilize it. I'll check in over there.
>
> Until then. Say I have:
>
>  idnr  |  since              | ipnumber
> -------+---------------------+--------------
>  user1 | 2002-10-24 11:15:54 | 192.168.1.10

>
> Adding:
>
> hostlist  pop_before_smtp = \
>             ${lookup pgsql {SELECT ipnumber WHERE since > (now() - '5
> minutes'::INTERVAL)::datetime;

>
> and using an ACL of:
>
> accept  hosts         = +relay_from_hosts
> accept  hosts         = +pop_before_smtp

>
> Would this do the trick?


The column "since" means "last login time of the POP client" right ?

I can't say, if the query would succeed with pgsql, as i only use mySQL,
for mySQL it would (i.e.) look like this:

RELAY_TIMEOUT=1 MINUTE
MYSQL_RELAY = SELECT ip FROM relay_ip WHERE ip="${sender_host_address}"
\
        AND DATE_SUB(NOW(), INTERVAL RELAY_TIMEOUT) < timestampoflastlogin
hostlist   relay_from_hosts = 127.0.0.1:mysql;MYSQL_RELAY



Torsten