Wednesday, May 23, 2007

Error "<#5.5.2 smtp;554 5.5.2 Invalid data in message> #SMTP#" when you send attachment in your mail

Some users were receiving error <#5.5.2 smtp;554 5.5.2 Invalid data in message> #SMTP# when they sent message with attachment.

The problem is when attached document name is longer than 50 characters. Some Firewalls have header size restriction and that limit blocks this messages to be sent.

To correct this, change header limit on affected Firewall or shorten the name of the document you are sending (which is probably not good permanent solution).

******
Update #1: Default header size limit in Exchange 2007 is 64K.

Update #2: It might be the SMTP version problem. Mail is rejected with CONTENT-DISPOSITION error (overly long message header field for CONTENT-DISPOSITION) but not for all SMTP servers (same mail sent through different SMTP servers). If you send mail with attachment that has name longer than 50 characters from Exchange 2007 directly through DNS you may encounter this error, but if you send same mail from Exchange 2007 through smart host (other than Exchange) mail is delivered with no errors (possible workaround).

Update #3: There is a good article on Symantec's web site about parameters in Config.cf file. Check SMTP block/unblock possibilities.
Article:
http://service1.symantec.com/SUPPORT/ent-gate.nsf/pfdocs/2002031311321154?OpenDocument&ExpandSection=13%2C8

Update #4: Anonymous (*send me your name*) left a comment below regarding reasons for this error message:
"We found this was simply a matter that the message was created in Outlook "rich text" format (which embeds attachments into the message body) instead of plain text or HTML which creates attachments normally"

11 comments:

Anonymous said...

Thanks a lot! We were having this problem for some time and finally here's the answer.

Anonymous said...

Thanks! Solved it for me too :o)

Anonymous said...

It will solve the problem for us if we can know how to change the header limit in Symantec Gateway Firewall 5620.

Any Help?

Anonymous said...

Hi & thanx a lot. We are experiencing the same problem with a Symantec 1620 Gateway Security appliance. By any chance is there any update info available on this topic? Or any other workaround? Problem is, that since a few days even some inbound mail is dropped and it looks like exactly the same error.

Stefan

Dušan Košarić said...

Hi guys,
There is a good article on Symantec's web site about parameters in Config.cf file. Check SMTP block/unblock possibilities. :)

Article:
http://service1.symantec.com/SUPPORT/ent-gate.nsf/pfdocs/2002031311321154?OpenDocument&ExpandSection=13%2C8

Anonymous said...

We found this was simply a matter that the message was created in Outlook "rich text" format (which embeds attachments into the message body) instead of plain text or HTML which creates attachments normally.

Anonymous said...

Here is the solution for SGS 5620 und SGS 1620.

In the sgs console at "Administration" Advanced Options set this entries.

smtpd.max_body_line_length (value: 2048)
smtpd.scan_message_body (value:False)

save Configuration and activate it, for me it works :-)

Markus

Dušan Košarić said...

Thanks Markus for taking time to write this!

Anonymous said...

Thanks Markus, for me it works too !!

Bernd

Anonymous said...

Thank you Markus! Worked great!
Steve

Anonymous said...

Markus,

Thanks so much! I followed what you said and worked great! were getting the emails now.

Ron