Forum OpenACS Development: Mails within HTML get blocked

Collapse
Posted by Iuri Sampaio on
Sending emails with Postfix

I noticed that most of the emails within HTML tags on them get rejected by Godaddy's provider while 100% of the emails within plain-text go through.

I've cleaned HTML template, to guarantee it's 99% SPAM FREE compliant.

ad_proc acs-mail-lite::send sends plain text beautifully

Mail is handled by Postfix, relayed on Godaddy's mailserver using TLS security. See postfix logs

mail domain records, CNAME, TXT and etc are properly registered.

Does anybody have a clue what would be causing this high percentage of rejections?

Nov 9 11:58:49 evex postfix/smtp[11755]: SSL_connect:SSLv3/TLS read server session ticket
Nov 9 11:58:49 evex postfix/smtp[11755]: SSL_connect:SSLv3/TLS read change cipher spec
Nov 9 11:58:49 evex postfix/smtp[11755]: SSL_connect:SSLv3/TLS read finished
Nov 9 11:58:49 evex postfix/smtp[11755]: save session smtp&[smtpout.secureserver.net]:465&smtpout.secureserver.net&68.178.252.229&&B1DC433C1652F396C983F574D47ABB1839EB7E2614D691328EFD804DB620CB18 to smtp cache
Nov 9 11:58:49 evex postfix/tlsmgr[5464]: put smtp session id=smtp&[smtpout.secureserver.net]:465&smtpout.secureserver.net&68.178.252.229&&B1DC433C1652F396C983F574D47ABB1839EB7E2614D691328EFD804DB620CB18 [data 6089 bytes]
Nov 9 11:58:49 evex postfix/tlsmgr[5464]: write smtp TLS cache entry smtp&[smtpout.secureserver.net]:465&smtpout.secureserver.net&68.178.252.229&&B1DC433C1652F396C983F574D47ABB1839EB7E2614D691328EFD804DB620CB18: time=1541775529 [data 6089 bytes]
Nov 9 11:58:49 evex postfix/smtp[11755]: smtpout.secureserver.net[68.178.252.229]:465: subject_CN=smtpout.secureserver.net, issuer_CN=Starfield Secure Certificate Authority - G2, fingerprint=79:48:37:2D:0E:B7:BF:8D:D4:90:53:DF:DC:43:4E:30, pkey_fingerprint=A0:DF:3F:FD:56:E1:84:21:DB:B6:9F:72:F4:01:F2:1D
Nov 9 11:58:49 evex postfix/smtp[11755]: Trusted TLS connection established to smtpout.secureserver.net[68.178.252.229]:465: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Nov 9 11:58:49 evex postfix/smtp[11755]: 3B3DC51EDB: to=atendimento @ evex.co relay=smtpout.secureserver.net[68.178.252.229]:465, delay=0.46, delays=0.01/0/0.31/0.13, dsn=5.0.0, status=bounced (host smtpout.secureserver.net[68.178.252.229] said: 552 L8FFghVhZA4WP :: auth :: Message rejected for spam or virus content :: Please include this entire message when contacting support :: v=2.3 cv=Oc9J8SbY c=1 sm=1 tr=0 p=BGO7yyakAAAA:8 a=Xp6ji3KasT7i+LMBzo5W7w==:117 a=Xp6ji3KasT7i+LMBzo5W7w==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=JHtHm7312UAA:10 a=Pg7sR26a7hMA:10 a=ZZnuYtJkoWoA:10 a=zg8AQjdSLQuUT9AEzzQA:9 a=QEXdDO2ut3YA:10 a=-FEs8UIgK8oA:10 a=NWVoK91CQyQA:10 a=3j4BkbkPAAAA:8 a=BkpHzsgbAAAA:8 a=JbpjjJjtafLp9lnXn7MA:9 a=RE5iRO5Zuvrkw8GG:21 a=_W_S_7VecoQA:10 a=Zp58DnMGU-oA:10 a=AjzowaAh5UoA:10 a=kNbK02Q_BmEA:10 a=dRF5jd1ryHcA:10 a=BtCEdfKNbLKhV_53vcIA:22 a=p-dnK0njbqwfn1k4-x12:22 a=w-psBPLDDiCXbaeKGOsM:22 :: 100.00 (in reply to end of DATA command))
Nov 9 11:58:49 evex postfix/smtp[11755]: 3B3DC51EDB: to= iuri.sampaio gmail.com , relay=smtpout.secureserver.net[68.178.252.229]:465, delay=0.46, delays=0.01/0/0.31/0.13, dsn=5.0.0, status=bounced (host smtpout.secureserver.net[68.178.252.229] said: 552 L8FFghVhZA4WP :: auth :: Message rejected for spam or virus content :: Please include this entire message when contacting support :: v=2.3 cv=Oc9J8SbY c=1 sm=1 tr=0 p=BGO7yyakAAAA:8 a=Xp6ji3KasT7i+LMBzo5W7w==:117 a=Xp6ji3KasT7i+LMBzo5W7w==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=JHtHm7312UAA:10 a=Pg7sR26a7hMA:10 a=ZZnuYtJkoWoA:10 a=zg8AQjdSLQuUT9AEzzQA:9 a=QEXdDO2ut3YA:10 a=-FEs8UIgK8oA:10 a=NWVoK91CQyQA:10 a=3j4BkbkPAAAA:8 a=BkpHzsgbAAAA:8 a=JbpjjJjtafLp9lnXn7MA:9 a=RE5iRO5Zuvrkw8GG:21 a=_W_S_7VecoQA:10 a=Zp58DnMGU-oA:10 a=AjzowaAh5UoA:10 a=kNbK02Q_BmEA:10 a=dRF5jd1ryHcA:10 a=BtCEdfKNbLKhV_53vcIA:22 a=p-dnK0njbqwfn1k4-x12:22 a=w-psBPLDDiCXbaeKGOsM:22 :: 100.00 (in reply to end of DATA command))
Nov 9 11:58:49 evex postfix/cleanup[11763]: AED5D51EDD: message-id= 20181109145849.AED5D51EDD evex.co
Nov 9 11:58:49 evex postfix/bounce[11762]: 3B3DC51EDB: sender non-delivery notification: AED5D51EDD
Nov 9 11:58:49 evex postfix/qmgr[5460]: AED5D51EDD: from=<>, size=10196, nrcpt=1 (queue active)
Nov 9 11:58:49 evex postfix/qmgr[5460]: 3B3DC51EDB: removed
Nov 9 11:58:49 evex postfix/smtp[11756]: setting up TLS connection to smtpout.secureserver.net[173.201.192.229]:465
Nov 9 11:58:49 evex postfix/smtp[11756]: smtpout.secureserver.net[173.201.192.229]:465: TLS cipher list "aNULL:-aNULL:HIGH:MEDIUM:+RC4:@STRENGTH:!MD5:!aDSS:!SRP:!PSK:!aECDH:!aDH:!SEED:!IDEA:!RC2:!RC5:!eNULL"
Nov 9 11:58:49 evex postfix/smtp[11756]: looking for session smtp&[smtpout.secureserver.net]:465&smtpout.secureserver.net&173.201.192.229&&B1DC433C1652F396C983F574D47ABB1839EB7E2614D691328EFD804DB620CB18 in smtp cache
Nov 9 11:58:49 evex postfix/tlsmgr[5464]: lookup smtp session id=smtp&[smtpout.secureserver.net]:465&smtpout.secureserver.net&173.201.192.229&&B1DC433C1652F396C983F574D47ABB1839EB7E2614D691328EFD804DB620CB18
Nov 9 11:58:49 evex postfix/tlsmgr[5464]: read smtp TLS cache entry smtp&[smtpout.secureserver.net]:465&smtpout.secureserver.net&173.201.192.229&&B1DC433C1652F396C983F574D47ABB1839EB7E2614D691328EFD804DB620CB18: time=1541774905 [data 6089 bytes]
Nov 9 11:58:49 evex postfix/smtp[11756]: reloaded session smtp&[smtpout.secureserver.net]:465&smtpout.secureserver.net&173.201.192.229&&B1DC433C1652F396C983F574D47ABB1839EB7E2614D691328EFD804DB620CB18 from smtp cache
Nov 9 11:58:49 evex postfix/smtp[11756]: SSL_connect:before SSL initialization

