inverse-inc / packetfence

PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) solution. Boasting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, powerful BYOD management options, 802.1X support, layer-2 isolation of problematic devices; PacketFence can be used to effectively secure networks small to very large heterogeneous networks.
https://packetfence.org
GNU General Public License v2.0
1.37k stars 287 forks source link

SMS email has "Bare Line Feed Characters" Status code: 550 5.6.11 #5380

Closed rdm128 closed 2 years ago

rdm128 commented 4 years ago

Describe the bug SMS to email failing for certain MTA's because the message body ends with \n and needs to be \r\n /lib/pf/Authentication/Source/SMSSource.pm

To Reproduce Steps to reproduce the behavior:

  1. added sms.clicksend.com as SMS Gateway to db
  2. Sent a test SMS through the new gateway
  3. Received a bounce message

Screenshots No screenshot, but here's text from the bounce. "This error occurs when the email program or device used to create or send an email message adds bare line feed characters into the message. When bare line feed characters are included in a message, the SMTP protocol chunking feature is required to transmit the message between email servers. Chunking uses the SMTP protocol BDAT command, but the recipient's email server doesn't support the BDAT command."

Expected behavior Message should have been received by clicksend MTA and delivered to SMS carriers

nqb commented 4 years ago

I found this: https://docs.microsoft.com/en-us/exchange/mail-flow-best-practices/non-delivery-reports-in-exchange-online/fix-error-code-550-5-6-11-in-exchange-online

It seems to be specific to Office 365 server but I'm not sure it's a standard.

nqb commented 4 years ago

@cgx and @extrafu, in SOGo, do you send a LF or CRLF at end of emails ?

F5Brewery commented 2 years ago

I upgraded to 11.3, I noticed that this is still an issue. Indeed it is connected to O365, but it was a feature disabled for security reasons, could be others will follow suit. It would seem that all LF need to be changed CRLF. I would go in and fix this, but I am not sure where or how the message is constructed.

nqb commented 2 years ago

@F5Brewery, I create a PR for this issue see #6950

F5Brewery commented 2 years ago

Thank you for this. I tested this fix on my system and it resolved the issue!

Jeremy Yoke


From: Nicolas Quiniou-Briand @.> Sent: Monday, March 28, 2022 2:11:39 AM To: inverse-inc/packetfence @.> Cc: F5Brewery @.>; Mention @.> Subject: Re: [inverse-inc/packetfence] SMS email has "Bare Line Feed Characters" Status code: 550 5.6.11 (#5380)

@F5Breweryhttps://github.com/F5Brewery, I create a PR for this issue see #6950https://github.com/inverse-inc/packetfence/pull/6950

— Reply to this email directly, view it on GitHubhttps://github.com/inverse-inc/packetfence/issues/5380#issuecomment-1080238985, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACSWX6RQT4KSVZXTIMWWBLLVCFERXANCNFSM4MOU7PZQ. You are receiving this because you were mentioned.Message ID: @.***>