Re: [Exim] SQL POP before SMTP method?

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

On Thu, 24 Oct 2002, Torsten Mueller wrote:

> Eric Renfro schrieb:
> >
> > Here's an added feature I would like to add to my exim setup.
> >
> > I would like to make an SQL-based POP before SMTP method, allowing users who
> > can't SMTP AUTH by other normal means, to be able to login through POP before
> > sending email out to anywhere.
> >
> > I haven't a clue how to start this idea, but I'm guessing it's somehow
> > ACL-based in exim4?
> >
> > I have a table, users, based on this layout, with only the relevant
> > information needed for this scheme to work:
> >
> >   userid  |     last_login
> > ----------+---------------------
> >  user1    | 2002-10-24 11:15:54
> >  user2    | 2002-10-23 09:35:51
> >  user3    | 1979-11-03 22:05:58
> >  user4    | 2002-10-24 11:47:11
> >  user5    | 2002-10-24 11:50:21

>
> Missing the remote IP here, as POP before SMTP uses
> hostlist relay_from_hosts
> Which should be in your case the IP of the POP client.


Correct, he basicly needs something like this

hostlist relay_from_host = pgsql;select 1 from users where \
authhost='${quote_pgsql:$sender_host_address}' and now() < \
last_login+5minutes

if you REALLY REALLY REALLY whant to make it depend on the local_part
(very unusual, and insecure) you can use this

hostlist relay_from_host = pgsql;select 1 from users where \
user='${quote_pgsql:$local_part}' and now() < \
last_login+5minutes

(i don't use pgsql, so don't blame me for the incorrect syntax ;) )

ciao