Imapsync: Difference between revisions
imported>Onny Add initial page |
Update to use imaps by default |
||
| (11 intermediate revisions by 2 users not shown) | |||
| Line 9: | Line 9: | ||
</nowiki>}} | </nowiki>}} | ||
[[Category: | == Usage == | ||
[[Category: | |||
Following example transfers all mails from server <code>mail1.example.org</code> to <code>mail2.example.org</code> via IMAP protocol using supplied credentials | |||
<syntaxhighlight lang="console"> | |||
imapsync \ | |||
--host1 mail1.example.org --port1 993 --user1 user1 --password1 "secret1" \ | |||
--host2 mail2.example.org --port2 993 --user2 user1 --password2 "secret1" \ | |||
--addheader | |||
</syntaxhighlight> | |||
Adding parameter <code>--addheader</code> helps if you want to sync draft and sent messages which usually have no headers to be identified. | |||
=== Filter messages and deletion === | |||
Additional flags <code>--delete1</code> and <code>--search</code> can be added to sync all messages before the specified date and to remove them after successfull migration to <code>host2</code> | |||
<syntaxhighlight lang="console"> | |||
imapsync \ | |||
[...] | |||
--delete1 --delete1emptyfolders \ | |||
--search "SENTBEFORE 01-Jan-2008" | |||
</syntaxhighlight> | |||
[[Category:Mail Server]] | |||
[[Category:Server]] | |||