[freeside] courier-mta table name?

Kristian Hoffmann khoff at pc-intouch.com
Thu Jul 18 12:25:41 PDT 2002


On 17 Jul 2002, Vlad Sedov wrote:

> this would work, but we have a bunch of users already on the courier
> server.. they're in the following format:
>
> CREATE TABLE passwd (
>   id varchar(128) NOT NULL default '',
>   crypt varchar(128) NOT NULL default '',
>   name varchar(128) NOT NULL default '',
>   uid int(10) unsigned NOT NULL default '570',
>   gid int(10) unsigned NOT NULL default '570',
>   home varchar(255) NOT NULL default '',
>   maildir varchar(255) NOT NULL default '',
>   quota varchar(255) NOT NULL default '',
>   PRIMARY KEY  (id),
>   KEY id (id)
> ) TYPE=MyISAM;

That should be fine.  I didn't need some of the fields so I just included
them in the query as constants.

> and here's what the fields look like:
>
> id = login in the user at domain.com format
> crypt = unix-crypted _password.. this one's easy
> name = gecos, basically
> uid = same for all users, so can be fed from default
> gid = same as uid
> home = /mail/<domain name>
> maildir = "./<username>"
>
> I haven't quite figured out how to extract the user's domain inside of
> the export module.. not that i'm too lazy to RTFM... just kinda new to
> perl :-)

If you have one domain just replace the username with concat(username,
'@domain').  If you have several, you could use concat(user.username, '@',
domain.domain).  You'd need to export your domains as well if you did
that.

> also... is it possible to set the GECOS field automatically from the
> account's first+last name?...

Freeside does that, or at least it used to.  I haven't check in the new
version.

-Kristian




More information about the freeside-users mailing list