masqmail

view docs/old-manual/install.html @ 181:8b17ea9fd17b

added comments on how to compile with glib-1.2
author meillo@marmaro.de
date Wed, 14 Jul 2010 17:37:36 +0200
parents
children
line source
9 <HTML>
10 <HEAD>
11 <TITLE>MasqMail - Manual
12 </TITLE>
13 </HEAD>
14 <BODY TEXT="#000000" LINK="#0000ff" BGCOLOR="#ffffff">
16 <center>
17 <table width="80%">
18 <tr><td>
19 <table width="100%" bgcolor="#0000aa" cellspacing=0 cellpadding=0>
20 <tr>
21 <td>
22 <a href="manual.html">
23 <img width="20" src = "../images/u_arrow.gif" alt = "manual">
24 </a>
25 </td>
26 <td align=center width="100%"><font size="6" color = "#ffffff">Installation</font></td>
27 <td>
28 <a href="./options.html">
29 <img width="20" src = "../images/r_arrow.gif" alt = "Options">
30 </a>
31 </td>
32 </tr>
33 </table>
36 <p>You need a user and a group for masqmail to run, I suggest user
37 'mail' and group 'trusted'. Say:</p>
39 <pre>
40 groupadd -g 42 trusted
41 useradd -u 42 -g 42 -d / -s /bin/sh -c "Mail Transfer Agent" mail
42 </pre>
44 <p>If you use other names than <i>mail</i> and <i>trusted</i> use the options
45 described below for configure. The 42 is just a suggestion, you can
46 use any number you like, but preferably one &lt; 100. It does not have
47 to be the same for the user 'mail' and the group 'trusted'.</p>
49 <p>Compliling is a matter of the usual procedure:</p>
51 In the source directory, after unpacking do:<br>
53 <pre>
54 ./configure
55 make
56 make install
57 </pre>
59 <p>Optionally, after you have called make, you can make some tests in
60 the tests directory. Read the README in that directory for
61 instructions.</p>
63 <h4>Additional options for configure:</h4>
65 <p>
66 <b>--with-user=USER</b> sets the user as which MasqMail will run. Default is
67 <i>mail</i>. USER has to exist before you 'make install'.
68 </p><p>
69 <b>--with-group=GROUP</b> sets the group as which MasqMail will run. Default
70 is <i>trusted</i>. GROUP has to exist before you 'make install'.
71 </p><p>
72 <b>--with-logdir=LOGDIR</b> sets the directory where MasqMail stores its log
73 files. It will be created if it does not exist. Default is /var/masqmail/.
74 </p><p>
75 <b>--with-spooldir=SPOOLDIR</b> sets the directory where MasqMail stores its
76 spool files. It will be created if it does not exist. Default is
77 /var/spool/masqmail/.
78 </p><p>
79 <b>--enable-auth</b> enables ESMTP AUTH support (disabled by default)
80 </p><p>
81 <b>--disable-pop3</b> disables pop3 support (enabled by default)
82 </p>
84 <h4>After make install</h4>
86 <p>
87 You can also use these instructions to omit 'make install' if you do
88 not want to use it.
89 </p><p>
90 Check that 'make install' worked correctly. The following command:
91 </p><p><pre>
92 ls -ld /usr/sbin/masqmail /var/masqmail/ /var/spool/masqmail /var/spool/masqmail/input
93 </pre></p><p>
94 should give output similar to
95 </p><p>
96 <pre>
97 -rwsr-xr-x 1 root root 86955 Oct 14 14:27 /usr/sbin/masqmail
98 drwxr-xr-x 2 mail trusted 1024 Oct 14 14:29 /var/masqmail/
99 drwxr-xr-x 3 mail trusted 1024 Oct 14 14:27 /var/spool/masqmail
100 drwxr-xr-x 2 mail trusted 1024 Oct 14 18:32 /var/spool/masqmail/input
101 drwxr-xr-x 2 mail trusted 1024 Oct 14 18:32 /var/spool/masqmail/popuidl
102 </pre>
103 </p>
104 <p>
105 (important is the set-user-id bit for /usr/sbin/masqmail and the
106 ownership of all items).
107 </p>
109 <p>Edit the configuration files. You can use the files from the
110 examples directory as a template. Copy masqmail.conf to
111 /etc/maqmail.conf, the others to the location given in
112 masqmail.conf.</p>
114 <p>If you already have an MTA (eg. sendmail) installed, move that to
115 another location:</p>
117 mv /usr/sbin/sendmail /usr/sbin/sendmail.orig<br>
119 <p>Then make a link to the new MTA:</p>
121 <pre>
122 ln -s /usr/sbin/masqmail /usr/sbin/sendmail
123 </pre>
125 <p>Now every mailer that used to call sendmail will now call
126 masqmail. You can now kill your old sendmail if it is running and
127 start masqmail. Usually this is done with the startup scripts. For
128 SuSE this would be (as root):</p>
130 <pre>
131 /sbin/init.d/sendmail stop
132 /sbin/init.d/sendmail start
133 </pre>
135 <p>or shorter:</p>
137 <pre>
138 /sbin/init.d/sendmail restart<br>
139 </pre>
141 <p>You can also start it with:</p>
143 <pre>
144 /usr/sbin/sendmail -bd -q30m<br>
145 </pre>
147 <p>You can also let it be called from inetd (with the -bs option), but
148 this is untested.</p>
150 <h4>Configuring for online delivery</h4>
152 <p>Now you have to set up the online configuration. The trick is to
153 tell your ip-up script the connection name. You could use the IP
154 number of the far side of the ppp link, but this is a pain and may
155 change each time. But you can give it an additional argument via pppd
156 with ipparam. Somewhere in your dial up script you have a line similar
157 to:</p>
159 <pre>
160 /usr/sbin/pppd /dev/ttyS1 connect "/usr/sbin/chat -t 90 -f
161 ${CHATFILE}" -d -d -d user user@somewhere file ${OPTIONS}
162 </pre>
164 <p>Just add 'ipparam FastNet' in the command line for pppd if your ISP
165 has the name FastNet. The ip-up script will then get 'FastNet' as a
166 sixth parameter. In your ip-up script you can then call masqmail with</p>
168 <pre>
169 /usr/sbin/masqmail -qo $6
170 </pre>
172 <p>instead of 'sendmail -q', if you had that in the script
173 before. Masqmail will then read the route configuration specified for
174 the connection name 'FastNet' and deliver the mail destined to the
175 internet. See the <a href="config.html">configuration manual</a> on how
176 to write a route configuration or use one of the examples as a
177 template. <em>I do not know how do configure that for an ISDN adapter,
178 but I am sure you will find something similar in the man
179 pages.</em></p>
181 <p>If you want mail that is received by masqmail from your local
182 net to be delivered immediately using the route configuration, you
183 have two possibilities:<p>
185 <p>
186 <ul>
188 <li>if you are using the masqdialer system, you just have to set the
189 variables <b>online_detect</b> to <i>mserver</i> and
190 <b>mserver_iface</b> to the interface mserver is listening to.</li>
192 <li>otherwise you have to add two commands in your ip-up script:<br>
193 echo -n $6 &gt; /tmp/connect_route<br> chmod 644 /tmp/connect_route<br>
194 and you have to remove the file <i>/tmp/connect_route</i> in your
195 ip-down script:<br> rm /tmp/connect_route.<br> Then you have to set
196 <b>online_detect</b> to <i>file</i> and <b>online_file</b> to
197 <i>/tmp/connect_route</i>. </li>
199 </ul>
200 </p>
202 <p>See the route documentation for more.</p>
203 </td></tr>
205 <tr><td>
206 <p>
207 <hr>
208 <address><a href = "mailto:kurth@innominate.de">Oliver Kurth</a></address>
209 Last modified: Tue May 30 15:19:56 CEST 2000
210 <br>
211 This page was created using <a href="http://www.freddyfrog.com/hacks/genpage/">Genpage</a> - Version: 1.0.6
212 </p>
214 </table>
215 </center>
217 </BODY>
218 </HEAD>