Author Topic: qmailadmin plugins?  (Read 6732 times)

Offline techdesign

  • Newbie
  • *
  • Posts: 5
qmailadmin plugins?
« on: November 12, 2010, 06:39:20 PM »
I recently moved from Squirrelmail to Roundcube on my qmail box. I am using vpopmail to manage virtual users, and qmailadmin to provide a web front end to manage those users.

Not sure how many of you are familiar with this set up, but I have seen lots of requests for qmail-based roundcube plugins, but not much seems to be happening along these lines. I was just wondering if it is too complex, or if the base of users with this setup is just too small? I do know there is a password plugin, and I am using that plugin successfully, but I'd really like to find a vacation/forwarder plugin.

Not being a programmer, from what I can tell qmail/vpopmail manages vacation and forwarding functions by modifying files on the filesystem. vpopmail creates a folder structure for the virtual users and domains similar to:

/home/vpopmail/domains/domainone.com/user1
/home/vpopmail/domains/domaintwo.com/user2

and so on. In order to set up a forward or vacation message, a .qmail (dot-qmail) file is created in that user folder with instructions that the qmail daemons use to determine what to do with messages. For instance, if you want to forward your messages, your .qmail file would contain:

&forward@to.me

Similarly, vacation messages (in the vpopmail setup) rely on an executable called autorespond that the messages are piped to. This pipe is again set up in the .qmail file. Additionally, the actual vacation response gets saved as a text file in a vacation folder inside the user folder:

/home/vpopmail/domains/domainone.com/user1/vacation/message

the pipe in the .qmail file resembles:

| /usr/bin/autorespond 86400 3 /home/vpopmail/domains/domainone.com/user1/vacation/message /home/vpopmail/domains/domainone.com/user1/vacation

All of this is handled by qmailadmin as a CGI application written in C. Now from a theoretical perspective it doesn't seem like this would be too hard for a plugin to handle as long as a few things are predefined (paths, etc). It would simply need to read the .qmail file, the contents of a vacation message file if it exists, etc, to get the current status of vacation and forwards, present the info to you in a tab in roundcube, then make the appropriate file changes to update according to your selections.

Again, while this doesn't seem theoretically difficult, and I can come up with pseudo code all day, I'm not a programmer. I have no idea if roundcube can modify these files, or if any of this is possible.

So I thought I'd present this and see if it can be done in the first place? I've looked at the current vacation plugin, and while it seems sort of similar, I'm not sure if it could just be tweaked to handle this or not.
« Last Edit: November 12, 2010, 06:43:18 PM by techdesign »