Mercurial > masqmail-0.2
annotate INSTALL @ 190:fbb3417c1a54 default tip
Minor fixes in man pages, reported by lintian(1)
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Mon, 29 Aug 2011 19:22:51 +0200 |
parents | 949ccc02eecf |
children |
rev | line source |
---|---|
59 | 1 Additional information may be available in docs/ or on the website. |
155
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
2 For installing on GNU/Linux distributions read docs/INSTALL.linux. |
59 | 3 |
0 | 4 |
59 | 5 Installation instructions |
6 ------------------------- | |
7 | |
8 To compile masqmail you need glib 1.2 (http://www.gtk.org). | |
0 | 9 |
10 You need a user and a group for masqmail to run, I suggest user | |
11 'mail' and group 'trusted'. Say: | |
12 | |
59 | 13 groupadd -g 42 trusted |
14 useradd -u 42 -g 42 -d / -s /bin/sh -c "Mail Transfer Agent" mail | |
0 | 15 |
16 If you use other names than 'mail' and 'trusted' use the options | |
17 described below for configure. The 42 is just a suggestion, you can | |
18 use any number you like, but preferably one < 100. It does not have | |
19 to be the same for the user 'mail' and the group 'trusted'. | |
20 | |
155
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
21 Compiling is a matter of the usual procedure. In the source directory, |
59 | 22 after unpacking do: |
0 | 23 |
59 | 24 ./configure |
25 make | |
26 make install | |
0 | 27 |
28 | |
29 | |
59 | 30 Additional options for configure |
31 -------------------------------- | |
0 | 32 |
59 | 33 See the output of |
34 | |
35 ./configure -h | |
36 | |
37 Here is additional, but maybe obsolete, explanation: | |
0 | 38 |
39 --with-user=USER sets the user as which MasqMail will run. Default is | |
40 'mail'. USER has to exist before you 'make install'. | |
41 | |
42 --with-group=GROUP sets the group as which MasqMail will run. Default | |
43 is 'trusted'. GROUP has to exist before you 'make install'. | |
44 | |
45 --with-logdir=LOGDIR sets the directory where MasqMail stores its log | |
46 files. It will be created if it does not exist. Default is /var/masqmail/. | |
47 | |
48 --with-spooldir=SPOOLDIR sets the directory where MasqMail stores its | |
49 spool files. It will be created if it does not exist. Default is | |
50 /var/spool/masqmail/. | |
51 | |
52 --with-confdir=CONFDIR sets the default configuration directory to | |
53 CONFDIR, in case you prefer another location than /etc/masqmail/. | |
54 | |
55 --enable-auth enables ESMTP AUTH support (disabled by default) | |
56 | |
155
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
57 --disable-pop3 disables POP3 support (enabled by default) |
0 | 58 |
59 --enable-maildir enables qmail style Maildir support (disabled by default) | |
60 | |
155
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
61 --enable-ident enables RFC 1413 support. If you have the libident |
0 | 62 dynamic library installed, this will be linked, otherwise it will be |
63 statically linked using the sources included in the package. | |
64 | |
155
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
65 --disable-resolver disables resolver support. Without the resolver functions, |
0 | 66 masqmail uses only gethostbyname() to resolve DNS names, and you cannot send |
67 mail without a smart host. Not recommended. You save 3K at most. | |
68 | |
155
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
69 --disable-smtp-server disables SMTP server support. You may want this if you do |
0 | 70 not need masqmail to listen. In this case, you cannot use masqmail as a smart |
71 host for other hosts on your LAN, you cannot use mail clients that send SMTP, | |
72 you cannot even use pine. In short, use of this option is discouraged unless | |
73 your resources are extremely limited. | |
74 | |
155
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
75 --enable-mserver enables online detection by connecting to the mserver |
0 | 76 (masqdialer system). |
77 | |
78 --with-libcryto instead of using the md5 and hmac functions within the package, | |
155
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
79 link dynamically with libcrypto. This applies only if you have POP3 or SMTP |
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
80 AUTH enabled. Only makes sense if your resources are limited and you have |
0 | 81 libcrypto installed. Untested. |
82 | |
155
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
83 --with-glib-static links with glib statically. This makes the binary larger |
0 | 84 by around 30K (i386 architecture), but if masqmail is the only binary using |
85 glib, you save some space in total, because you do not need the shared glib | |
86 library installed. | |
87 | |
155
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
88 --disable-debug disables debugging; enabling it by command line or configuration |
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
89 option has no effect. Strongly discouraged, since you miss valuable information |
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
90 if something goes wrong. You save 6K. |
0 | 91 |
92 BTW, to get 3K of space, call | |
93 strip --remove-section=.comment --remove-section=.note --strip-unneeded src/masqmail | |
155
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
94 after building. |
0 | 95 |
59 | 96 |
97 | |
0 | 98 after make install: |
99 ------------------- | |
100 | |
101 You can also use these instructions to omit 'make install' if you do | |
102 not want to use it. | |
103 | |
104 Check that 'make install' worked correctly. The following command: | |
105 | |
159
949ccc02eecf
adjusted masqmail's path to /usr/local/...
meillo@marmaro.de
parents:
155
diff
changeset
|
106 ls -ld /usr/local/sbin/masqmail /etc/masqmail /var/log/masqmail/ \ |
155
dbe3dadd1afe
Documentation improvements in the INSTALL file and some man pages
meillo@marmaro.de
parents:
92
diff
changeset
|
107 /var/run/masqmail /var/spool/masqmail/ /var/spool/masqmail/* |
0 | 108 |
109 should give output similar to | |
110 | |
159
949ccc02eecf
adjusted masqmail's path to /usr/local/...
meillo@marmaro.de
parents:
155
diff
changeset
|
111 -rwsr-xr-x 1 root root 399356 May 10 12:34 /usr/local/sbin/masqmail |
59 | 112 drwxr-xr-x 2 root root 4096 May 10 12:34 /etc/masqmail |
113 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/log/masqmail | |
114 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/run/masqmail | |
115 drwxr-xr-x 5 mail trusted 4096 May 10 12:34 /var/spool/masqmail | |
116 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/input | |
117 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/lock | |
118 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/popuidl | |
0 | 119 |
159
949ccc02eecf
adjusted masqmail's path to /usr/local/...
meillo@marmaro.de
parents:
155
diff
changeset
|
120 (important is the set-user-id bit for /usr/local/sbin/masqmail and the |
0 | 121 ownership of all items). |
122 | |
123 Use the example configuration files in examples/ to edit your own. The | |
59 | 124 main configuration file `masqmail.conf' and the *.route and *.get files |
125 should go into /etc/masqmail. | |
0 | 126 |
159
949ccc02eecf
adjusted masqmail's path to /usr/local/...
meillo@marmaro.de
parents:
155
diff
changeset
|
127 The default destination for the executable `masqmail' is /usr/local/sbin. |
59 | 128 Check that it has the set-uid bit set. You can set it with: |
129 | |
159
949ccc02eecf
adjusted masqmail's path to /usr/local/...
meillo@marmaro.de
parents:
155
diff
changeset
|
130 chmod u+s /usr/local/sbin/masqmail |
0 | 131 |
132 If you want to replace sendmail, move your old sendmail binary to | |
59 | 133 another name and make a symbolic link: |
134 | |
159
949ccc02eecf
adjusted masqmail's path to /usr/local/...
meillo@marmaro.de
parents:
155
diff
changeset
|
135 ln -s /usr/local/sbin/masqmail /usr/sbin/sendmail |
949ccc02eecf
adjusted masqmail's path to /usr/local/...
meillo@marmaro.de
parents:
155
diff
changeset
|
136 |
949ccc02eecf
adjusted masqmail's path to /usr/local/...
meillo@marmaro.de
parents:
155
diff
changeset
|
137 You might also need this link: |
949ccc02eecf
adjusted masqmail's path to /usr/local/...
meillo@marmaro.de
parents:
155
diff
changeset
|
138 |
949ccc02eecf
adjusted masqmail's path to /usr/local/...
meillo@marmaro.de
parents:
155
diff
changeset
|
139 ln -s /usr/local/sbin/masqmail /usr/lib/sendmail |
59 | 140 |
141 Now every mailer that used to call sendmail will now call masqmail. You | |
142 can now kill your old sendmail if it is running and start masqmail. | |
143 | |
144 /sbin/init.d/sendmail restart | |
145 | |
146 should do that. You can also start masqmail with: | |
147 | |
159
949ccc02eecf
adjusted masqmail's path to /usr/local/...
meillo@marmaro.de
parents:
155
diff
changeset
|
148 /usr/local/sbin/masqmail -bd -q30m |
59 | 149 |
0 | 150 |
151 | |
59 | 152 Configuring for online delivery |
153 ------------------------------- | |
154 | |
155 (This section covers dial-up internet connections.) | |
156 | |
157 Now you have to set up the online configuration. The trick is to tell | |
158 your ip-up script the connection name. You could use the IP number of | |
159 the far side of the ppp link, but this is a pain and may change each | |
160 time. But you can give it an additional argument via pppd with ipparam. | |
161 Somewhere in your dial up script you have a line similar to: | |
162 | |
163 /usr/sbin/pppd /dev/ttyS1 connect "/usr/sbin/chat -t 90 -f $CHATFILE" \ | |
164 -d -d -d user user@somewhere file "$OPTIONS" | |
165 | |
166 Just add 'ipparam FastNet' in the command line for pppd if your ISP has | |
167 the name FastNet. The ip-up script will then get 'FastNet' as a sixth | |
168 parameter. In your ip-up script you can then call masqmail with | |
169 | |
159
949ccc02eecf
adjusted masqmail's path to /usr/local/...
meillo@marmaro.de
parents:
155
diff
changeset
|
170 /usr/local/sbin/masqmail -qo "$6" |
59 | 171 |
172 instead of 'sendmail -q', if you had that in the script before. | |
173 Masqmail will then read the route configuration specified for the | |
174 connection name 'FastNet' and deliver the mail destined to the internet. | |
175 See the configuration manual on how to write a route configuration or | |
176 use one of the examples as a template. | |
177 | |
178 I do not know how do configure that for an ISDN adapter, but I am sure | |
179 you will find something similar in the man pages. | |
180 | |
181 If you want mail that is received by masqmail from your local net to be | |
182 delivered immediately using the route configuration, you have two | |
183 possibilities: | |
184 | |
185 * if you are using the masqdialer system, you just have to set the | |
92 | 186 variables online_detect to pipe and online_pipe to something like |
187 /usr/bin/mservdetect localhost 222 | |
188 if mserver is running on localhost and listens on port 222. See the | |
189 man page to mservdetect(1). | |
190 | |
59 | 191 * otherwise you have to add two commands in your ip-up script: |
92 | 192 echo "$6" >/var/run/masqmail/masqmail-route |
193 chmod 644 /var/run/masqmail/masqmail-route | |
194 and you have to remove the file /var/run/masqmail/masqmail-route in | |
195 your ip-down script: | |
196 rm /var/run/masqmail/masqmail-route | |
59 | 197 Then you have to set online_detect to file and online_file to |
92 | 198 /var/run/masqmail/masqmail-route |
59 | 199 |
200 See the route documentation for more. | |
201 | |
202 | |
203 | |
204 Written by oku. | |
205 Updated by meillo. |