foxcpp / maddy

✉️ Composable all-in-one mail server.
https://maddy.email
GNU General Public License v3.0
5.17k stars 250 forks source link

Mail received, but no content #213

Closed hyahm closed 4 years ago

hyahm commented 4 years ago

this is send data, first line is content

2020-03-06 15:29:47 - [INFO] - hyahm.com - /data/mail/internal/smtpconn/smtpconn.go:316 - bWF5YmUgeW91IGNhbiBub3Qgc2VlIHRoaXMgbWVzc2FnZSE=

2020-03-06 15:29:47 - [INFO] - hyahm.com - /data/mail/internal/smtpconn/smtpconn.go:317 - Content-Transfer-Encoding: base64
2020-03-06 15:29:47 - [INFO] - hyahm.com - /data/mail/internal/smtpconn/smtpconn.go:318 - Content-Type: text/plain; charset="utf-8"
2020-03-06 15:29:47 - [INFO] - hyahm.com - /data/mail/internal/smtpconn/smtpconn.go:319 - Date: Fri, 6 Mar 2020 07:29:44 +0000
2020-03-06 15:29:47 - [INFO] - hyahm.com - /data/mail/internal/smtpconn/smtpconn.go:320 - Dkim-Signature: a=rsa-sha256; bh=u7ChVl/FZtCSiY2ytN7YwlIsnWVxgKxoFnbgxO1Uwh c=; c=relaxed/relaxed; d=hyahm.com; h=Subject:Subject:Sender:To:Cc:From:Fro m:Date:Date:MIME-Version:MIME-Version:Content-Type:Content-Type:Content-Tra nsfer-Encoding:Content-Transfer-Encoding:Reply-To:In-Reply-To:Message-Id:Me ssage-Id:References:Autocrypt:Openpgp; i=xiaobaishu@hyahm.com; s=default; t =1583479784; v=1; x=1583911784; b=NPmtS/M5o7GPlo1wtMb7RwUXIx/PPuPu+0Omc4Cr/ zd0teW58q5u0Cgp4+6Ou6hip2lXAEixVGFkNIZ8lB/8JdaHVBG5xvcX58a+wfimHGRmIPHbDu9F U2XZVuCAh0zLs9mF+Bfu0zzrBA5HeULJoId1pWv6Io6KspFN6vRQW/c23DlHWBBD3EX7AhZDTeo iRiEa1U9OiuzMn9mfo+gDNJXXfxe8UHSGuUSWsaBxxPZ5a4M72bAfrrrHK4UXAT5a15u9arIP9x gEYwHNN5uNdBbCXNLYQcHLSWaRAT5esa6q80ot1CqKCuDwC36hqCKtv4KUK3nPsvUgp4vtfHeQC g==;
2020-03-06 15:29:47 - [INFO] - hyahm.com - /data/mail/internal/smtpconn/smtpconn.go:321 - From: xiaobaishu@hyahm.com
2020-03-06 15:29:47 - [INFO] - hyahm.com - /data/mail/internal/smtpconn/smtpconn.go:322 - Message-Id: <51e85c99-12ca-442f-b686-c7c05344e838@smtp.hyahm.com>
2020-03-06 15:29:47 - [INFO] - hyahm.com - /data/mail/internal/smtpconn/smtpconn.go:323 - Mime-Version: 1.0
2020-03-06 15:29:47 - [INFO] - hyahm.com - /data/mail/internal/smtpconn/smtpconn.go:324 - Received:  by smtp.hyahm.com (envelope-sender <xiaobaishu@hyahm.com>) with ESMTPS id a95fe02b; Fri, 06 Mar 2020 15:29:44 +0800
2020-03-06 15:29:47 - [INFO] - hyahm.com - /data/mail/internal/smtpconn/smtpconn.go:325 - Subject: =?utf-8?b?6aqM6K+B5L2g55qE55S15a2Q6YKu566x5Zyw5Z2A?=
foxcpp commented 4 years ago

Can you at least provide server logs? Also steps to reproduce.

foxcpp commented 4 years ago

Also, clarify the problem you are having. I made a guess that maddy is not sending the message body to remote servers, but that does not seem to be the case, at least in the basic scenario shown below.

