-
Notifications
You must be signed in to change notification settings - Fork 3
/
INSTALL
74 lines (64 loc) · 2.23 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
Requirements
============
- bglibs version 2.04
- cvm version 0.97
- Lua version 5 or later (optional)
- GnuTLS version 3.5 or later (optional)
Installation
============
- Review the contents of the conf-* files.
- Build the sources by running "make".
- To build the Lua plugin, run "make lua".
- After the package has been compiled, run "make install" as root.
Configuration
=============
- To take advantage of the SMTP AUTH features, make sure you have a CVM
authentication program (some are included with the cvm package itself).
- Run a CVM authentication module to provide the AUTH feature.
Example: To run cvm-vmailmgr as a daemon:
exec /usr/local/bin/softlimit -m 9000000 \
/usr/local/bin/cvm-vmailmgr /tmp/.cvm-vmailmgr 2>&1
- Configure your mail system to use the SMTP back-end with the
appropriate environment variables.
Example using tcpserver (highly recommended):
#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`head -1 /var/qmail/control/concurrencyincoming`
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" ]; then
echo $0: QMAILDUID, NOFILESGID, or MAXSMTPD is unset
exit 1
fi
exec \
/usr/local/bin/envdir /etc/smtpfront \
/usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver -v -R -H \
-l "`head -1 /var/qmail/control/me`" -x /etc/tcp.smtp.cdb \
-c "$MAXSMTPD" -u "$QMAILDUID" -g "$NOFILESGID" 0 25 \
/usr/local/bin/smtpfront-qmail 2>&1
/etc/smtpfront/CVM_SASL_PLAIN:
cvm-local:/tmp/.cvm-vmailmgr
Example using xinetd with TCP Wrappers:
/etc/xinetd.d/smtp:
# default: on
# description: smtp
service smtp
{
disable = no
flags = REUSE NAMEINARGS
socket_type = stream
protocol = tcp
wait = no
user = qmaild
server = /usr/sbin/tcpd
server_args = /var/qmail/bin/tcp-env -R /usr/local/sbin/smtpfront-wrapper
log_on_success += USERID
log_on_failure += USERID
}
/usr/local/sbin/smtpfront-wrapper:
#!/bin/sh
CVM_SASL_PLAIN=cvm-local:/tmp/.cvm-unix
export CVM_SASL_PLAIN
CVM_SASL_LOGIN=cvm-local:/tmp/.cvm-unix
export CVM_SASL_LOGIN
exec /usr/local/bin/smtpfront-qmail 2>> /tmp/smtpfront-errs.txt