Le 03-12-13, à 18:55, Guillaume Filion a écrit :
Le 03-12-10, à 13:05, Mike Williams a écrit :
Anyway, I would reeeeally like SMTP AUTH support. Otherwise I'll need to run
another instance of qmail and just route all traffic to qpsmtpd.
My perl and smtp/auth knowledge isn't exactly stellar, so my own efforts will
probably take a lot of time, which I don't really have.
Is there anyone already working on this?
Or should I sit my ass down and do some work? :)

There's a saslauth plugin available in the CVS, it's not working yet, but it might be a good starting point. BTW, I'd also love to see SMTP AUTH support in qpsmtpd.


Okay, I had not much to do yesterday night, so I played a bit with the saslauth plugin. Ask described the existing saslauth plugin as "not even halfbacked" so I guess I can call this version "almost halfbaked". Only a minimal functionnality has been implemented, it does not respect most of the RFC, but it's a start.

The PLAIN, LOGIN and CRAM-MD5 mechanisms have been implemented. The modules MIME::Base64 and Digest::HMAC_MD5 are required, but Digest::HMAC_MD5 is allready a prerequisite for Net::DNS, so only MIME::Base64 is a new prerequisite.

The plugin reads the file config/saslauth for the list of username and passwords. Unfortunately, we need put the plaintext password in the file because of a limitation in the SASL protocol. 8(

SMTP.pm needs to be patched to add an auth command, since I was not able to retrieve the argument for the auth command when the hook was set for "unrecognized_command".

[powerbook-gfk:~/qpsmtpd] gfk% cvs diff lib/Qpsmtpd/SMTP.pm
Index: lib/Qpsmtpd/SMTP.pm
===================================================================
RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/SMTP.pm,v
retrieving revision 1.21
diff -r1.21 SMTP.pm
32c32
< my (@commands) = qw(ehlo helo rset mail rcpt data help vrfy noop quit);
---
> my (@commands) = qw(auth ehlo helo rset mail rcpt data help vrfy noop quit);
127a128,132
> sub auth {
> my ($self, $arg, @stuff) = @_;
>
> my ($rc, $msg) = $self->run_hooks("auth", $arg);
> }

Cheers!
GFK's
--
Guillaume Filion, ing. jr
Logidac Tech., Beaumont, Québec, Canada - http://logidac.com/
PGP Key and more: http://guillaume.filion.org/


Attachment: saslauth
Description: Binary data

Reply via email to