[tpop3d-discuss] Perl authentication for dummies

Chris Lightfoot chris at ex-parrot.com
Wed, 10 Dec 2003 09:34:33 +0000


On Wed, Dec 10, 2003 at 10:12:58AM +0100, Martin Schmitt wrote:
> http://www.scsy.de/~mas/debug/tpop3d/dotpop-secret.txt

If you stick 1; at the end, then put:

auth-perl-enable: yes
auth-perl-start: do '/path/to/dotpop-secret'
auth-perl-pass: pass

it should work, through the magic of TPOP3D::AuthDriver.

As a stylistic matter, I'd be more inclined to use
getspwent than to read /etc/shadow explicitly; and as a
matter of paranoia, I'd want to 

(a) open ~/.pop-secret, then fstat it, rather than stat it
    then open it;

(b) check the ownership of the file, too.

-- 
``As far as I can tell, we appear to be about to start a world war on purpose.
  This has never been done before.'' (Mitch Benn, from `The Now Show', on Iraq)