Python3, отправляю мыло через свой postfix. При отправке вижу, что вложение прикрепляется (логгирование выставил в debug). В логах
mail# tail mail.log
May 17 13:19:17 mail postfix/smtpd[15996]: connect from unknown[192.168.199.200]
May 17 13:19:18 mail postfix/smtpd[15996]: 836CFACD46: client=unknown[192.168.199.200]
May 17 13:19:21 mail postfix/cleanup[15999]: 836CFACD46: message-id=<>
May 17 13:19:22 mail opendkim[30071]: 836CFACD46: [192.168.199.200] [192.168.199.200] not internal
May 17 13:19:22 mail opendkim[30071]: 836CFACD46: not authenticated
May 17 13:19:27 mail postfix/qmgr[14965]: 836CFACD46: from=<mail@mail2send.tk>, size=2922436, nrcpt=1 (queue active)
May 17 13:19:27 mail postfix/smtpd[15996]: disconnect from unknown[192.168.199.200]
May 17 13:19:58 mail postfix/smtp[16000]: connect to gmail-smtp-in.l.google.com[2a00:1450:4010:c02::1b]:25: Connection timed out
May 17 13:20:01 mail postfix/smtp[16000]: 836CFACD46: to=<mail4bvn@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.205.27]:25, delay=43, delays=9.3/0.02/31/2.3, dsn=2.0.0, status=sent (250 2.0.0 OK 1495016401 o28si808723lfc.319 - gsmtp)
May 17 13:20:01 mail postfix/qmgr[14965]: 836CFACD46: removed
Ничего, вроде бы, криминального...
Но письмо пришло без вложения:
Content-Type: multipart/alternative; boundary="===============1145899944397147488=="
--===============1145899944397147488==
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
<h1><span style="font-size: large;">another </span><strong style="font-size: large;">simple </strong><span style="font-size: large;">test is </span><span style="font-size: large; font-family: monospace;">here </span><span style="font-size: large; font-family: monospace; color: rgb(0, 102, 204);">YEEEEEAAAAAAHHHHHH</span><span style="font-size: large; font-family: monospace;">!!!!!</span></h1>
--===============1145899944397147488==
Content-Type: application/octet-stream;
--===============1145899944397147488==--