LoginSignup
0
0

サーバー内のメールを読めるように変換する

Posted at

メールが正常に受信出来ていない時に、メールサーバ内にあるメールを読みたいのに、いざ開いてみたら読めなかった時に読む方法。

iconv -f 変換前文字コード -t 変換先文字コード /path/to/before_convert_mail > /path/to/after_convert_mail.txt

変換前の文字コードは変換前のメールを開いてContent-Typeのcharsetを見れば良いのかなと。
読めない時はだいたいISO-2022-JPだと思うので、

iconv -f ISO-2022-JP -t UTF-8 /path/to/before_convert_mail > /path/to/after_convert_mail.txt

で大丈夫だと考えますが、念の為確認しましょう。
あと、変換して読んだファイルは削除しておきましょう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0