메일은 다음과 같은 구조를 가지고 있습니다:
* #<Mail::Part:39500, Multipart: false, Headers: <MIME-Version: 1.0>, <Content-Type: text/plain; charset=us-ascii>, <Content-Transfer-Encoding: 7bit>, <Content-Disposition: inline>, <Content-ID: <6958bf289b75c_b28a46298091029@forum-01-app.mail>>>
"___…tor-relays 메일링 리스트…"
* #<Mail::Part:39520, Multipart: true, Headers: <Content-Type: multipart/signed; boundary="Sig_/gizYC_1dGsAzUHvksdaMIe2"; micalg=pgp-sha256; protocol="application/pgp-signature">, <Content-Transfer-Encoding: 7bit>>
* #<Mail::Part:39540, Multipart: false, Headers: <Content-Type: text/plain; charset=US-ASCII>, <Content-Transfer-Encoding: quoted-printable>>,
"On 02.01.2026…"
* #<Mail::Part:39560, Multipart: false, Headers: <Content-Type: text/plain; charset=UTF-8>, <Content-Transfer-Encoding: 7bit>>,
""
* #<Mail::Part:39580, Multipart: false, Headers: <Content-Type: text/plain; charset=US-ASCII>, <Content-Transfer-Encoding: quoted-printable>>,
"On 02.01.2026…"
* #<Mail::Part:39600, Multipart: false, Headers: <Content-Type: text/plain; charset=UTF-8>, <Content-Transfer-Encoding: 7bit>>,
""
* #<Mail::Part:39620, Multipart: false, Headers: <Content-Type: text/plain; charset=US-ASCII>, <Content-Transfer-Encoding: quoted-printable>>,
"On 02.01.2026…"
* #<Mail::Part:39640, Multipart: false, Headers: <Content-Type: text/plain; charset=UTF-8>, <Content-Transfer-Encoding: 7bit>>,
""
* #<Mail::Part:39660, Multipart: false, Headers: <Content-Type: text/plain; charset=US-ASCII>, <Content-Transfer-Encoding: quoted-printable>>,
"On 02.01.2026…"
* #<Mail::Part:39680, Multipart: false, Headers: <Content-Type: application/pgp-signature>, <Content-Description: Digitale Signatur von OpenPGP>>,
PGP 서명
* #<Mail::Part:39700, Multipart: false, Headers: <Content-Type: application/pgp-signature>, <Content-Transfer-Encoding: 7bit>, <Content-Description: Digitale Signatur von OpenPGP>>,
PGP 서명
* #<Mail::Part:39720, Multipart: false, Headers: <Content-Type: application/pgp-signature>, <Content-Transfer-Encoding: 7bit>, <Content-Description: Digitale Signatur von OpenPGP>>]
PGP 서명
(네, 실제 콘텐츠, 빈 콘텐츠, 그리고 PGP 서명이 각각 3개씩 있습니다)
첫 번째 text/plain 부분은 메일링 리스트 소프트웨어에 의해 추가되며, 다음과 같은 모습입니다:
_______________________________________________
tor-relays 메일링 리스트 -- tor-relays@lists.torproject.org
해지하려면 tor-relays-leave@lists.torproject.org으로 이메일을 보내세요
Discourse(실제로는 .text_part를 통한 mail gem)가 메시지의 내용으로 선택하는 것이 바로 이것입니다:
> puts mail.text_part.to_s
MIME-Version: 1.0
Content-Type: text/plain;
charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Content-ID: <6958bf289b75c_b28a46298091029@forum-01-app.mail>
_______________________________________________
tor-relays 메일링 리스트 -- tor-relays@lists.torproject.org
해지하려면 tor-relays-leave@lists.torproject.org으로 이메일을 보내세요
그리고 이것은 서명이 생략된 빈 본문으로 취급됩니다.
메일링 리스트에 의해 추가된 이 거의 빈 부분이 없었다면, Discourse는 게시글의 내용으로 다음과 같은 내용을 추출했을 것입니다:
> We received a court order to preserve the data on the system and were
> forbidden from informing the system owner, which was awkward since
> they had informed the system owner...
어떤 데이터를 요청했나요?
> Since then I've always run my exit on a separate system on it's own
> IP so if there were a legal demand to turn over "the system" it would
> really only be that system. I'm not a lawyer but I don't think docker
> provides enough isolation for that.
릴레이를 꺼달라고 거부할 수 있나요?
그렇다면 다른 IP로 새로운 "시스템"을 운영할 수 있습니다.
(아래는 생략된 부분)
On 02.01.2026 18:46 Jon via tor-relays <tor-relays@lists.torproject.org> wrote:
--
감사합니다
Marco
스팸은 abfall1767375998@stinkedores.dorfdsl.de로 보내주세요
여기서 Discourse의 메일 처리에 큰 하자를 찾기 어렵습니다 - 책임을 물을 필요가 있다면, 저는 실제로는 맨 앞에 빈 콘텐츠를 추가하는 메일링 리스트 소프트웨어부터 시작할 것입니다. 그것은 실제 메시지 이후인 끝에 위치하는 것이 더 적절했을 것입니다.
Mail gem에서는 이것이 작동했을 것이고, 메일 클라이언트에서도 더 잘 보였을 것입니다 - Thunderbird에서 처음 수신된 모습은 다음과 같습니다:
그리고 제 “수정” 버전 (test-fixed.eml.txt (14.3 KB))
메일링 리스트 서명을 맨 위가 아닌 맨 아래로 배치한 것입니다:
특정 IncomingEmail에 대해 게시글 내용으로 선택되었을 내용을 보고 싶다면, 다음을 실행하여 확인할 수 있습니다:
Email::Receiver.new(IncomingEmail.find(INCOMING_EMAIL_ID).raw).select_body