You are not logged in.

#1 2019-01-04 15:00:06

1ndeed
Member
Registered: 2018-09-28
Posts: 41

[SOLVED] How to read the mail file in ~/Mailbox/ ???

I just build a domain mail server with postfix . If I use the default mail app in mac os or mail -s subject user@domain <<< "main content" to send e-mails to it , it could receive them well . Then I open the file at ~/Mailbox/new/*.one , I can see the "Subject: ***" and main content at the end of the file .
But , if I open qq mail website to send another e-mail , and open it ... I can still be able to see the Subject , But the main content became strange words like this:

SSBsb3ZlIHlvdSB+fn4KSSBsb3ZlIHlvdSB+fn4KSSBsb3ZlIHlvdSB+fn4KSSBsb3ZlIHlv
dSB+fn4KSSBsb3ZlIHlvdSB+fn4KSSBsb3ZlIHlvdSB+fn4KSSBsb3ZlIHlvdSB+fn4KsKLJ
rcvJtbq3orXEyse/1r7lus3Ap7vzCrCiya3LybW6t6K1xMrHv9a+5brNwKe78wqwosmty8m1
ureitcTKx7/WvuW6zcCnu/MKsKLJrcvJtbq3orXEyse/1r7lus3Ap7vz

if I run this:

mutt -f ~/Mailbox

They can still be read fine . But what if I want to build a script to read the inbox then react to it ? mutt won't work here .
So is this some kind of encryption ??? How can I crack it ?

Last edited by 1ndeed (2019-01-04 16:05:52)

Offline

#2 2019-01-04 15:23:22

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

You reveal the name of your love, I tell you how to "decrypt" this :-P

Offline

#3 2019-01-04 15:26:07

1ndeed
Member
Registered: 2018-09-28
Posts: 41

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

Oh ... I shouldn't post such a massage ...

seth wrote:

You reveal the name of your love, I tell you how to "decrypt" this :-P

Offline

#4 2019-01-04 15:27:52

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

"massage " is a Freudian typo?

This is base64 encoded, try piping it into "base64 -d"

Offline

#5 2019-01-04 15:44:55

1ndeed
Member
Registered: 2018-09-28
Posts: 41

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

But I couldn't decrypt the Chinese characters , Is it the encode ? How do I solve that ?

seth wrote:

"massage " is a Freudian typo?

This is base64 encoded, try piping it into "base64 -d"

Offline

#6 2019-01-04 15:49:17

1ndeed
Member
Registered: 2018-09-28
Posts: 41

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

It's something like this:

?ҲŲ??????㡣

Offline

#7 2019-01-04 15:49:54

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

Is this actual text?

echo '°¢ɭËɵº·¢µÄÊǿ־åºÍÀ§»ó' | iconv -f UTF-16BE

Or this?

echo '°¢ɭËɵº·¢µÄÊǿ־åºÍÀ§»ó' | iconv -f UTF-16LE

Offline

#8 2019-01-04 15:53:13

1ndeed
Member
Registered: 2018-09-28
Posts: 41

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

no , it's not . It seems to be a complicated problem ...

seth wrote:

Is this actual text?

echo '°¢ɭËɵº·¢µÄÊǿ־åºÍÀ§»ó' | iconv -f UTF-16BE

Or this?

echo '°¢ɭËɵº·¢µÄÊǿ־åºÍÀ§»ó' | iconv -f UTF-16LE

Offline

#9 2019-01-04 15:56:32

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

Can you paste the complete mailfile? (The encodings should be listed in the multipart header)

Offline

#10 2019-01-04 16:00:17

1ndeed
Member
Registered: 2018-09-28
Posts: 41

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

here it is :

From: 
To: 
Subject: The First Contact to Base
Mime-Version: 1.0
Content-Type: text/plain;
	charset="gb18030"
Content-Transfer-Encoding: base64
Date: Fri, 4 Jan 2019 15:37:09 +0800
X-Priority: 3
Message-ID: 
X-QQ-MIME: TCMime 1.0 by Tencent
X-Mailer: QQMail 2.x
X-QQ-Mailer: QQMail 2.x
X-QQ-SENDSIZE: 520
Received: from qq.com (unknown [127.0.0.1])
	by smtp.qq.com (ESMTP) with SMTP
	id ; Fri, 04 Jan 2019 15:37:13 +0800 (CST)
Feedback-ID: webmail:qq.com:bgweb:bgweb3

SSBsb3ZlIHlvdSB+fn4KSSBsb3ZlIHlvdSB+fn4KSSBsb3ZlIHlvdSB+fn4KSSBsb3ZlIHlv
dSB+fn4KSSBsb3ZlIHlvdSB+fn4KSSBsb3ZlIHlvdSB+fn4KSSBsb3ZlIHlvdSB+fn4KsKLJ
rcvJtbq3orXEyse/1r7lus3Ap7vzCrCiya3LybW6t6K1xMrHv9a+5brNwKe78wqwosmty8m1
ureitcTKx7/WvuW6zcCnu/MKsKLJrcvJtbq3orXEyse/1r7lus3Ap7vz

Offline

#11 2019-01-04 16:04:48

1ndeed
Member
Registered: 2018-09-28
Posts: 41

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

$ iconv -f gb18030 -t utf-8 ./e.txt && echo ""
I love you ~~~
I love you ~~~
I love you ~~~
I love you ~~~
I love you ~~~
I love you ~~~
I love you ~~~
阿森松岛发的是恐惧和困惑
阿森松岛发的是恐惧和困惑
阿森松岛发的是恐惧和困惑
阿森松岛发的是恐惧和困惑

Thank you so much , you really help me a lot !!!!

Offline

#12 2019-01-04 16:10:46

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,932
Website

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

bytes_ = b'\xb0\xa2\xc9\xad\xcb\xc9\xb5\xba\xb7\xa2\xb5\xc4\xca\xc7\xbf\xd6\xbe\xe5\xba\xcd\xc0\xa7\xbb\xf3\n\xb0\xa2\xc9\xad\xcb\xc9\xb5\xba\xb7\xa2\xb5\xc4\xca\xc7\xbf\xd6\xbe\xe5\xba\xcd\xc0\xa7\xbb\xf3\n\xb0\xa2\xc9\xad\xcb\xc9\xb5\xba\xb7\xa2\xb5\xc4\xca\xc7\xbf\xd6\xbe\xe5\xba\xcd\xc0\xa7\xbb\xf3\n\xb0\xa2\xc9\xad\xcb\xc9\xb5\xba\xb7\xa2\xb5\xc4\xca\xc7\xbf\xd6\xbe\xe5\xba\xcd\xc0\xa7\xbb\xf3
bytes_.decode('gb18030')
'阿森松岛发的是恐惧和困惑\n阿森松岛发的是恐惧和困惑\n阿森松岛发的是恐惧和困惑\n阿森松岛发的是恐惧和困惑'

Edit: Too slow.

Last edited by schard (2019-01-04 16:11:03)

Offline

#13 2019-01-04 16:12:07

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

Time to pay off and reveal your love ;-P

Offline

#14 2019-01-04 16:17:45

1ndeed
Member
Registered: 2018-09-28
Posts: 41

Re: [SOLVED] How to read the mail file in ~/Mailbox/ ???

It's too loud here ... I can't hear you ... I'm in an elevator , I have to ... ...

seth wrote:

Time to pay off and reveal your love ;-P

Offline

Board footer

Powered by FluxBB