[freeside] RE: vpopmail WAS: ICradius

ivan ivan at 420.am
Mon Jun 19 05:55:26 PDT 2000


On Fri, Jun 16, 2000 at 09:37:31AM -0500, Kenny Elliott wrote:
> > >
> > > I'm now working on getting vpopmail
> > (http://www.inter7.com/vpopmail/)
> > > support into freeside.
> > >
> > > Basically I'm looking at copying and modifying the current
> > > useradd/userdel
> > > functionality to ssh to the vpopmail machine and run
> > > vadduser/vdeluser.
> > >
> > > Unless you have a better suggestion.
> >
> > More important than transactional support (useradd/userdel) is batch
> > export, as in svc_acct.export.
> 
> Yeah I agree but I haven't gotten my head around how the export should
> work yet so I'm just doing what I can and working up to the bigger
> stuff.


> I don't know if you are familiar with vpopmail but just in case here
> is
> a short explanation. It works in conjunction with qmail to allow for
> multiple users and multiple domains all running under one system
> account
> (in my case vpopmail). One nice feature is that it allows you to have
> more than one foo user. i.e. you can have a foo at me.com and a
> foo at you.com
> and have them checked by different users. This is done by having
> people
> put their full email address as their username when they check their
> mail
> via pop. It also supports separate password files or mysql for
> authentication.
> When a user is created a user dir with a maildir (it uses qmail
> preferred maildir
> format for mail boxes instead of mbox) is created in the appropriate
> domain
> directory and the user is added to either the password file for that
> domain
> or the mysql database (whichever you are using).

You probably won't be able to do a correct mapping to this until I've
finished the database changes to support multiple domains and hosts
properly.  Currently usernames cannot be duplicated across domains.

> utilities also exist
> to
> delete a user, create and delete domains, change a users password, and
> send
> to send pop bulletins to all users.
> 
> I know that all this can be easily interfaced with freeside but it is
> beyond
> my perl capabilities at the moment.
> 
> Which brings me to a question. I added in vadduser and vdeluser
> support into
> svc_acct.pm and vadduser works perfectly. However, when I cancel a
> service for
> someone vdeluser and deluser never gets called. Am I overlooking
> something
> obvious? Should I be doing something other than cancel on the service?

What are you doing, exactly?  Calling the cancel method of a FS::svc_acct
object?  Cancelling an unaudited service via the web interface?
Cancelling a package?

Where have you put the commands for vadduser and vdeluser in svc_acct.pm?

> One more thing. :) Considering that you can have more than one foo
> user with email
> accounts in different domains. How would you suggest I go about
> supporting that
> in freeside?

I've done some work here, and Cerkit contributed some ideas against an
earlier version.  I'm pretty sure that what should be done here is:

For multiple domain support:
- Depriciate the "defaultdomain" configuration file.
- Add a field to to the svc_acct table and class that links every
  svc_acct record to to a svc_domain record
- Optionally, do a data conversion to eliminate needless svc_acct_sm
  records.

For proper flexible exporing:
- A new table listing machine names (probably just as a link to a
  svc_domain record for the _fully-qualified_ domain name of the machine) 
- A table linking machine names to one or more domains

This way, for example, you could have two machines, mail.domain.tld and
mail2.domain.tld.  mail and mail2 would both pull unique entries from
svc_acct for their system accounts, and also the same set of user
accounts.

(Duplicate username check gets a little bit more complicated...) 

> If there is anything else you like me to work on just let me know...

If you've got the time, sure!  Have a look at the TODO and feel free to
bring it up before digging into code so you don't get tripped up - for
example, I'm currently rewriting the web interface with propler
templating, so it's probably best to work with that rather than the
current CGIs for any big changes to the web interface.

-- 
meow
_ivan



More information about the freeside-users mailing list