Collapse
Posted by Benjamin Brink on
Hi Iuri,

The error message is SMTP 552. Try contacting support of the host that rejects the email. They may be able to provide an answer to these specific cases.

Have you tried posting the entire outbound email to the server log to verify it's attachments meet email protocol requirements?

Does the html version contain a url of a blacklisted website? A plain text url version of the url may pass, and a link/anchor version may not pass.

Support from the rejecting domain should be able to provide more specific information. For example, the text message associated with the error code may indicate a more specific cause that support can decipher.

best wishes,
Ben

Collapse
Posted by Iuri Sampaio on

Hi Ben,

I've tried to contact them more than once. Actually we'd discussed until hitting a dead end conversation.

The answer is they don't offer support to Postfix, and they don't seem to care.

Nevertheless, the rejection is intermittent. The very same HTML email and Postfix settings do work only for a few moments during the day. Mostly, it doesn`t

Regarding your question: "Does the html version contain a url of a blacklisted website?" Nope. There's only URL to the same domain evex.co. I've enabled "EmailDeliveryMode" parameter. See error.log bellow

Emails were working just fine two weeks ago. I've tried to paste the full log on checkspam.godaddy.com, but they support SPAM Free evaluations only for .eml and .msg. https://checkspam.godaddy.com/

I haven`t installed procmail yet in the server, to actually save the email in such format that got sent and received on Postifx.

