blob: 2cf28cca506f0c2f0eab2b646441c339d83a5947 (
plain)
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
|
All template files are .. underneath in ./etc
Debian 7.00 (Wheezy)
01 stop all running services ..
/etc/init.d/apache2 stop
/etc/init.d/sendmail stop
/etc/init.d/dovecot stop
/etc/init.d/mysql stop
/etc/init.d/saslauthd stop
01 logging
- firewall logging:
/etc/rsyslog.conf: firewall rules, kern.debug / kern.=!debug
/etc/init.d/rsyslog restart
- logrotate
/etc/logrotate.conf: compress, 48 weeks
/etc/logrotate.d/rsyslog: Add /var/log/firewall and /var/log/dovecot.log
03 move all users
- mv /data/backup/home/* /home/
- for all groups: groupadd -g GID groupname
- for all users: useradd -M -N -u UID -g GID username
- for all users: usermod -a -G GID1,GID2,.. username
- cd /data/backup/var/spool/mail ; (check names, remove unused ..) ; mv * /var/spool/mail/
04 move other stuff
- Old Logs
- mv /data/backup/var/log /var/log/old_logs
- MySQL
- old server: backup DB
- run backup-mysql.sh on old server, result is e.g. backup-mysqldb-20130605162509.sql
- new server: import DB
- get backup backup-mysqldb-20130605162509.sql
- /etc/init.d/mysql start
- backup-1: backup-mysql.sh
- mysql --user=root --password < backup-mysqldb-20130605162509.sql
- backup-2: backup-mysql.sh
- mysqlcheck --user=root --password --all-databases
- Services
- mv /data/backup/srv/* /srv/
05 config procmail
copy /etc/procmailrc
06 bogofilter
copy /etc/bogofilter.cf
Init empty wordlist.db:
touch nope
cat nope | bogoutil -l /var/spool/bogofilter/wordlist.db
rm nope
07 sasl2
/etc/sasl2/Sendmail.conf
/etc/default/saslauthd: start=yes
/etc/init.d/saslauthd start
08 dovecot 2.1.7-7
- features:
- requires ssl
- ipv4 / ipv6
- smtps
- pop3s
- sieve (tls)
- Sync config files in /etc/dovecot/
with etc/dovecot/dovecot.conf.diff and etc/dovecot/conf.d.diff
- mkdir -p /var/lib/dovecot/sieve/global/
- chmod ugo+rx /var/lib/dovecot
- copy /var/lib/dovecot/sieve/global/default.sieve
- cd /var/lib/dovecot/sieve/global ; sievec default.sieve
- copy /var/lib/dovecot/sieve/prologue.sieve
- cd /var/lib/dovecot/sieve ; sievec prologue.sieve
- migrate old INBOX:
for each user:
dsync mirror mbox:~/mail:INBOX=/var/mail/USERNAME
su dstrohlein -c "dsync mirror mbox:~/mail:INBOX=/var/mail/dstrohlein ; echo OK"
- /etc/init.d/dovecot start
09 sendmail 8.14.4-4
- features:
- requires ssl for auth
- ipv4 / ipv6
- /etc/mail
- Sync config files in /etc/mail with: etc/mail/mail.diff
- sendmail.mc
- submit.mc
- access
- local-host-names
- virtusertable
- /etc
- aliases
- cd /etc/mail
- make
/etc/init.d/sendmail start
|