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