Cent_ImapOfficeSync
の編集
index.php?Cent_ImapOfficeSync
[
トップ
] [
編集
|
差分
|
履歴
|
添付
|
リロード
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
-- 雛形とするページ --
(no template pages)
#contents *** route の追加 [#gcb96e3e] eth0 側(=社内LAN接続)から 会社メールサーバー(172.8.30.202)に行くようにルートの追加を行う 尚、その他の通常パケットは eth1 側から流れるように設定する。 - &ref(add_eth0.sh,center,add_eth0.sh(route 追加スクリプト)); [root@localhost ~]# route add -net 172.30.0.0 gw 172.30.8.254 metric 20 netmask 255.255.0.0 eth0 [root@localhost ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.84.0 * 255.255.255.0 U 0 0 0 vmnet3 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 172.30.8.0 * 255.255.255.0 U 0 0 0 eth0 172.16.156.0 * 255.255.255.0 U 0 0 0 vmnet8 192.168.56.0 * 255.255.255.0 U 0 0 0 vmnet1 172.30.0.0 172.30.8.254 255.255.0.0 UG 20 0 0 eth0 169.254.0.0 * 255.255.0.0 U 0 0 0 eth1 default 192.168.1.60 0.0.0.0 UG 0 0 0 eth1 この状態で、社内メールサーバーと自宅サーバーの両方に ping が通ることが確認できる。 通常は eth0 側は活性化もしていないし、ケーブルそのものも接続していない。 [root@localhost ~]# ping mail.hmuna.com PING mail.hmuna.com (122.249.122.231) 56(84) bytes of data. 64 bytes from x122231.ppp.asahi-net.or.jp (122.249.122.231): icmp_seq=1 ttl=54 time=7.62 ms 64 bytes from x122231.ppp.asahi-net.or.jp (122.249.122.231): icmp_seq=2 ttl=54 time=8.38 ms 64 bytes from x122231.ppp.asahi-net.or.jp (122.249.122.231): icmp_seq=3 ttl=54 time=7.98 ms 64 bytes from x122231.ppp.asahi-net.or.jp (122.249.122.231): icmp_seq=4 ttl=54 time=8.07 ms 64 bytes from x122231.ppp.asahi-net.or.jp (122.249.122.231): icmp_seq=5 ttl=54 time=7.84 ms --- mail.hmuna.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3999ms rtt min/avg/max/mdev = 7.624/7.982/8.388/0.252 ms [root@localhost ~]# ping 172.30.8.202 PING 172.30.8.202 (172.30.8.202) 56(84) bytes of data. 64 bytes from 172.30.8.202: icmp_seq=1 ttl=64 time=0.298 ms 64 bytes from 172.30.8.202: icmp_seq=2 ttl=64 time=0.222 ms 64 bytes from 172.30.8.202: icmp_seq=3 ttl=64 time=0.281 ms 64 bytes from 172.30.8.202: icmp_seq=4 ttl=64 time=0.334 ms --- 172.30.8.202 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 2999ms rtt min/avg/max/mdev = 0.222/0.283/0.334/0.045 ms [root@localhost ~]# *** &ref(imapsync-1.252.tgz,center,imapsync-1.252); インストール [#xe9431f9] - perl 関連モジュールのインストール -- &ref(Mail-IMAPClient-2.2.9.tar.gz,center,Mail-IMAPClient-2.2.9); [root@localhost Mail-IMAPClient-2.2.9]# perl Makefile.PL [root@localhost Mail-IMAPClient-2.2.9]# make [root@localhost Mail-IMAPClient-2.2.9]# make test [root@localhost Mail-IMAPClient-2.2.9]# make install -- &ref(Digest-MD5-2.36.tar.gz,center,Digest-MD5-2.36); [root@localhost Digest-MD5-2.36]# perl Makefile.PL [root@localhost Digest-MD5-2.36]# make [root@localhost Digest-MD5-2.36]# make test [root@localhost Digest-MD5-2.36]# make install -- &ref(TermReadKey-2.30.tar.gz,center,TermReadKey-2.30); [root@localhost TermReadKey-2.30]# perl Makefile.PL [root@localhost TermReadKey-2.30]# make [root@localhost TermReadKey-2.30]# make test [root@localhost TermReadKey-2.30]# make install -- &ref(IO-Socket-SSL-1.13.tar.gz,center,IO-Socket-SSL-1.13); [root@localhost IO-Socket-SSL-1.13]# perl Makefile.PL [root@localhost IO-Socket-SSL-1.13]# make [root@localhost IO-Socket-SSL-1.13]# make test [root@localhost IO-Socket-SSL-1.13]# make install -- &ref(Date-Manip-5.54.tar.gz,center,Date-Manip-5.54); [root@localhost Date-Manip-5.54]# perl Makefile.PL [root@localhost Date-Manip-5.54]# make [root@localhost Date-Manip-5.54]# make test [root@localhost Date-Manip-5.54]# make install -- imapsync 本体のインストール [root@localhost imapsync-1.252]# perl -c imapsync imapsync syntax OK [root@localhost imapsync-1.252]# make install *** imap-sync コマンド [#z308e709] - &ref(sync_munakata.sh,center, sync_munakata.sh); [root@localhost ~]# cat ./sync_munakata.sh /usr/bin/imapsync \ --host1 sbmx --user1 munakata --passfile1 /etc/secret/pass_frex --authmech1 PLAIN \ --host2 mail.hmuna.com --user2 munakata --passfile2 /etc/secret/pass_frex --authmech2 PLAIN --port2 993 --ssl2 [root@localhost ~]# - &ref(sync_stored.sh,center, sync_stored.sh); [root@localhost script]# cat ./sync_stored.sh /usr/bin/imapsync \ --host1 sbmx --user1 munakata.hisao --passfile1 /etc/secret/pass_rts --authmech1 PLAIN \ --host2 mail.hmuna.com --user2 stored_mail --passfile2 /etc/secret/pass_stored --authmech2 PLAIN --port2 993 --ssl2
タイムスタンプを変更しない
#contents *** route の追加 [#gcb96e3e] eth0 側(=社内LAN接続)から 会社メールサーバー(172.8.30.202)に行くようにルートの追加を行う 尚、その他の通常パケットは eth1 側から流れるように設定する。 - &ref(add_eth0.sh,center,add_eth0.sh(route 追加スクリプト)); [root@localhost ~]# route add -net 172.30.0.0 gw 172.30.8.254 metric 20 netmask 255.255.0.0 eth0 [root@localhost ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.84.0 * 255.255.255.0 U 0 0 0 vmnet3 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 172.30.8.0 * 255.255.255.0 U 0 0 0 eth0 172.16.156.0 * 255.255.255.0 U 0 0 0 vmnet8 192.168.56.0 * 255.255.255.0 U 0 0 0 vmnet1 172.30.0.0 172.30.8.254 255.255.0.0 UG 20 0 0 eth0 169.254.0.0 * 255.255.0.0 U 0 0 0 eth1 default 192.168.1.60 0.0.0.0 UG 0 0 0 eth1 この状態で、社内メールサーバーと自宅サーバーの両方に ping が通ることが確認できる。 通常は eth0 側は活性化もしていないし、ケーブルそのものも接続していない。 [root@localhost ~]# ping mail.hmuna.com PING mail.hmuna.com (122.249.122.231) 56(84) bytes of data. 64 bytes from x122231.ppp.asahi-net.or.jp (122.249.122.231): icmp_seq=1 ttl=54 time=7.62 ms 64 bytes from x122231.ppp.asahi-net.or.jp (122.249.122.231): icmp_seq=2 ttl=54 time=8.38 ms 64 bytes from x122231.ppp.asahi-net.or.jp (122.249.122.231): icmp_seq=3 ttl=54 time=7.98 ms 64 bytes from x122231.ppp.asahi-net.or.jp (122.249.122.231): icmp_seq=4 ttl=54 time=8.07 ms 64 bytes from x122231.ppp.asahi-net.or.jp (122.249.122.231): icmp_seq=5 ttl=54 time=7.84 ms --- mail.hmuna.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3999ms rtt min/avg/max/mdev = 7.624/7.982/8.388/0.252 ms [root@localhost ~]# ping 172.30.8.202 PING 172.30.8.202 (172.30.8.202) 56(84) bytes of data. 64 bytes from 172.30.8.202: icmp_seq=1 ttl=64 time=0.298 ms 64 bytes from 172.30.8.202: icmp_seq=2 ttl=64 time=0.222 ms 64 bytes from 172.30.8.202: icmp_seq=3 ttl=64 time=0.281 ms 64 bytes from 172.30.8.202: icmp_seq=4 ttl=64 time=0.334 ms --- 172.30.8.202 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 2999ms rtt min/avg/max/mdev = 0.222/0.283/0.334/0.045 ms [root@localhost ~]# *** &ref(imapsync-1.252.tgz,center,imapsync-1.252); インストール [#xe9431f9] - perl 関連モジュールのインストール -- &ref(Mail-IMAPClient-2.2.9.tar.gz,center,Mail-IMAPClient-2.2.9); [root@localhost Mail-IMAPClient-2.2.9]# perl Makefile.PL [root@localhost Mail-IMAPClient-2.2.9]# make [root@localhost Mail-IMAPClient-2.2.9]# make test [root@localhost Mail-IMAPClient-2.2.9]# make install -- &ref(Digest-MD5-2.36.tar.gz,center,Digest-MD5-2.36); [root@localhost Digest-MD5-2.36]# perl Makefile.PL [root@localhost Digest-MD5-2.36]# make [root@localhost Digest-MD5-2.36]# make test [root@localhost Digest-MD5-2.36]# make install -- &ref(TermReadKey-2.30.tar.gz,center,TermReadKey-2.30); [root@localhost TermReadKey-2.30]# perl Makefile.PL [root@localhost TermReadKey-2.30]# make [root@localhost TermReadKey-2.30]# make test [root@localhost TermReadKey-2.30]# make install -- &ref(IO-Socket-SSL-1.13.tar.gz,center,IO-Socket-SSL-1.13); [root@localhost IO-Socket-SSL-1.13]# perl Makefile.PL [root@localhost IO-Socket-SSL-1.13]# make [root@localhost IO-Socket-SSL-1.13]# make test [root@localhost IO-Socket-SSL-1.13]# make install -- &ref(Date-Manip-5.54.tar.gz,center,Date-Manip-5.54); [root@localhost Date-Manip-5.54]# perl Makefile.PL [root@localhost Date-Manip-5.54]# make [root@localhost Date-Manip-5.54]# make test [root@localhost Date-Manip-5.54]# make install -- imapsync 本体のインストール [root@localhost imapsync-1.252]# perl -c imapsync imapsync syntax OK [root@localhost imapsync-1.252]# make install *** imap-sync コマンド [#z308e709] - &ref(sync_munakata.sh,center, sync_munakata.sh); [root@localhost ~]# cat ./sync_munakata.sh /usr/bin/imapsync \ --host1 sbmx --user1 munakata --passfile1 /etc/secret/pass_frex --authmech1 PLAIN \ --host2 mail.hmuna.com --user2 munakata --passfile2 /etc/secret/pass_frex --authmech2 PLAIN --port2 993 --ssl2 [root@localhost ~]# - &ref(sync_stored.sh,center, sync_stored.sh); [root@localhost script]# cat ./sync_stored.sh /usr/bin/imapsync \ --host1 sbmx --user1 munakata.hisao --passfile1 /etc/secret/pass_rts --authmech1 PLAIN \ --host2 mail.hmuna.com --user2 stored_mail --passfile2 /etc/secret/pass_stored --authmech2 PLAIN --port2 993 --ssl2
テキスト整形のルールを表示する
添付ファイル:
IO-Socket-SSL-1.13.tar.gz
16件
[
詳細
]
add_eth0.sh
23件
[
詳細
]
Digest-MD5-2.36.tar.gz
17件
[
詳細
]
sync_stored.sh
23件
[
詳細
]
Mail-IMAPClient-2.2.9.tar.gz
18件
[
詳細
]
sync_munakata.sh
22件
[
詳細
]
imapsync-1.252.tgz
15件
[
詳細
]
TermReadKey-2.30.tar.gz
17件
[
詳細
]
Date-Manip-5.54.tar.gz
18件
[
詳細
]