SMTP session with maddy Submission endpoint ``` EHLO localhost AUTH PLAIN AHhpYW9iYWlzaHVAaHlhaG0uY29tAHRlc3Q= MAIL FROM: RCPT TO: DATA Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8" Date: Fri, 6 Mar 2020 07:29:44 +0000 From: xiaobaishu@hyahm.com Message-Id: <51e85c99-12ca-442f-b686-c7c05344e838@smtp.hyahm.com> Mime-Version: 1.0 Received: by smtp.hyahm.com (envelope-sender ) with ESMTPS id a95fe02b; Fri, 06 Mar 2020 15:29:44 +0800 Subject: =?utf-8?b?6aqM6K+B5L2g55qE55S15a2Q6YKu566x5Zyw5Z2A?= bWF5YmUgeW91IGNhbiBub3Qgc2VlIHRoaXMgbWVzc2FnZSE= . QUIT ```
Received by the remote server ``` 2020/03/06 23:43:29 Mail from: xiaobaishu@hyahm.com 2020/03/06 23:43:29 Rcpt to: test@maddy.test 2020/03/06 23:43:29 Data: DKIM-Signature: a=rsa-sha256; bh=u7ChVl/FZtCSiY2ytN7YwlIsnWVxgKxoFnbgxO1Uwh c=; c=relaxed/relaxed; d=hyahm.com; h=Subject:Subject:Sender:To:Cc:From:Fro m:Date:Date:MIME-Version:MIME-Version:Content-Type:Content-Type:Content-Tra nsfer-Encoding:Content-Transfer-Encoding:Reply-To:In-Reply-To:Message-Id:Me ssage-Id:References:Autocrypt:Openpgp; i=xiaobaishu@hyahm.com; s=default; t =1583527409; v=1; x=1583959409; b=UGmq/+R1r13sYfJ3eLdgkjNH6Gl2714xbka8DiHHm ts+M4vEzg3nF5uPGPa01spTmVJ/32MghWi28GsGcGzifp6IRpOrGhzYsHn39Go3PhaTaV7Ik3Tx DHFyrAA4kqM4E2KRLDDXSR7zJRatLqa+zHeZ9HuaquEk5Kjg8TJzmPhRzGIUgovcLZbAiv0npOj B0qtPjXm+zly1YNl/DjPLE36+DuYKj3efhh6fp0TvHyV/zDkKBE8m/H0F031ldY7ZbyY63NUXZB 5d4nVD9Xc2puFycOApVmery7DSnfT7tIdGS0BqMYXNYLG3J6XZOk769xqmP1Yf0Cz2IyJRaEbG9 g==; Received: by (envelope-sender ) with ESMTP id a2f15424; Fri, 06 Mar 2020 23:43:29 +0300 Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8" Date: Fri, 6 Mar 2020 07:29:44 +0000 From: xiaobaishu@hyahm.com Message-Id: <51e85c99-12ca-442f-b686-c7c05344e838@smtp.hyahm.com> Mime-Version: 1.0 Received: by smtp.hyahm.com (envelope-sender ) with ESMTPS id a95fe02b; Fri, 06 Mar 2020 15:29:44 +0800 Subject: =?utf-8?b?6aqM6K+B5L2g55qE55S15a2Q6YKu566x5Zyw5Z2A?= bWF5YmUgeW91IGNhbiBub3Qgc2VlIHRoaXMgbWVzc2FnZSE= ```
foxcpp commented 4 years ago
submission: DATA error  {"modifier":"submission_prepare","msg_id":"5121835e","reason":"Message does not contains a From header field","smtp_code":554,"smtp_enchcode":"5.6.0","smtp_msg":"Message does not contains a From header field"}

I am unable to reproduce that error message. Message generated by your client code definitely contains a From field.

2020-03-07 09:57:56 - [INFO] - hyahm.com - /data/mail/internal/endpoint/smtp/smtp.go:337 - data: Content-Type: text/plain; charset="utf-8"

What are these messages? Did you modify maddy source? If so, I am unable to provide any assistance without knowing about changes made.

hyahm commented 4 years ago

Solved. thanks