[09/Nov/2018:13:53:11][4766.7f235dffb700][-conn:evex:19:20687-] Warning: /ecommerce/shopping-cart has no doc(title) set, fallback to instance_name. [09/Nov/2018:13:53:16][4766.7f235dffb700][-conn:evex:19:20689-] Notice: EVENTID 96905 [09/Nov/2018:13:53:16][4766.7f235dffb700][-conn:evex:19:20689-] Notice: SESSIONID 96905 [09/Nov/2018:13:53:16][4766.7f235dffb700][-conn:evex:19:20689-] Notice: SEND EMAIL TO iuri@iurix.com [09/Nov/2018:13:53:16][4766.7f235dffb700][-conn:evex:19:20689-] Notice: acs-mail-lite::send: logging email instead of sending


Envelope sender: bounce-32502-99CFF2FCEF6C7C076B517B0D3C056216DF529AB6-336@mail.evex.co

MIME-Version: 1.0 Content-ID: 4766.1541782396.69@evex.co message-id: 4766.1541782396.66@evex.co date: Fri, 09 Nov 2018 13:53:16 -0300 Subject: =?UTF-8?Q?EvEx-Solicita=C3=A7=C3=A3odeproposta:Confraterniza=C3=A7?= =?UTF-8?Q?=C3=A3odeFimdeAno.?= From: noreply@evex.co Reply-To: noreply@evex.co To: iuri@iurix.com CC: atendimento@evex.co Content-Type: multipart/alternative; boundary="----- =ODU5MTI4ODAyNjc3MTc4NEEyNEFEQzYzNDNGOUVGRkM="

------- =_ODU5MTI4ODAyNjc3MTc4NEEyNEFEQzYzNDNGOUVGRkM= MIME-Version: 1.0 Content-ID: 4766.1541782396.68@evex.co Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

EvEx =7C Notifica=E7=E3o de Solicita=E7=E3o de=20 Proposta p =7B color:=23585859; font-family: Verdana; =7D

=5BIMAGE: http://www.evex.co/themes/front/images/notificacao_marca.png = =5D

=5B1=5D http://www.evex.co=20 ------- =_ODU5MTI4ODAyNjc3MTc4NEEyNEFEQzYzNDNGOUVGRkM= MIME-Version: 1.0 Content-ID: 4766.1541782396.67 @ evex.co Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

<=21DOCTYPE html><html lang=3D=22pt-br=22>=20 meta charset=3D=22utf-8=22 <meta name=3D=22viewport=22 content=3D=22width=3Ddevice-width, initia= l-scale=3D1.0=22> <meta http-equiv=3D=22Content-Type=22 content=3D=22text/html; charset= =3DUTF-8=22 /> EvEx =7C Notificação de Solicitaçã= o de Proposta=20 <=21--/head-->=20 =20 <table cellpadding=3D=224=22 cellspacing=3D=224=22 width=3D=22100%=22= >=20 <td align=3D=22left=22> <a title=3D=22Link para o site EvEX=22 h= ref=3D=22http://www.evex.co=22><img title=3D=22Logo EvEx=22 =22alt=3D=22L= ogo EvEx=22 src=3D=22http://www.evex.co/themes/front/images/notificacaom= arca.png=22 width=3D=22200px=22>

<p style=3D=22text-align: left;=22 class=3D=22introtext=22>= Olá Iuri=21

<p style=3D=22text-align: left=22 class=3D=22intro= text=22>Tem evento novo no sal=C3=A3o com seu perfil=21

<p style=3D= =22text-align: left;line-height:20px;=22 class=3D=22introtext=22> solici= ta or=C3=A7amentos para seu evento. Você poderia atender?

= =20 <td align=3D=22left=22> <p class=3D=22introtext=22 style=3D=22co= lor:=23ed125f;=22>BRIEFING DO EVENTO

<p title=3D=22Nome=22>= Nome do Evento: Confraterniza=C3=A7=C3=A3o de Fim de Ano.

<p tit= le=3D=22Data de Inicio=22>In=C3=ADcio: 21 de Dezembro de 2018 08:0= 0 PM

<p title=3D=22Data Final=22>Término: 22 de Dezembr= o de 2018 06:00 PM

