I needed to enable the external authentication daemon pure-authd.
Found out about /etc/pure-ftpd/conf/ExtAuth, but the FTP daemon would not
start, because the socket (which gets created by pure-authd) was missing.
It seemed illogical to create another init script, since the upload handler
is already started from the pure-ftpd init script. The auth daemon has to be
started before pure-ftpd because it needs to create the authentication
socket first (configured in ExtAuth, but in my opinion it should be static,
the ExtAuth value changed to boolean, like CallUploadScript[B)
I'm attaching the diff from the old init script (I did this on Lenny, but I
checked the sid init script and it doesn't seem like anything changed).
I'm also attaching an example python external authentication script which
could be a little more polished, but it was just a proof of concept for me.
If you're interested in including it, I'm willing to spruce it up a little.
There are also a few new variables to be set in
/etc/default/pure-ftpd-common:
AUTHDSCRIPT=/path/to/authhandler[B
AUTHDUID=
AUTHDGID=
in line with the variables used for upload handler.