Skip to content

Instantly share code, notes, and snippets.

@snipsnipsnip
Last active August 24, 2019 16:14
Show Gist options
  • Save snipsnipsnip/2500845 to your computer and use it in GitHub Desktop.
Save snipsnipsnip/2500845 to your computer and use it in GitHub Desktop.
npopからgmailにエクスポート (exporting mails from npop to gmail)
# 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
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