Kompx.com or Compmiscellanea.com

Imapsync IMAP migration under Windows

Operating systems : Windows

Migrating an IMAP e-mail box from one IMAP server to another under Windows [ 1 ] [ 2 ] by means of imapsync:

  • Copying an e-mail box with all its contents and keeping its folder structure;
  • The e-mail box is hosted at a web hosting company's server and transfered to a common Yandex Mail (not Yandex Mail for Domain);
  • Both IMAP servers support SSL.
  • The process is done in three steps: test run, migrating folder structure, migrating e-mails.

Test run

Content of imapsync-test.bat:


.\imapsync.exe ^
	--host1 imap.domain.ru --user1 email1@domain.ru --password1 "password1" ^
	--host2 imap.yandex.ru --user2 email2@yandex.ru --password2 "password2" ^
	--ssl1 --ssl2 --sslargs1 SSL_verify_mode=0 --sslargs2 SSL_verify_mode=1 ^
	--skipheader "^(?!Message-Id)" ^
	--automap ^
	--regextrans2 "s/^INBOX\.(.+)/$1/" ^
	--addheader ^
	--justfolders ^
	--dry
@PAUSE

Note: the caret character ( ^ ) at the end of line means "this command continues on the next line". It allows to break long command with many options into several parts to put them in several lines for better readability.

This step is meant for testing if imapsync may be run at all, if it can connect to both e-mail boxes and can read the basic structure of the first one. Imapsync runs without actually doing anything, just printing what would have been done without the --dry option. Adding --justfolders is to make testing faster, as imapsync does its job only for folders then.

A log file with full details for each run is placed into the LOG_imapsync folder.

Migrating folder structure

Content of imapsync-folders.bat:


.\imapsync.exe ^
	--host1 imap.domain.ru --user1 email1@domain.ru --password1 "password1" ^
	--host2 imap.yandex.ru --user2 email2@yandex.ru --password2 "password2" ^
	--ssl1 --ssl2 --sslargs1 SSL_verify_mode=0 --sslargs2 SSL_verify_mode=1 ^
	--skipheader "^(?!Message-Id)" ^
	--automap ^
	--regextrans2 "s/^INBOX\.(.+)/$1/" ^
	--addheader ^
	--justfolders
@PAUSE

This step reproduces the folder structure of the e-mail box being migrated in the one it is being migrated to.

Migrating e-mails

Content of imapsync-emails.bat:


.\imapsync.exe ^
	--host1 imap.domain.ru --user1 email1@domain.ru --password1 "password1" ^
	--host2 imap.yandex.ru --user2 email2@yandex.ru --password2 "password2" ^
	--ssl1 --ssl2 --sslargs1 SSL_verify_mode=0 --sslargs2 SSL_verify_mode=1 ^
	--skipheader "^(?!Message-Id)" ^
	--automap ^
	--regextrans2 "s/^INBOX\.(.+)/$1/" ^
	--addheader
@PAUSE

Now e-mails are being copied. If the size of an e-mail with attachment(s) is larger than it is allowed (for Yandex Mail it is not more than 30 megabytes - source), then this particular message is not going to be migrated and there is to be an error mentioned in the log file.


[ 1 ]

Tested under Windows 7.

[ 2 ]

Imapsync IMAP migration under Linux: Imapsync. IMAP migration.


Aliosque subditos et thema

 

FTP in DOS

 

FTP in DOS. mTCP mTCP is a suite containing several utilities, one of which is FTP. It is similar to the FTP client of various Windows, running in Command Prompt. In order to install and use mTCP: 1. mTCP [ Home page ] 2. Packet driver for Ethernet network card: http://www.crynwr.com/drivers/ http://www.georgpotthast.de/sioux/packet.htm 3. Create a folder, for example C:\DRIVERS\. Put there: a packet driver for Ethernet network card. 4. Set up network. For example, by means of Microsoft Network Client 3.0 [ How-to page ] 5. Start packet driver. In the case discussed it is: C:\DRIVERS\PCIPKT.COM 0x60 6. Unpack the archive with mTCP into a folder, C:\SOFT\MTCP for instance, and create a tcp.cfg file in it with the strings: PACKETINT 0x60 HOSTNAME FTP_IN_DOS The value of PACKETINT - the interrupt number used in the packet driver starting. The value of HOSTNAME - any. 7. Start DHCP.EXE (DHCP will set up mTCP for work with the network): DHCP 8. Start FTP: FTP [ FTP address / host ] There will be a prompt for a name, after that - the password. Next, it is better to switch to passive mode: XFERMODE PASSIVE [ The list of the main commands supported by FTP of mTCP is available in ftp.txt, included in mTCP suite archive ] To exit: QUIT mTCP - GNU GPL v3.

ELinks. Use

 

Jump to: ELinks - Text-based or console web browser. Description: features, screenshots, download links. ELinks. Configuration - How to configure ELinks. Once started, ELinks allows a user to do almost all it is capable of by means of its menu. So it is only how to start ELinks and how to do several other things as an example that is explained here. 1 ) Starting ELinks - ELinks may be run under a GUI environment (X Windows, MS Windows, etc) or some command-line interface. In the first case a terminal emulator / console must be opened before ELinks is to be started: xterm, rxvt, Win32 console and others: ELinks ( Linux ) - To start ELinks, enter command: elinks - To start ELinks opening a web document from Internet: elinks Web address of a web document - To start ELinks accessing hard disk to browse local folders: elinks file:/// or: elinks / - To start ELinks opening a local folder: elinks file:///home/user1/ or: elinks /home/user1/ - To start ELinks opening a local file: elinks file:///home/user1/document1.htm or: elinks /home/user1/document1.htm ELinks ( Windows ) - To start ELinks, enter command: elinks - To start ELinks opening a web document from Internet: elinks Web address of a web document - To start ELinks accessing hard disk to browse local folders: elinks file:/// - To start ELinks opening a local folder: elinks file://c/home/user1/ - To start ELinks opening a local file: elinks file://c/home/user1/document1.htm 2 ) To access the menu of ELinks: Press Esc on keyboard 3 ) Opening a web document in ELinks already running: Press g on keyboard or Esc --> File --> Go to URL --> [ Enter a web address ] --> Enter 4 ) Going back: Left arrow of Arrow keys on keyboard or Esc --> File --> Go back 5 ) Opening a link in a new tab in background: Shift - t or Esc --> Link --> Open in new tab in background 6 ) Going to the next tab: Shift - > or Esc --> View --> Next tab 7 ) Closing a tab: Press c on keyboard or Esc --> View --> Close tab 8 ) Passing a URI to an external application when running ELinks in a terminal emulator. There are many applications it is possible to pass a URI to, here it is about passing a URI to clipboard.