Final version as used today
This commit is contained in:
13
imapsync.nu
13
imapsync.nu
@ -11,7 +11,7 @@ def "main show_data" [conffile] {
|
||||
each {|u|
|
||||
|
||||
print $"host1: ($u.host1), user1: ($u.user1),"
|
||||
print $"host2: ($u.host2), user2: ($u.user2)\n"
|
||||
print $" host2: ($u.host2), user2: ($u.user2)\n"
|
||||
}
|
||||
)
|
||||
""
|
||||
@ -24,10 +24,11 @@ def "main test_creds" [conffile] {
|
||||
each {|u|
|
||||
|
||||
print "Testing credentials for:"
|
||||
print $"host1: ($u.host1), user1: ($u.user1),"
|
||||
print $"host2: ($u.host2), user2: ($u.user2)\n"
|
||||
print $" host1: ($u.host1), user1: ($u.user1),"
|
||||
print $" host2: ($u.host2), user2: ($u.user2)\n"
|
||||
|
||||
imapsync --justlogin --host1 $u.host1 --user1 $u.user1 --password1 $u.password1 --host2 $u.host2 --user2 $u.user2 --password2 $u.password2 | print
|
||||
imapsync --justlogin --host1 $u.host1 --user1 $u.user1 --password1 $u.password1 --host2 $u.host2 --user2 $u.user2 --password2 $u.password2 | grep -P "^Host[12]:? (failure|success)" | print
|
||||
print " "
|
||||
}
|
||||
)
|
||||
""
|
||||
@ -40,8 +41,8 @@ def "main synchronize" [conffile] {
|
||||
each {|u|
|
||||
|
||||
print "Synchronizing:"
|
||||
print $"host1: ($u.host1), user1: ($u.user1),"
|
||||
print $"host2: ($u.host2), user2: ($u.user2)\n"
|
||||
print $" host1: ($u.host1), user1: ($u.user1),"
|
||||
print $" host2: ($u.host2), user2: ($u.user2)\n"
|
||||
|
||||
imapsync --syncinternaldates --host1 $u.host1 --user1 $u.user1 --password1 $u.password1 --host2 $u.host2 --user2 $u.user2 --password2 $u.password2 | print
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user