Re: [Exim] SQL POP before SMTP method?

Top Page
Delete this message
Reply to this message
Author: Eric Renfro
Date:  
To: exim-users
Subject: Re: [Exim] SQL POP before SMTP method?
On Thursday 24 October 2002 12:44 pm, 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.


Ahh, yes. I was looking at the FAQ's at exim.org, FAQ number Q0706, as typoed
by Philip in an archived reply to someone else's question regarding
POP-auth-before-SMTP.

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?

--
Eric Renfro
Myrddin Computers & Designs - CEO/President
Sales: sales@???
Fax: (775) 243-4535