% tools for virtual domains % David Parsons % Wed Jan 16 01:22:28 PST 2008 #Virtual domain tools These tools were written when I was using [sendmail](http://www.sendmail.org) to try and deliver mail to virtual domains. Sendmail [is now history](/~orc/Code/postoffice), but some of these tools remain useful anyway. The virtual domains used by these tools (and by [[postoffice](/~orc/Code/postoffice)](class:caps)) are the same sort that [vm-pop3d](http://www.reedmedia.net/software/virtualmail-pop3d/) uses; mailboxes go into `/var/spool/virtual/`_domain_`/user`; the password file is `/etc/virtual/`_domain_`/passwd`, and the aliases file is `/etc/virtual/`_domain_`/aliases`. All the active domains are listed in `/etc/domains.cf`, in the form `domain-owner-login:domain-name[:active flag]`. When a domain owner logs in, they can change accounts and aliases by simply invoking `vpasswd` and `valias`; those programs will look into `/etc/domains.cf` to find the correct domain to manipulate. To build `vpasswd`, do ./configure.sh make make install The usual crop of [configure](/~orc/Code/configure) options are available, plus a few `vpasswd` specific-ones: 1. **`--newaliases`** tells `valias` the path to the `newaliases` program so it can run it after changing a valias record. 2. **`--vuser`** is the user who manages the virtual hosts. This needs to be the user you configured to be the owner of your vpopd and [Postoffice](class:caps) installations. You may specify the vuser as a user name, a username, a period, and a group name, a userid, or a userid , a period, and a group id (default: `mail`) 3. **`--vhost`** defines where the vhost configuration, password, and alias files live. 4. **`--vspool`** is where vhost mail is stored (default: **`$spooldir`**`/virtual`) ##Source Code =[vpasswd 0.3](vpasswd-0.3.tar.gz)= Vpasswd is not a very fast moving target, nor is it very popular; when I wrote it, it built on SLS Linux, [Mastodon](/~mastodon) Linux, and FreeBSD. But, apparently, nobody ever tested it except me, and a large pile of single-machine dependencies never got weeded out. Version 0.3 attempts to correct those features. =[vpasswd 0.2](vpasswd-0.2.tar.gz)= These tools don't move very much; they do only a very few things, and thus they don't need many revisions. vpasswd went up to version 0.2, then simply stalled for lack of bugs or new features. =[post 1](post-1.tar.gz)= Post was officially dead and forgotten, or so I thought. But in February 2008, after post had been left lying untouched for five years, I received patches from [Stas Degteff]() that added manual pages plus tweaks to the code so it compiles on modern super-picky systems. And that calls for a new release of the zombie code, which I'm codenaming "130 fortnights later" but I'm releasing as version 1. =[post (no version number)](post-0.tar.gz)= The oldest source is in [post.tar.gz](http:post-0.tar.gz) (no version number, configure script, or anything. These are not as heavily used as [[postoffice](/~orc/Code/postoffice)](class:caps) so I've not yet cleaned them up or documented them.) The post tarball contains * `post.m4` -- A `sendmail` mailer to use in your `sendmail.cf`. * `post.c` -- The virtual domain mailbox delivery agent. It has limited support for aliases (it will alias one local name to another, but it will not forward mail to a different domain) and it knows about ... * `vpasswd.c` -- the program that actually adds, lists, and changes the password for users in a virtual domain. When invoked as `valias`, it manipulates the alias file for that virtual domain.