File not relevant anymore.
Showing
1 changed file
with
0 additions
and
71 deletions
doc/Readme.mysql
deleted
100644 → 0
1 | Author: Jim Hull (8-24-2001) | ||
2 | imaginos@imaginos.net | ||
3 | |||
4 | Mysql support for mailutils .... | ||
5 | |||
6 | This addition to mailutils allows you to have complete email support | ||
7 | without actually having the users on the systems. This would allow you to | ||
8 | have complete web based account management for users while still | ||
9 | maintaining system security as the users can not access the box directly. | ||
10 | The setup is designed to work with the same table definitions as ProFtpd | ||
11 | thus granting you the ability to grant complete web/ftp/email based system | ||
12 | all authenticated by a database running in mysql. A current running system | ||
13 | for this exists at http://www.linuxrocket.net/freeweb.cgi. | ||
14 | |||
15 | |||
16 | Setup: | ||
17 | |||
18 | Mysql: | ||
19 | create database mail; | ||
20 | grant all privileges on mail.* to user@localhost identified by | ||
21 | 'foobar'; | ||
22 | |||
23 | create table users (username VARCHAR(20) UNIQUE NOT NULL, | ||
24 | uid INT(5) NOT NULL DEFAULT 99, | ||
25 | gid INT(5) NOT NULL DEFAULT 99, | ||
26 | password VARCHAR(15) NOT NULL, | ||
27 | homedir VARCHAR(128) NOT NULL, | ||
28 | shell VARCHAR(64) NOT NULL, | ||
29 | comment TEXT); | ||
30 | |||
31 | |||
32 | When you are done, it should look like .... | ||
33 | |||
34 | +----------+--------------+------+-----+---------+-------+ | ||
35 | | Field | Type | Null | Key | Default | Extra | | ||
36 | +----------+--------------+------+-----+---------+-------+ | ||
37 | | username | varchar(20) | | PRI | | | | ||
38 | | uid | int(5) | | | 99 | | | ||
39 | | gid | int(5) | | | 99 | | | ||
40 | | password | varchar(15) | | | | | | ||
41 | | homedir | varchar(128) | | | | | | ||
42 | | shell | varchar(64) | | | | | | ||
43 | | comment | text | YES | | NULL | | | ||
44 | +----------+--------------+------+-----+---------+-------+ | ||
45 | |||
46 | System Setup: | ||
47 | |||
48 | After modifying MySql/MySql.h with your appropriate defines, compile and | ||
49 | install. | ||
50 | |||
51 | Add a user with no possibility of a pass, with its own gid, shell should | ||
52 | be /bin/false and dir should be /dev/null. Something like ... | ||
53 | |||
54 | monly:x:3002:805:Mail Only:/dev/null:/bin/false | ||
55 | monly:x:805: | ||
56 | |||
57 | When you enter new users into your table, you want to be sure they all | ||
58 | have the same uid/gid in the table as that one user on the system. If you | ||
59 | use the mailer thats in examples/mail.MysqlMailer.c then you will be all | ||
60 | ready to go. It explains in the source for its setup and installation. | ||
61 | |||
62 | an example entry would be ... | ||
63 | +----------+------+------+---------------+-------------------------+------------+----------+ | ||
64 | | username | uid | gid | password | homedir | shell | comment | | ||
65 | +----------+------+------+---------------+-------------------------+------------+----------+ | ||
66 | | foobar | 3002 | 805 | JahUAjwjhAJha | /home/foobar | /bin/false | F. Bar | | ||
67 | +----------+------+------+---------------+-------------------------+------------+----------+ | ||
68 | |||
69 | 1) make sure /var/spool/foobar is uid '3002', gid 'mail' and 0660 | ||
70 | 2) make sure /home/foobar is uid '3002', gid '805' so when you set up | ||
71 | proftpd it works in unison |
-
Please register or sign in to post a comment