From: Jamie C. <jca...@we...> - 2007-10-11 04:34:35
|
On 10/Oct/2007 15:43 John Gray wrote .. > I just started using virtualmin, for the most part I really like it. I > particularly like the plugin support. I was able to write a plugin for > a few misc things we need when a virtual server is created quite easily. > (I'd post it, but I doubt its useful to anybody but me). Hi John, I'm glad to hear that someone else has used the plugin API successfully .. hopefully it wasn't too baroque. I write a few plugins myself, but the real test of an API is how easy it is for others to use :) > One of the issues I ran into is that we use exim. Truth by told I don't > really need virtualmin to do much here, but manage some alias file > entries. But I had to hack into things to get that going. I hacked the > create_virtuser and its associates to call down the plugins so they > could manage my exim aliases entries. That worked quite nicely. Fairly > minimum changes to the virtualmin code, but it got the info I needed > down to my own code. (btw, virtualmin believes I'm running postfix). The way the code is structured currently, the only way to implement exim support would be in the core of Virtualmin - plugins cannot yet add supported mailservers, as the code for handing email aliases and virtual domains is scattered throughout the core. I wouldn't be too hard to add exim support though - all the code that deals with the mail server is in virtual-server-lib-funcs.pl and feature-mail.pl . If you look for all references to $config{'mail_system'}, you can see the if statements that trigger different behaviour based on whether the system is running Sendmail, Postfix or Qmail. > This all got me thinking about cleaner ways to handle the mail server > support. Something like the plugin model, where support for different > smtp servers is done with a plugin per smtp server (or several in the > case of qmail). Obviously a particular install would only want to use > one plugin for that matches its mail server. This would have a couple > of nice upsides. One the code would be cleaner (each module would only > have code for one smtp model). And it makes it easier to add smtp > servers (in my case a highly non-standard exim configuration). Is the > mail server support just to woven in to easily pull this off? That would be the ideal architecture, but it would be hard to implement as Virtualmin stands now.. too much code would have to change. > Is there any plans for anything like this? I sincerely doubt the I'm the > first to think of it. > > Any plans to support exim? I suppose one stumbling block is defining > exactly what a standard exim config is? It's been discussed, but I haven't done any work on it yet. I would certainly welcome a patch to add Exim support though.. - Jamie |