|
From: Matthias A. <mat...@gm...> - 2005-12-16 00:57:31
|
Sunil Shetye <sh...@bo...> writes: > One thing that had stumped me then was the FALLBACK_MDA feature. After > splitting, implementing FALLBACK_MDA would be difficult (but not > impossible). Should this feature be continued to be supported? I don't like this feature, and ESR agreed to change the default to be "none" when I urged in that direction, so we've been without default fallback for a while now. Such fallback layers are rarely tested thoroughly and will often behave differently enough from the "first attempt" code that I'd call such fallback layers "nondeterministic" (for practical purposes), and I'd rather suggest that people make sure their primary delivery target, be it SMTP, LMTP, BSMTP or MDA, is reliable. The last thing I want is that people search for their mail because some fallback layer delivered it to another place that the user has long forgotten about. In short: I have no problem with removing the fallback code altogether. > Once splitting is completed, making MDA work in multidrop should not > be a problem. > > Here would be the aim of this development: > > - Split sink.c into sink-smtp.c, sink-bsmtp.c, sink-mda.c (and > possibly, sink-lmtp.c). I'm not sure if sink-smtp.c, sink-bsmtp.c and sink-lmtp.c are sufficiently different to warrant three separate modules. They share quite a lot of code with some minor differences, but in the end it's always an SMTP dialect. If the differences between these can be factored out with common code shared, that'll be good. For instance, BSMTP and SMTP are quite similar, we'll just replace a backend writer function (or file/socket descriptor) and pretend all incoming response codes had been the proper OK code for the respective stage (20X, 250, 354). LMTP is also quite similar to ESMTP so that shared code is probably more maintainable in the long run. If C++ is of advantage (class inheritance), I don't mind either, we'll slap "7.0.0" (rather than 6.4.0) on the new code then. > - Make a structure (similar to struct method) to handle the sending of > messages. > - Make the mda code handle the exit code in accordance with > <sysexits.h>. > - Make the mda code work in multidrop mode. > - Make the parser accept options per sink. > - Make all sink options (like esmtpname) per sink. > - Make FALLBACK_MDA work. > > Potential issues involved: > - Cross platform: > * Does <sysexits.h> exists on all platforms? Ah well... it's mail system specific, originated AFAICS in BSD4.3 and was also present in System V. It should therefore be fairly portable, but we might want to peek at Postfix's source code to see if sysexits.h specific workarounds are there. > * Do all platforms have at least EX_OK, EX__BASE, EX__MAX? > * Do all platforms have the common exit codes that need to be > handled specially (like EX_NOUSER)? > - How to specify options per smtphost? Well, a configuration system with inheritance was already suggested, but would be a somewhat larger change, too. > - Any other issues? How to bounce (or what is other good non-bounce behavior) in MDA mode? > Any comments on this? -- Matthias Andree |