e43a041883b1df101eaa07ef8f92bd442ce47740
[citadel.git] / citadel / docs / inetmailsetupmx.txt
1  
2
3
4 Citadel/UX Internet E-mail setup instructions (mx version) 
5
6 This document explains how to set up your citadel as an Internet e-mail
7 capable system using your current MTA (eg, sendmail, qmail, etc) as
8 opposed to using the Citadel/UX built-in servers.
9 Once you are through with this document you should be able to have your
10 users send mail from, and receive mail to
11 username@bbs.bbsname.citadel.org. This version of the mailsetup document
12 only pertains if you want to have local e-mail as WELL as BBS e-mail. If 
13 you want ONLY your BBS users to be able to receive Internet e-mail check
14 out mailsetup.html. 
15
16 Note: These instructions were created using Sendmail 8.9.3. Earlier
17 versions in the 8.8/8.9 line should still work, but prior to 8.8 this is
18 not going to work. If you're using postfix or some aother mail server
19 you're pretty much on your own, but please mail Patriot @pixel, or
20 smw@pixel.citadel.org and let me know your configurations so I can add
21 them to this document.
22
23
24   1.Set up an MX record for your site. 
25      Probably the most important step is this first one. This will ONLY
26      work if your internet coordinator (Freakdog @dogpound2,
27      mburger@compucomis.net if you're in the citadel.org domain) sets up
28      an MX record for your site. Or, if you have your own domain, set up
29      an MX record to point to your site. For purposes of examples I'm
30      going to use pixel (my BBS) to  show the setups. Pixel is set up as
31      pixel.citadel.org. Here's what the MX record should like
32      like in DNS on a machine in the citadel.org domain: 
33
34               bbs.pixel       IN      MX      10 pixel
35
36
37      This sets up an MX (mail exchange) id for your host and says that
38      incoming mail for  bbs.pixel.citadel.org is accepted by
39      pixel.citadel.org. Once this is set up, you should be
40      able to verify it with nslookup. Check out the nslookup session I ran
41      for Pixel, below: 
42
43      smw @ pixel % nslookup
44      Default Server:  ns1.dca.net
45      Address:  204.183.80.2
46
47      > set type=mx
48      > bbs.pixel.citadel.org
49      Server:  ns1.dca.net
50      Address:  204.183.80.2
51
52      bbs.pixel.citadel.org   preference = 10, mail exchanger = pixel.citadel.org
53      citadel.org     nameserver = linux.compucomis.net
54      citadel.org     nameserver = linux2.compucomis.net
55      citadel.org     nameserver = uncnsrd.mt-kisco.ny.us
56      citadel.org     nameserver = mansrv.manhasset.techsoftwareinc.com
57      pixel.citadel.org       internet address = 207.245.90.41
58      linux.compucomis.net    internet address = 207.8.143.10
59      linux2.compucomis.net   internet address = 207.8.143.13
60      uncnsrd.mt-kisco.ny.us  internet address = 168.100.205.221
61      >
62
63      As you can see pixel.citadel.org is listed as a mail exchanger for
64      bbs.pixel.citadel.org. Since you can see that with nslookup the
65      changes are out there and you're ready to get started. 
66
67   2.Set up sendmail 
68      
69      Sendmail has 'mailertable' functionality. If you already are running
70      sendmail with mailertable you can pretty much skip this step. If not,
71      read on:
72      
73        Locate the mailertable entry in /etc/sendmail.cf. (Kmailertable hash -o
74        /etc/mail/mailertable.db) and uncomment it. 
75        Search for the word 'mailertable again'. You should eventually
76        find an entry similar to this:
77
78
79       # not local -- try mailer table lookup
80       R$* <@ $+ > $*          $: < $2 > $1 < @ $2 > $3        extract host name
81       R< $+ . > $*            $: < $1 > $2                    strip trailing dot
82       R< $+ > $*              $: < $(mailertable $1 $) > $2   lookup
83       R< $~[ : $* > $*        $>95 < $1 : $2 > $3             check -- resolved?
84       R< $+ > $*              $: $>90 <$1> $2                 try domain
85
86           This entry should look similar to yours, and should NOT be
87           commented out. Be sure that it's uncommented.
88           Add the entry for citadel to be a local mailer:
89           Search for Mlocal, in sendmail.cf. Add the following after the
90           Mprog section:
91
92
93   Mcitadel,       P=/usr/local/citadel/citmail, F=lsDFMoqeu9S, S=10/30, R=20/40,
94                   D=$z:/, T=X-Unix, U=bbs,
95                   A=/usr/local/citadel/citmail $u
96
97
98          Notice /usr/local/citadel is the path to Pixel's citadel home
99          directory. Replace this witha your citadel's home dir.
100
101          Set up the mailertable itself: In the Kmailertable line above
102          there was a path to your
103          mailertable. In this case it's /etc/mail/mailertable.db. For
104          this example that's the file we'll use. cd /etc/mail and edit
105          mailertable. (don't worry if there's no file there called
106          mailertable. Simply create a new one.) This is the mailertable
107          for pixel:
108
109
110                        bbs.pixel.citadel.org      citadel:localhost       
111
112
113           Please note that the whitespaces are tabs. You need one after
114           bbs.mysite.org and citadel:localhost.
115           Compile the mailertable.
116           makemap -v hash mailertable.db < mailertable
117           That line simply makes a readable hashed database that sendmail
118           can read out of the mailertable entry you created. For the
119           entry above this should look similar to this:
120
121           key='bbs.pixel.citadel.org', val='citadel:localhost'
122           
123           Restart sendmail. If you're running later releases of Red Hat
124           Linux (for example) you can just do: /etc/rc.d/init.d/sendmail
125           restart. For others use the kill/restart method that  works best
126           for you.
127
128   3. In your bbs now, do a .as and change your FQDN to reflect your new MX
129      record. You should NOT have to restart citadel:
130
131                      Lobby> . Aide System configuration
132                      Node name [pixel]:
133                      Fully qualified domain name [bbs.pixel.citadel.org]:
134
135
136
137 A few notes: 
138
139      Mail sent from the BBS to an internet e-mail address should go out
140 immediately. E-mail coming IN to a bbs user will not process until your
141 next netproc session.  On my site I had to set up a relay for
142 bbs.pixel.citadel.org. In later versions of sendmail relaying is turned
143 off by default. Check sendmail.cf for the following line:
144
145      FR-o /etc/mail/relay-domains
146
147 If that line is commented out you're allowing relaying from any host. 
148 Not recommended. I won't tell you how to run your sendmail but it's 
149 usually better NOT to relay. If that line is commented out, no problems
150 (aside from the obvious spam issues with relaying for the entire
151 planet.:). If it isn't commented out udpdate/create the file
152
153  /etc/mail/relay-domains 
154
155 and put your new entry in it. For pixel this is: bbs.pixel.citadel.org. 
156
157
158
159 Please contact me with questions/problems or just to let me know it's up
160 and running. I'd be interested in hearing from folks. smw@pixel.citadel.org