Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /usr/share/doc/dovecot-core/wiki/ drwxr-xr-x |
Viewing file: Select action/file-type: Teapop 0.3.8 ============ *WARNING: Badly done migration will cause your IMAP and/or POP3 clients to re-download all mails. Read <Migration.txt> page first carefully.* First at all sorry for my bad English. At work I had to migrate our existing teapop/mbox setup to Dovecot/Maildir without change the UIDL. At first I think I must set the option pop3_uidl_format to %Mf. But this doesn't work because Teapop use different algorithm. So the only way I found was to set the X-UIDL in the mbox and then use the mb2md script. My Co-worker Robert (many thanks for programming the script) and I use the following script: ---%<------------------------------------------------------------------------- #!/usr/bin/perl use Digest::MD5; $context = Digest::MD5->new; $gotmail = 0; $counter = 1; @mail = (); while (<>) { $line = $_; if(/^From /) { if ($gotmail) { processMail (); $counter++; $context->reset(); @mail = (); } $gotmail = 1; } push (@mail, $line); next if ($line =~ /^(Status|X-Status|Lines|Content-Length): /); $context->add($line); } if ($gotmail) { processMail (); } else { print STDERR "Mailbox is empty!\n"; } sub processMail () { if ($#mail > 2) { print shift(@mail); print shift(@mail); print "X-UIDL: " . $context->hexdigest() . "\n"; foreach $l (@mail) { print $l; } } else { print STDERR "Email has less then 3 lines!\n"; } } ---%<------------------------------------------------------------------------- Usage: scriptname $mboxfile > $newbox The script read the mbox file and generate the MD5 sum, if the line don't start with Status,X-Status,Lines and Content-Length, for each mail and insert the X-UIDL: after the Return-Path line. After that you can use the mb2md script.Important: You must set the 'pop3_reuse_xuidl=yes'. (This file was created from the wiki on 2019-06-19 12:42) |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0043 ]-- |