Mercurial > masqmail-0.2
comparison INSTALL @ 59:941413084f56
updated docs; moved files around
updated the INSTALL file with content from the old website
moved *agenda* and *ipaq files to docs (are they still relevant?)
author | meillo@marmaro.de |
---|---|
date | Sat, 29 May 2010 22:53:42 +0200 |
parents | 08114f7dcc23 |
children | 10d00e3235f2 |
comparison
equal
deleted
inserted
replaced
58:6ab62592cac4 | 59:941413084f56 |
---|---|
1 simple installation instructions, see docs/install.html for more. | 1 Additional information may be available in docs/ or on the website. |
2 For installing on GNU/Linux distributions read docs/linux-distris. | |
2 | 3 |
3 To compile MasqMail you need glib 1.2 (http://www.gtk.org). | 4 |
5 Installation instructions | |
6 ------------------------- | |
7 | |
8 To compile masqmail you need glib 1.2 (http://www.gtk.org). | |
4 | 9 |
5 You need a user and a group for masqmail to run, I suggest user | 10 You need a user and a group for masqmail to run, I suggest user |
6 'mail' and group 'trusted'. Say: | 11 'mail' and group 'trusted'. Say: |
7 | 12 |
8 groupadd -g 42 trusted | 13 groupadd -g 42 trusted |
9 useradd -u 42 -g 42 -d / -s /bin/sh -c "Mail Transfer Agent" mail | 14 useradd -u 42 -g 42 -d / -s /bin/sh -c "Mail Transfer Agent" mail |
10 | 15 |
11 If you use other names than 'mail' and 'trusted' use the options | 16 If you use other names than 'mail' and 'trusted' use the options |
12 described below for configure. The 42 is just a suggestion, you can | 17 described below for configure. The 42 is just a suggestion, you can |
13 use any number you like, but preferably one < 100. It does not have | 18 use any number you like, but preferably one < 100. It does not have |
14 to be the same for the user 'mail' and the group 'trusted'. | 19 to be the same for the user 'mail' and the group 'trusted'. |
15 | 20 |
16 Then do: | 21 Compliling is a matter of the usual procedure. In the source directory, |
22 after unpacking do: | |
17 | 23 |
18 ./configure | 24 ./configure |
19 make | 25 make |
20 make install | 26 make install |
21 | |
22 Debian: | |
23 If you compile for Debian, do the configure with at least these options, | |
24 this makes it compatible with the official debian package: | |
25 ./configure --with-liblockfile --with-group=mail | |
26 you do not need the group 'trusted', use 'mail' instead. | |
27 | |
28 You can also build your own Debian package with | |
29 dpkg-buildpackage -rfakeroot | |
30 You need to have fakeroot installed to do this. Or, as root, do: | |
31 dpkg-buildpackage | |
32 | |
33 SuSE/Redhat: | |
34 There are spec files for rpm creation in suse/ or redhat/. You may have to adjust these files. | |
35 | 27 |
36 | 28 |
37 Sorry, but after that you are not yet finished. For instruction on how | |
38 to deliver mail using a connection to your ISP see | |
39 docs/install.html. It is probably a good idea to copy the files | |
40 docs/*.html to a directory where you can access them with a browser. | |
41 | 29 |
42 additional options for configure: | 30 Additional options for configure |
43 --------------------------------- | 31 -------------------------------- |
32 | |
33 See the output of | |
34 | |
35 ./configure -h | |
36 | |
37 Here is additional, but maybe obsolete, explanation: | |
44 | 38 |
45 --with-user=USER sets the user as which MasqMail will run. Default is | 39 --with-user=USER sets the user as which MasqMail will run. Default is |
46 'mail'. USER has to exist before you 'make install'. | 40 'mail'. USER has to exist before you 'make install'. |
47 | 41 |
48 --with-group=GROUP sets the group as which MasqMail will run. Default | 42 --with-group=GROUP sets the group as which MasqMail will run. Default |
96 goes wrong. You save 6K. | 90 goes wrong. You save 6K. |
97 | 91 |
98 BTW, to get 3K of space, call | 92 BTW, to get 3K of space, call |
99 strip --remove-section=.comment --remove-section=.note --strip-unneeded src/masqmail | 93 strip --remove-section=.comment --remove-section=.note --strip-unneeded src/masqmail |
100 | 94 |
95 | |
96 | |
101 after make install: | 97 after make install: |
102 ------------------- | 98 ------------------- |
103 | 99 |
104 You can also use these instructions to omit 'make install' if you do | 100 You can also use these instructions to omit 'make install' if you do |
105 not want to use it. | 101 not want to use it. |
106 | 102 |
107 Check that 'make install' worked correctly. The following command: | 103 Check that 'make install' worked correctly. The following command: |
108 | 104 |
109 ls -ld /usr/sbin/masqmail /var/masqmail/ /var/spool/masqmail /var/spool/masqmail/input | 105 ls -ld /usr/sbin/masqmail /etc/masqmail /var/log/masqmail/ \ |
106 /var/run/masqmail /var/spool/masqmail/ /var/spool/masqmail/* | |
110 | 107 |
111 should give output similar to | 108 should give output similar to |
112 | 109 |
113 -rwsr-xr-x 1 root root 86955 Oct 14 14:27 /usr/sbin/masqmail | 110 -rwsr-xr-x 1 root root 399356 May 10 12:34 /usr/sbin/masqmail |
114 drwxr-xr-x 2 mail trusted 1024 Oct 14 14:29 /var/masqmail/ | 111 drwxr-xr-x 2 root root 4096 May 10 12:34 /etc/masqmail |
115 drwxr-xr-x 3 mail trusted 1024 Oct 14 14:27 /var/spool/masqmail | 112 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/log/masqmail |
116 drwxr-xr-x 2 mail trusted 1024 Oct 14 18:32 /var/spool/masqmail/input | 113 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/run/masqmail |
117 drwxr-xr-x 2 mail trusted 1024 Oct 14 18:32 /var/spool/masqmail/lock | 114 drwxr-xr-x 5 mail trusted 4096 May 10 12:34 /var/spool/masqmail |
118 drwxr-xr-x 2 mail trusted 1024 Oct 14 18:32 /var/spool/masqmail/popuidl | 115 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/input |
116 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/lock | |
117 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/popuidl | |
119 | 118 |
120 (important is the set-user-id bit for /usr/sbin/masqmail and the | 119 (important is the set-user-id bit for /usr/sbin/masqmail and the |
121 ownership of all items). | 120 ownership of all items). |
122 | 121 |
123 Use the example configuration files in examples/ to edit your own. The | 122 Use the example configuration files in examples/ to edit your own. The |
124 main configuration should go to /etc/masqmail.conf. I recommend to | 123 main configuration file `masqmail.conf' and the *.route and *.get files |
125 make a directory /etc/masqmail for the *.route amd *.get files. | 124 should go into /etc/masqmail. |
126 | 125 |
127 The default destination for the executable 'masqmail' is | 126 The default destination for the executable `masqmail' is /usr/sbin. |
128 /usr/sbin. Check that it has the set user id bit set. (chmod u+s | 127 Check that it has the set-uid bit set. You can set it with: |
129 /usr/sbin/masqmail does no harm in any case). | 128 |
129 chmod u+s /usr/sbin/masqmail | |
130 | 130 |
131 If you want to replace sendmail, move your old sendmail binary to | 131 If you want to replace sendmail, move your old sendmail binary to |
132 another name and make a symbolic link /usr/sbin/sendmail -> | 132 another name and make a symbolic link: |
133 /usr/sbin/masqmail. | 133 |
134 ln -s /usr/sbin/masqmail /usr/sbin/sendmail | |
135 | |
136 Now every mailer that used to call sendmail will now call masqmail. You | |
137 can now kill your old sendmail if it is running and start masqmail. | |
138 | |
139 /sbin/init.d/sendmail restart | |
140 | |
141 should do that. You can also start masqmail with: | |
142 | |
143 /usr/sbin/masqmail -bd -q30m | |
134 | 144 |
135 | 145 |
146 | |
147 Configuring for online delivery | |
148 ------------------------------- | |
149 | |
150 (This section covers dial-up internet connections.) | |
151 | |
152 Now you have to set up the online configuration. The trick is to tell | |
153 your ip-up script the connection name. You could use the IP number of | |
154 the far side of the ppp link, but this is a pain and may change each | |
155 time. But you can give it an additional argument via pppd with ipparam. | |
156 Somewhere in your dial up script you have a line similar to: | |
157 | |
158 /usr/sbin/pppd /dev/ttyS1 connect "/usr/sbin/chat -t 90 -f $CHATFILE" \ | |
159 -d -d -d user user@somewhere file "$OPTIONS" | |
160 | |
161 Just add 'ipparam FastNet' in the command line for pppd if your ISP has | |
162 the name FastNet. The ip-up script will then get 'FastNet' as a sixth | |
163 parameter. In your ip-up script you can then call masqmail with | |
164 | |
165 /usr/sbin/masqmail -qo "$6" | |
166 | |
167 instead of 'sendmail -q', if you had that in the script before. | |
168 Masqmail will then read the route configuration specified for the | |
169 connection name 'FastNet' and deliver the mail destined to the internet. | |
170 See the configuration manual on how to write a route configuration or | |
171 use one of the examples as a template. | |
172 | |
173 I do not know how do configure that for an ISDN adapter, but I am sure | |
174 you will find something similar in the man pages. | |
175 | |
176 If you want mail that is received by masqmail from your local net to be | |
177 delivered immediately using the route configuration, you have two | |
178 possibilities: | |
179 | |
180 * if you are using the masqdialer system, you just have to set the | |
181 variables online_detect to mserver and mserver_iface to the interface | |
182 mserver is listening to. | |
183 * otherwise you have to add two commands in your ip-up script: | |
184 echo -n $6 > /tmp/connect_route | |
185 chmod 644 /tmp/connect_route | |
186 and you have to remove the file /tmp/connect_route in your ip-down script: | |
187 rm /tmp/connect_route. | |
188 Then you have to set online_detect to file and online_file to | |
189 /tmp/connect_route. | |
190 | |
191 See the route documentation for more. | |
192 | |
193 | |
194 | |
195 Written by oku. | |
196 Updated by meillo. |