Last active
August 24, 2019 16:14
-
-
Save snipsnipsnip/2500845 to your computer and use it in GitHub Desktop.
npopからgmailにエクスポート (exporting mails from npop to gmail)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tweaked from http://d.hatena.ne.jp/auto_ptr/20060403#1144110624 | |
require 'time' | |
require 'kconv' | |
d = [] | |
time = nil | |
ARGF.each_line do |line| | |
case line | |
when /^\.$/ | |
puts "From - #{time.rfc822}" | |
puts d.join.tojis | |
d.clear | |
when /^Date\: (.+)$/ | |
time = Time.parse($1) | |
else | |
d.push line | |
end | |
end | |
puts d.join.tojis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. dat2thunderbird.rb で SaveBox.dat なり SendBox.dat なりをmboxもどきに変換 | |
2. 変換したファイルを ThunderBird の $profile/Mail/Local folders に置く | |
3. ThunderBirdを起動し、gmailのIMAPに接続 | |
4. gmail側に新たなフォルダを作る | |
5. ローカルのメールボックスから全選択してgmailのフォルダにコピー | |
(フォルダごとドラッグではなぜか反応しないため) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment