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