Branch: Tag:

2008-02-21

2008-02-21 14:01:00 by Marcus Agehall <agehall@gmail.com>

Added code to ensure message data conforms to RFC2821 section 2.3.7

Rev: lib/modules/Protocols.pmod/SMTP.pmod:1.22

120:    cmd("DATA");       // Perform quoting according to RFC 2821 4.5.2. +  // and 2.3.7    if (sizeof(body) && body[0] == '.') {    body = "." + body;    } -  body = replace(body, "\r\n.", "\r\n.."); +  body = replace(body, ({ +  "\r\n.", +  "\r\n", +  "\r", +  "\n", +  }), +  ({ +  "\r\n..", +  "\r\n", +  "\r\n", +  "\r\n", +  }));       // RFC 2821 4.1.1.4:    // An extra <CRLF> MUST NOT be added, as that would cause an empty