<p title=3D=22Descri=C3=A7=C3=A3o=22 style=3D=22li= ne-height:20px;=22>Categoria: Festas e Confraterniza=C3=A7=C3=B5es=
Detalhes: Confraterniza=C3=A7=C3=A3o Corporativa
Tipo:<= /b> Top =24=24
Or=C3=A7amento: 15.000,00
Servi=C3=A7o= s Solicitados:Aventura
Seu time em uma aventura com desafios, atividades em equipe, contato com = a natureza e muita descontra=C3=A7=C3=A3o
Participantes: 50 <br= >Descri=C3=A7=C3=A3o: Cota=C3=A7=C3=A3o para 50 funcion=C3=A1rios<= br>


<p title=3D=22Mensagem para clicar=22 style=3D=22color:= =23ed125f;line-height:20px;=22>Clique no bot=C3=A3o abaixo para ver ma= is detalhes da demanda e enviar uma mensagem ou proposta ao cliente dentr= o da plataforma EvEx.




<a href=3D=22https://evex.co/ev= entos/create-proposal?event
id=3D96905=22 style=3D=22background: =23FAA61= B;cursor: pointer; color: =23fff;border-style: solid; border-width: 1px; = border: 1px solid =23FAA61B;padding-left: 20px; padding-right: 20px; padd= ing-top: 10px; padding-bottom: 10px; border-radius: 10px;letter-spacing: = 1.5px; outline: none; font-weight: 500; font-size: 14.5px; text-decoratio= n:none=22>Atender Cliente


<p title=3D=22Orienta=C3=A7=C3= =A3o=22 style=3D=22color:=23ed125f;line-height:20px;=22>Ap=C3=B3s envi= o de mensagem ou proposta, voc=C3=AA ter=C3=A1 acesso ao e-mail e telefon= e do cliente.





<p title=3D=22Agradecimentos=22 style=3D=22text-align: left= ;line-height:20px;=22 class=3D=22introtext=22>Agradecemos a aten=C3=A7=C3= =A3o e aguardamos a sua proposta.

<p title=3D=22Sauda=C3=A7=C3=B5es= =22 style=3D=22text-align: left;=22 class=3D=22introtext=22>Desejamos um = EvEx maravilhoso=21

<p title=3D=22Assinatura=22 style=3D=22text-align= : left;=22 class=3D=22introtext=22>Time EvEx

=20 <td style=3D=22text-align: center;=22>
TUDO PARA SEU EVENT= O NA SUA M=C3=83O

=20 <td style=3D=22text-align:center;=22> <img src=3D=22http://www.evex.= co/themes/front/images/notificacaolinksrodape.png=22 usemap=3D=22=23rod= apelinks=22 /> =20 ------- =_ODU5MTI4ODAyNjc3MTc4NEEyNEFEQzYzNDNGOUVGRkM=--


Collapse
Posted by Iuri Sampaio on
REvising the post I noticed it's a bit confusing. So I decided to summarize as bellow.

# 1. Body as text/plain and email goes through;
Nov 10 12:41:35 evex postfix/smtp[29497]: 671A75196F: to= < iuri.sampaio @ gmail.com > , relay=smtpout.secureserver.net[173.201.192.229]:465, delay=0.47, delays=0.06/0.01/0.29/0.1, dsn=2.0.0, status=sent (250 L

# 2. Body as text/html and email bounces;
MX records are properly created. As well as SPF, DKIM and _DMARC records.

Godaddy complains about the logo within the html body. I removed the logo, but the email still gets rejected.

Nov 10 12:34:43 evex postfix/smtp[29372]: DBBC751954: to= < bounce-1700-72FE66917C917C25B5DCEDC1D79304D1B78EE324-336 @ mail.evex.co >, relay=smtpout.secureserver.net[68.178.252.101]:465, delay=0.34, delays=0.01/0/0.21/0.13, dsn=5.0.0, status=bounced (host smtpout.secureserver.net[68.178.252.101] said: 550 <> Sender Rejected - MAILFROM must be a valid domain. Ensure the mailfrom domain: "" has a valid MX or A record. (in reply to end of DATA command))

Collapse
Posted by Benjamin Brink on
Hi Iuri,

That last bit indicates the "Mail From" is empty:

status=bounced (host smtpout.secureserver.net[68.178.252.101] said: 550 <> Sender Rejected - MAILFROM must be a valid domain.

Compare the email headers on the rejected email, versus the original for clues. The headers contain a log of all the smtp related activity.

This URL may be helpful:

https://serverfault.com/questions/147921/forcing-the-from-address-when-postfix-relays-over-smtp

Otherwise consider posting at serverfault or one of the other stackexchange hosted admin sites to resolve.

best wishes,
Ben