Here's a really basic, not yet working LMTP daemon. Mostly it's pop3.c,
pop3.h and pop3d.c with a little s/pop3?/lmtp/g magic.
Well, that and it supports the amazing LMTP command set of...
LHLO, MAIL FROM, RCPT TO, RSET, QUIT, NOOP and HELP
VRFY and EXPN return "not implemented" error codes (Ok per RFC ;-)
Entering DATA will cause the RCPT addresses to be looked up via
auth_check_user_ext() and say if they're valid or not. I haven't started
working on the "real data" part (the one that actually accepts a message)
because I'm still working out which pieces of pipe.c and injector.c are
good, which parts need more abstraction, and which parts get junked.
I do get some segfaults and weird behaviour. If someone could audit the
code following the case LMTP_MAIL, LMTP_RCPT and LMTP_DATA blocks in
lmtp.c I would very much appreciate it. What really bugs me, though, is
that a few of the problems are not consistently triggered :-\
Time to hunt down those random state bits!
I hope that this might become a basis for the official LMTP daemon, but in
any event this is a lot of fun to write! Plus, the experience helps for
the next daemon I'm going to write, for the ManageSieve protocol :-)
Huge shout out to the IC&S guys because the structure of pop3.c was SO
easy to work with!
Aaron
pop3.h and pop3d.c with a little s/pop3?/lmtp/g magic.
Well, that and it supports the amazing LMTP command set of...
LHLO, MAIL FROM, RCPT TO, RSET, QUIT, NOOP and HELP
VRFY and EXPN return "not implemented" error codes (Ok per RFC ;-)
Entering DATA will cause the RCPT addresses to be looked up via
auth_check_user_ext() and say if they're valid or not. I haven't started
working on the "real data" part (the one that actually accepts a message)
because I'm still working out which pieces of pipe.c and injector.c are
good, which parts need more abstraction, and which parts get junked.
I do get some segfaults and weird behaviour. If someone could audit the
code following the case LMTP_MAIL, LMTP_RCPT and LMTP_DATA blocks in
lmtp.c I would very much appreciate it. What really bugs me, though, is
that a few of the problems are not consistently triggered :-\
Time to hunt down those random state bits!
I hope that this might become a basis for the official LMTP daemon, but in
any event this is a lot of fun to write! Plus, the experience helps for
the next daemon I'm going to write, for the ManageSieve protocol :-)
Huge shout out to the IC&S guys because the structure of pop3.c was SO
easy to work with!
Aaron