-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathINSTALL
195 lines (127 loc) · 4.89 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
Installing YENMA
* Supported OSes
- Linux
- FreeBSD, NetBSD
- MacOS X 10.5.x
- Solaris 10 or later
* Necessary softwares
- GNU C Compiler
- GNU Make
- OpenSSL (0.9.8 or later)
- resolver library
- ldns (1.6.0 or later)
or
- libbind (bind 9, libbind 6.0 or later)
- libmilter (sendmail 8.13 or later)
* Steps of building and execution
1. Extracting
$ tar xzf yenma-x.y.z.tar.gz
$ cd yenma-x.y.z
2. Installing dependent libraries
To install OpenSSL, ldns and libmilter, please read "Building
dependent libraries" below.
3. Executing configure
If the headers and libraries of OpenSSL, ldns and libmilter are
installed in the "/usr/local" directory, execute "configure"
without options.
$ ./configure
If they are installed in another directory, please specify the
base directories with the --with-ssl, --with-ldns and
--with-libmilter option.
The following example is that the base directory of OpenSSL is
"/foo", that of ldns is "/bar" and that of libmilter is "/baz".
$ ./configure --with-ssl=/foo --with-ldns=/bar --with-libmilter=/baz
4. Building
$ make
5. Installing
$ sudo make install
6. Preparing the configuration file
$ sudo cp yenma/etc/yenma.conf.sample /etc/yenma.conf
7. Creating the directory for the PID file
In the sample configuration file, "/var/run/yenma/yenma.pid" is
specified to "milter.pidfile". So, you need to change permission
of the directory so that "milter.user" can write.
$ sudo mkdir -p /var/run/yenma
$ sudo chown daemon:daemon /var/run/yenma
$ sudo chmod 700 /var/run/yenma
8. Executing
$ sudo /usr/local/libexec/yenma -c /etc/yenma.conf
* Configuring MTA
Configure MTA so as to use YENMA when it receives messages.
- sendmail
Specify YENMA's milter socket with the MAIL_FILTER or
INPUT_MAIL_FILTER macro in the .mc file, then generate
sendmail.cf.
Example of using YENMA's default socket:
INPUT_MAIL_FILTER(`yenma', `S=inet:[email protected]')dnl
For more information on INPUT_MAIL_FILTER, please refer to
cf/README etc in the sendmail package.
If you use sendmail 8.13 or earlier as MTA, set
"milter.sendmail813" to "ture" in YENMA's configuration file.
- postfix (2.4 or later)
Set "milter.postfix" to "true" in YENMA's configuration file.
Specify smtpd_milters to YENMA's milter socket in the main.cf file.
Example of using YENMA's default socket:
smtpd_milters = inet:127.0.0.1:10025
For more information on milter support of postfix, please refer to
README_FILES/MILTER_README in the postfix package.
* Building dependent libraries
This is an example to install the libraries under
the /usr/local directory.
- OpenSSL
$ tar zxf openssl-x.y.z.tar.gz
$ cd openssl-x.y.z
$ ./config threads shared --prefix=/usr/local
$ make
$ sudo make install
- ldns
$ tar zxf ldns-x.y.z.tar.gz
$ cd ldns-x.y.z
$ ./configure --prefix=/usr/local --with-ssl=/usr/local
$ make
$ sudo make install
- libbind
$ tar zxf bind-x.y.z
$ cd bind-x.y.z/lib/bind
$ ./configure --prefix=/usr/local --enable-threads --with-libtool --enable-ipv6
$ make
$ sudo make install
- libmilter
$ tar zxf sendmail.x.y.z.tar.gz
$ cd sendmail-x.y.z
- Put the followings to devtools/Site/site.config.m4
define(`confINCLUDEDIR', `/usr/local/include')
define(`confLIBDIR', `/usr/local/lib')
APPENDDEF(`confENVDEF', `-DSM_CONF_POLL=1 -DNETINET6=1')
APPENDDEF(`confOPTIMIZE', `-g')
# Pease add other setting appropriate to your OS.
$ cd libmilter
$ ./Build
$ sudo ./Build install
For more information about installation of OpenSSL, ldns and
libmiter, please refer to manuals in each packages.
* Notes on building YENMA for the many user environments
- Specifying SM_CONF_POLL for libmilter
If select() is used for the communication with sendmail,
file descriptors over FD_SETSIZE cannot be handled. So, poll()
should be used instead. Please define SM_CONF_POLL when building
libmilter.
Please refer to "build/site.config.m4.poll-generic".
# Setting to add to site.config.m4
APPENDDEF(`confENVDEF', `-DSM_CONF_POLL=1')
If you install YENMA with "build/build_all.sh", SM_CONF_POLL is
automatically specified.
- Specifying the "-m64" option of gcc on SPARC Solaris
32bit version fopen() of Solaris, used in libbind, cannot handle
file descriptors over 255. So, please specify the "-64bit" option
when building the libraries and YENMA.
- libbind
$ ./configure CFLAGS=-m64 LDFLAGS=-m64
- libmilter
Please refer to "build/site.config.m4.poll-m64"
# Setting to add to site.config.m4
APPENDDEF(`confENVDEF', `-DSM_CONF_POLL=1')
APPENDDEF(`confCCOPTS', `-m64')
- YENMA
$ ./configure CFLAGS=-m64 LDFLAGS=-m64
$Id$