]> git.donarmstrong.com Git - debbugs.git/blob - debian/README.mail
[project @ 2000-03-22 22:36:12 by gecko]
[debbugs.git] / debian / README.mail
1 ===============
2
3 Config
4 ------
5 Be sure to set the $gMailer variable correctly in /etc/debbugs/config.  The
6 options are (all lower case) exim, qmail and sendmail.
7
8 Exim
9 ----
10 I've seen two lines in Exim used.  If the machine is dedicated and all
11 email goes to the debbugs script:
12 (in the transport section)
13 debbugs_pipe:
14   driver = pipe
15   user={some UID root is very unsafe and unsecure here}
16   group={some GID either uid or gid needs write access}
17   command = /usr/lib/debbugs/receive
18   return_output
19
20 (and AT THE TOP of the directors)
21 debbugs:
22   driver = smartuser
23   transport = debbugs_pipe
24
25 If the domain is a virtual host on a machine that needs it, there are many
26 ways of handling it.  I think the neatest was:
27
28 debbugs:
29   driver = aliasfile
30   domains={domain name eg: bugs.debian.org}
31   file=/usr/lib/debbugs/receive
32   user={some UID}
33   group={some GID}
34   current_directory=/var/lib/debbugs/spool
35   home_directory=/var/lib/debbugs/spool
36
37 Qmail
38 -----
39         
40 Here's my (tv@debian.org) suggestion for safe & secure
41 installation under qmail:
42         
43 Create a separate user for the debbugs system.
44         # adduser --system --group --home /home/misc/debbugs debbugs
45 Give control of a virtual domain to that user
46         # echo bugs.example.com:debbugs >>/etc/qmail/virtualdomains
47 Give the user access to the bug databases
48         # chown -R debbugs:debbugs /var/lib/debbugs/*
49 Set the BTS owner address
50         # echo 'me@my.example.com' >~debbugs/.qmail-owner
51 Make the BTS handle it's mail
52         # echo '|/usr/lib/debbugs/receive' >~debbugs/.qmail-default
53 Reload the virtualdomains config file
54         # /etc/init.d/qmail reload
55 That's it!
56         
57 Sendmail
58 --------
59 From Wichert Akkerman (wakkerma@debian.org):
60
61 First of all make sure that debbugs is configured for sendmail: look
62 at /etc/debbugs/config for the $gMailer variable and make sure it is
63 set to 'sendmail'.
64
65 Next make sure that your DNS is configured properly. For sendmail
66 this means you cannot use a CNAME for the debbugs-domain, since that
67 gets remapped to the canonical name and thus bypasses the mailertable
68 we need. This is an example of a working DNS entry:
69
70         bugs            IN      192.168.2.100
71                                 0 MX mailgate.mors.net
72                                 HINFO "PC Pentium" "Debbugs 2.0"
73
74 Now that that is finished it is time to configure sendmail itself. First
75 make sure that sendmail does not consider the debbugs-domain as local by
76 making sure it is not listed in /etc/mail/sendmail.cw . Now start your
77 favourite editor and load /etc/mail/sendmail.mc . We need to make two
78 changes
79 there: add a mailertable and define the debbugs delivery agent.  The
80 mailertable is needed to tell sendmail to use the debbugs to deliver mail
81 destined for your debbugs server.
82
83 To enable the mailertable put the following line in your sendmail.mc file:
84
85         FEATURE(mailertable, `text -o /etc/mail/mailertable')dnl
86
87 This tells sendmail to use the textfile /etc/mail/mailertable as the
88 database containing the table. You can also use a db database if you
89 want to add a lot of entries in there since that is faster. If you
90 want to do that use the following line instead:
91
92         FEATURE(mailertable, `hash -o /etc/mail/mailertable.db')dnl
93
94 You can create the database using the following command:
95
96         makemap hash mailertable.db < mailertable
97
98 Where mailertable is the textfile containing the data.
99
100 The next thing we need to do is tell sendmail about the debbugs delivery
101 agent. To do this add the following two lines to your sendmail.mc file,
102 preferably just after the MAILER commands:
103
104 Mdebbugs,       P=/usr/lib/debbugs/receive, F=SDFMlhudb80, U=<uid>:<gid>,
105                 S=10/30, R=20/30, D=/tmp, T=DNS/RFC822/X-Unix, A=receive $u
106
107 Where <uid> and <gid> should be replaced with the user and group you
108 use for debbugs.
109
110 Okay, we are now done with sendmail.mc and are ready to add the entry
111 in your mailertable. Save sendmail.mc and load /etc/mail/mailertable in
112 your editor. Put a single line in there just like this one:
113
114         bugs.your.net           debbugs:yournet
115
116 (please note there are tabs between those words). This tells sendmail that
117 mail destined for the host bugs.your.net should be handled by the debbugs
118 delivery agent using yournet as the hostname. If you decided to use a db
119 database instead of the plain textfile don't forget to run makemap now!
120
121 Now the final step: run sendmailconfig to regenerate sendmail.cf and
122 restart sendmail with the new configuration. Your system should now
123 be up and running. Congratulations!
124
125 Postfix
126 --------
127 It seems Bdale isn't around currently, so I'll just mail this
128 here directly. This is a short description of how to get debbugs
129 working with postfix. If someone can verify this and give me some
130 feedback if would be appreciated.
131
132 Lets assume that you are going to install bugs.domain.net, and you
133 are going to run it on the machine master.domain.net.
134
135 DNS setup: point the MX to the machine running debbugs:
136
137         bugs.domain.net         MX      50      master.domain.net.
138
139 In /etc/postfix/master.cf enable the transport maps by inserting the
140 following line:
141
142         transport_maps =3D hash:/etc/postfix/transport
143
144 Now create /etc/postfix/transport and insert:
145
146         bugs.domain.net        debbugs:
147
148 This tells postfix to use the debbugs transport agent to deliver any
149 mail send to bugs.domain.net. Now we need to make a database from that
150 that postfix can use:
151
152         # makemap hash transport
153
154 Now we need to teach postfix what the debbugs transport agent is. Edit
155 /etc/postfix/master.cf and add:
156
157         debbugs   unix  -       n       n       -       -       pipe
158                 flags=3DF user=3Ddebbugs argv=3D/usr/lib/debbugs/receive $recipient
159
160 This assumes that you are running debbugs with uid debbugs (the package
161 doesn't do that by default, but I generally chown /var/lib/debbugs/*
162 to a new debbugs account just to be safe).
163
164 Now that all this is done, restart postfix and it should be working..
165
166 Wichert.