EEM violates RFC 822

Justin sent me an interesting problem description:

Emails that come from EEM don't have a body, it just puts anything after the body keyword in the subject.

I quickly wrote a simple EEM applet ...

event manager applet MailTest
 event none
 action 1 mail server "10.0.0.10" to "c@d" from "a@b" →
  subject "eeee" body "ffff"

... and started it with event manager run MailTest. The simple SMTP server I'm using for debugging EEM printed out the following message content:

Incoming mail ... from 10.0.0.1 received
From: <a@b>
To:   <c@d>

Date: Fri, 01 Mar 2002 00:01:34 +0000
Message-ID: <00002002000135003@R1>
From: a@b
To: c@d
Subject: eeee
ffff

As you can see, there is no empty line between the Subject header and the message body. A quick look in RFC 822 confirmed that there should be an empty line separating headers from the message body:

message =  fields *( CRLF *text )

Conclusion: EEM is not RFC822-compliant e-mail client.

Hint to EEM developers: if it works with sendmail, it's not necessarily correct.

This article is part of You've asked for it series.

1 comment:

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.