File: INSTALL.OpenBSD

package info (click to toggle)
mailscanner 4.55.10-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,080 kB
  • ctags: 1,046
  • sloc: perl: 19,712; sh: 2,496; makefile: 282
file content (95 lines) | stat: -rwxr-xr-x 2,634 bytes parent folder | download | duplicates (2)
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
JKF 2002-12-26
JKE 2004-07-28

First Time Installation Instructions for OpenBSD
================================================

0. Install all of the required perl modules:

	# You could try install.sh if you don't want to do this, otherwise
	# For each module:
	tar -zxvf %ModuleName%.tar.gz
	cd %ModuleName%
	perl Makefile.PL
	make
	make test
	sudo make install

1. Create MailScanner spool directories:

	# Note: if you create links here to the real directories, please put the
	# *real* location into the configuration options in MailScanner.conf
	mkdir -p /var/spool/MailScanner/incoming
	mkdir -p /var/spool/MailScanner/quarantine

2. In /etc/rc.conf.local (create the file if it doesn't exist), add:

	sendmail_flags="-bd -OPrivacyOptions=noetrn -ODeliveryMode=queueonly -OQueueDirectory=/var/spool/mqueue.in"

3. Near the top of /etc/rc.local add:

	echo -n ' sendmail'; /usr/sbin/sendmail -q15 >/dev/null 2>&1
	echo -n ' MailScanner'; /opt/MailScanner/bin/check_mailscanner >/dev/null 2>&1

4. To root's crontab add (sudo crontab -e):

	# Check the status of MailScanner every 10 minutes
	0,10,20,30,40,50	*	*	*	*	/opt/MailScanner/bin/check_mailscanner -q

5. Unpack the distribution into /opt

	cd /opt
	tar -xvf MailScanner-%Version%.tar
	ln -s MailScanner-%Version% MailScanner

6. Edit /opt/MailScanner/etc/MailScanner.conf:

	Sendmail = /usr/sbin/sendmail
	Sendmail2 = /usr/sbin/sendmail
	TNEF Expander = internal # Or compile a version for OpenBSD
	# Make other changes as appropriate

7. Edit /opt/MailScanner/lib/MailScanner/SystemsDefs.pm:

	sed lives in /usr/bin not /bin

8. Start MailScanner:

	sudo /opt/MailScanner/bin/check_mailscanner


Upgrade Instructions for OpenBSD
================================

1. Unpack the distribution into /opt:

	cd /opt
	tar -zxvf MailScanner-%NewVersion%.tar.gz

2. Update MailScanner.conf:

	cd /opt/MailScanner-%NewVersion%/etc
	mv MailScanner.conf MailScanner.conf.default
	../bin/upgrade_MailScanner_conf /opt/MailScanner/etc/MailScanner.conf MailScanner.conf.default > MailScanner.conf
	# Review changes made and update as necessary
	diff /opt/MailScanner/etc/MailScanner.conf MailScanner.conf

3. Edit /opt/MailScanner-%Version%/lib/MailScanner/SystemsDefs.pm:

	sed lives in /usr/bin not /bin

4. Kill old version and start new version:

	ps -ax
	kill %MailScannerPID%
	cd /opt
	ln -fhs MailScanner-%NewVersion% MailScanner
	sudo MailScanner/bin/check_mailscanner

5. If problems occur after upgrading, rollback to previous working version:

	ps -ax
	kill %MailScannerPID%
	cd /opt
	ln -fhs MailScanner-%OldVersion% MailScanner
	sudo MailScanner/bin/check_mailscanner