]>
Commit | Line | Data |
---|---|---|
4bef92ba AF |
1 | NEW CYRUS IMAP PACKAGE |
2 | ====================== | |
3 | ||
4 | This package automatically installs an appropriate sendmail.cf which | |
5 | provides for local delivery to the cyrus imap system. The old sendmail.cf is | |
6 | saved in /etc/mail/sendmail-pre-cyrus.cf. | |
7 | ||
8 | Support for procmail delivery is still available due to an installation | |
9 | based on ideas found here: | |
10 | http://www.ncworldmag.com/ncw-05-1998/ncw-05-imap.html. | |
11 | ||
12 | The installed sendmail.cf is based on the mc file found in | |
13 | /usr/lib/sendmail-cf/cf/redhat-procmail+cyrus.mc (which is now very similar | |
14 | to the default redhat.mc which comes with RH5.2) | |
15 | ||
16 | To give a short outline of the process: sendmail delivers local mail through | |
17 | procmail just as with the standard RedHat setup (i.e. procmail is installed | |
18 | as the local MDA). Contrary to the standard installation, procmail is given | |
19 | a receipt directing mail though the cyrus delivery. Thus, messages end up | |
20 | in the cyrus system. | |
21 | ||
22 | The cyrus 'deliver' program is not executable by normal users, for security | |
23 | reasons. This package installs a 'deliver-wrapper' which is world executable | |
24 | and only provides (hopefully) secure parameters to 'deliver'. This means | |
25 | that delivery can be done from with a user's own .procmailrc without giving | |
26 | them special privileges. | |
27 | ||
28 | If you want to roll your own sendmail.cf which invokes 'deliver' directly, | |
29 | here are the instructions. | |
30 | ||
31 | ||
32 | CONFIGURING SENDMAIL FOR CYRUS | |
33 | ============================== | |
34 | ||
35 | You have two options: | |
36 | ||
37 | (1) As a full replacement for your local mail system; in this case you will | |
38 | no longer be able to use elm, pine etc. unless you configure them for IMAP, | |
39 | because no mail will be delivered to /var/spool/mail/<user> | |
40 | ||
41 | define(`CYRUS_MAILER_FLAGS',`A5@S') | |
42 | define(`confLOCAL_MAILER',`cyrus') | |
43 | mailer(cyrus) | |
44 | ||
45 | LOCAL_RULE_0 | |
46 | Rbb + $+ < @ $=w . > $#cyrusbb $: $1 | |
47 | ||
48 | [This last rule allows bb+mailbox@yourdomain to deliver to the named global | |
49 | mailbox; bb refers to 'bulletin board'] | |
50 | ||
51 | Remove FEATURE(local_procmail) if it exists, or comment it out by putting | |
52 | 'dnl' at the beginning of the line. | |
53 | ||
54 | (2) As an additional domain, e.g. so that user@imap.your.domain is delivered | |
55 | into the cyrus mail area. | |
56 | ||
57 | Create a mailertable (if you don't already have one) in /etc/mailertable, | |
58 | containing the following line: | |
59 | ||
60 | imap.your.domain cyrus:inbox | |
61 | ||
62 | Then build it like this: | |
63 | ||
64 | makemap hash /etc/mailertable </etc/mailertable | |
65 | ||
66 | Your m4 config file needs to contain the following: | |
67 | ||
68 | FEATURE(mailertable) | |
69 | define(`CYRUS_MAILER_FLAGS',`S') | |
70 | mailer(cyrus) | |
71 | ||
72 | Finally, point an MX record for imap.your.domain pointing to your machine. | |
73 | Note that users in this domain still need to have entries in /etc/passwd, | |
74 | otherwise there would be no passwords to authenticate against when reading | |
75 | their mail. This limitation will go when someone integrates PAM support into | |
76 | Cyrus, or you can try authenticating against an LDAP server; see | |
77 | http://www.linc-dev.com/auth.html | |
78 | ||
79 | CREATING MAILBOXES | |
80 | ================== | |
81 | ||
82 | Add the usernames of the administrator user(s) to /etc/imapd.conf, separated | |
83 | with spaces, e.g. | |
84 | ||
85 | admins: curtj abell | |
86 | ||
87 | Then start the cyradm tool: | |
88 | ||
89 | # cyradm localhost | |
90 | ||
91 | Login using the username and password of one of the admin users. Type 'help' | |
92 | for a list of commands. | |
93 | ||
94 | To create a mailbox, type: | |
95 | ||
96 | cm user.<userid> | |
97 | ||
98 | For example, to create a mailbox for the userid "smith", type: | |
99 | ||
100 | cm user.smith | |
101 | ||
102 | To limit "smith" to 10,000 kilobytes of mail, type: | |
103 | ||
104 | setquota user.smith 10000 | |
105 | ||
106 | Once the inbox is created, users can create their own additional | |
107 | mailboxes from a mail program. If Smith created a work mailbox and a | |
108 | play mailbox, the full names of the mailboxes would be: | |
109 | ||
110 | user.smith.work | |
111 | user.smith.play | |
112 | ||
113 | Access rights are discussed in detail in the cyradm(1) man pages. Note | |
114 | that the administrator must grant herself delete access explicitly | |
115 | before she can delete a mailbox: | |
116 | ||
117 | setaclmailbox <mail_box> <admin_userid> d | |
118 | deletemailbox <mail_box> | |
119 | ||
120 | Once you have created mailboxes, your IMAP server installation is done. | |
121 | ||
122 | CONFIGURING FOR ACCESS TO A NEWS SPOOL | |
123 | ====================================== | |
124 | ||
125 | See doc/install for details; I've not tried this myself | |
126 | ||
127 | COMMON PROBLEMS | |
128 | =============== | |
129 | ||
130 | There is a known problem with syslogging error messages about being unable | |
131 | to create deliverdb messages. You can remove /var/imap/deliverdb/, however | |
132 | that will then give you errors saying that this directory does not exist :-) | |
133 | ||
134 | This database is an optimisation which prevents duplicate copies of messages | |
135 | (with the same Message-ID) being delivered into mailboxes. This feature can | |
136 | be disabled by removing the '-e' flag from deliver: | |
137 | ||
138 | define(`CYRUS_MAILER_ARGS', `deliver -m $h -- $u') | |
139 | define(`CYRUS_BB_MAILER_ARGS', `deliver -m $u') |