[главная] | [каталоги]
0
создан: 2023-01-25 13:18:24
пользователь: geotekh раздел: linux
[515]
imapsync синхронизация с одного почтового сервера на другой
1. подготовка linux (debian) apt install -y \
libauthen-ntlm-perl \
libcgi-pm-perl \
libcrypt-openssl-rsa-perl \
libdata-uniqid-perl \
libencode-imaputf7-perl \
libfile-copy-recursive-perl \
libfile-tail-perl \
libio-socket-inet6-perl \
libio-socket-ssl-perl \
libio-tee-perl \
libhtml-parser-perl \
libjson-webtoken-perl \
libmail-imapclient-perl \
libparse-recdescent-perl \
libproc-processtable-perl \
libmodule-scandeps-perl \
libreadonly-perl \
libregexp-common-perl \
libsys-meminfo-perl \
libterm-readkey-perl \
libtest-mockobject-perl \
libtest-pod-perl \
libunicode-string-perl \
liburi-perl \
libwww-perl \
libtest-nowarnings-perl \
libtest-deep-perl \
libtest-warn-perl \
make \
time \
cpanminus
2. mkdir -p /var/mail/imapsync
chmod -R 777 /var/mail/imapsync
cd /var/mail/imapsync
3. wget -N https://imapsync.lamiral.info/imapsync
chmod +x imapsync
4. ./imapsync --testslive
5. nano imapsync.sh
#!/bin/bash
#
#
DIR_IMAPSYNC='/var/mail/imapsync'
# 1 imap mail server
HOST1='imap.yandex.ru'
# 2 imap mail server
HOST2='localhost'
SCREENNAME='imapsync1'
screen -X -S $SCREENNAME quit
screen -X -S $SCREENNAME stuff "^C"
sleep 1
echo "start screen $SCREENNAME"
cd $DIR_IMAPSYNC && screen -A -m -d -S $SCREENNAME ./imapsync --nolog --host1 $HOST1 --user1 admin@yandex.ru --password1 'qwerty' --host2 $HOST2 --user2 admin@mail.ru --password2 'password'
6. nano /etc/crontab
00 0 * * * root cd /var/mail/imapsync && ./imapsync.sh
webdir: https://imapsync.lamiral.info/INSTALL.d/INSTALL.Debian.txt