Hello,
Am Mittwoch, 24. November 2010 schrieb Juan Carlos Gutiérrez Deliot:
> I'm willing, for personal porpouse, to develop some new feature in
> postfixadmin, it's about exposing mailbox creation and password
> changing functionalities through web services in order to integrate
> a mail server with a portal.
Changing the password, the alias of a mailbox and switching vacaton
on/off is already available via XMLRPC (but disabled by default in the
config).
Mailbox creation over XMLRPC sounds like a good feature.
You should base your work on the files in the postfixadmin-cli directory
(that's a quite new command-line interface for postfixadmin), especially
on the model/* files. (Well, they should be merged with the "main"
model/* files, but that's another story ;-)
postfixadmin-cli/model/UserHandler.php already contains functions to
create a mailbox. Your task will be to
a) implement admin login over XMLRPC (using a mailbox login is pointless
when it comes to creating mailboxes ;-)
b) integrate the mailbox creation in the XMLRPC interface
c) make sure that you don't create any security holes ;-)
If you need some inspiration how to use the XMLRPC interface, check the
squirrelmail plugin in the ADDITIONS directory.
> I downloaded the SVN version and got it ready to start developing in
> an IDE, eclipse for PHP developers (not connected to the official
> repository but my own one), but i don't know how to package the
> project in tarball (tar.gz) format in order to make a clean
> installation.
Just take the SVN checkout (or your edited version of it) and make a
tarball from it with tar czf.
In theory you could exclude the .svn directories from the tarball, but
in practise they won't hurt except taking some disk space ;-)
> Also I wanted to ask if it's better to install a
> stable postfixadmin release and the upgrade it with the new features
> added by me (I don't even know how to do this).
No, please take the SVN trunk as base. There have been lots of changes
(most important: Smarty templates) so that it would mean lots of work if
you base your changes on the 2.3.2 release and later want to integrate
them in the SVN version.
BTW: Please keep the .svn directories in your development directory -
they give you several advantages:
- you can run "svn up" to integrate changes done in the Postfixadmin SVN
in your codebase. This will work automatically as long as you don't
edit the same line of code as we do.
- you can run "svn diff" to create a patch against "our" code. This will
make integration in the official code easier.
Both are things that you don't want to do without the help of SVN ;-)
> Finally, if you think eclipse is not the right tool to work with
> postfixadmin, I hope you can introduce me to "the official"
> alternatives to work with.
David and I use vi, but I wouldn't go as far as calling it the "Official
PostfixAdmin source code editor" ;-)
Seriously: take any editor or IDE you want and like.
We don't have something like coding guidelines, and for historical
reasons we even have some files with 3 and some with 4 spaces as tab
replacement. (New files should use 4 spaces.)
However there is a very important thing: If you need to copy more than 5
lines of code from an existing file, please consider to put it into
functions.inc.php as a function, and replace it with a function call at
the original place. If you copy more than 20 lines, this is no longer
optional ;-)
This might sound a bit strict, but I have some experience from merging
copies of similar code. I started this merging when David and I took
over the postfixadmin project - for some functions like "edit an alias"
there were 4 copies of the code for the same job, with different bugs in
each copy :-/ In the meantime I have removed/merged lots of the
duplicates, but it's an ongoing job and still not fully done. For
example "create $whatever" and "edit $whatever" have many things in
common, the most visible difference is INSERT vs. UPDATE.
In short: I don't want to have even more code to compare and merge ;-))
> I hope you people can guide me through this, maybe with tutorials or
> even by personal contact.
Personal contact as in "face to face meeting" might become difficult due
to long distances - your name doesn't sound german ;-)
> I didn't even know to ask for this in the
> postfixadmin-devel mailing list or the svn mailing list, I just
> decided to start here and wait for some enlightment from you.
This mailinglist is the correct place.
The -svn list is read-only to distribute SVN commit messages and diffs.
Additionally you can join the #postfixadmin channel on the freenode IRC
network. I'm usually available there in the evening (as seen from CET
timezone), and David (nick "GingerDog") is there all the day. Be
"warned" that you won't get an answer within one or two minutes - there
are not too many people in the channel, and some of them (including
David) are there 24/7, but obviously not always awake ;-)
> I hope I can share this feature with you when it's done and I'm open
> for any suggestions you might have.
Yes, this sounds like a good feature, and I'm quite sure we'll integrate
it in postfixadmin when you have it working.
Regards,
Christian Boltz
--
(1) ZACKBOING: Geräusch von Stirn auf Monitor-Glasscheibe(2), direkte
Folge von Biosupgrades, selbst kompilierten Kerneln oder dem versehent-
lichen Löschen von 30 Gigabyte Pornofilmen bei einem MySQL-Upgrade.
(2) Deswegen kauft man heute oft Flachbildschirme. Die sind weicher.
[Ratti in suse-linux]
|