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