explanation for attachments disappearing

Mark Martinec Mark.Martinec+amavis at ijs.si
Wed May 11 14:07:58 CEST 2011


(I already replied off-list, here is a copy for the archive):


Juanjo,

> In old SMTP, a line with only one character
> -being that sole character a dot- conventionally
> signals the end of the message.

Not just old SMTP, it is still a requirement of the protocol,
see RFC 5321 section 4.5.2:

4.5.2.  Transparency

   Without some provision for data transparency, the character sequence
   "<CRLF>.<CRLF>" ends the mail text and cannot be sent by the user.
   In general, users are not aware of such "forbidden" sequences.  To
   allow all user composed text to be transmitted transparently, the
   following procedures are used:

   o  Before sending a line of mail text, the SMTP client checks the
      first character of the line.  If it is a period, one additional
      period is inserted at the beginning of the line.

   o  When a line of mail text is received by the SMTP server, it checks
      the line.  If the line is composed of a single period, it is
      treated as the end of mail indicator.  If the first character is a
      period and there are other characters on the line, the first
      character is deleted.


> Amavis (or postfix, I am not sure) seems to
> obey that, and truncates the message at that point.

They both do that, also sendmail, exim, as any other RFC-compliant mailer.

> Whatever comes after, gets lost.

Whatever comes after is interpreted as an SMTP command.

> Attachments and all.

Nothing get lost, an SMTP client needs to do dot stuffing,
i.e. duplication of leading dots, as required by the SMTP protocol.

> This could explain similar phenomena experienced by
> other people with the same setup :
> 
> Debian Squeeze with postfix 2.7.1-1
> and Amavis vers. 1:2.6.4-3

Only on non-RFC compliant SMTP clients.
Something is broken with the sw or its usage
if one is experiencing such problem.

On mail submission via a sendmail-like command line utility,
do not forget to specify option -i.

> I write to this list to :
> - ask users to experiment with it

> - ask for a way to contact amavis developers

That would be me.

> Please answer with Cc. to juanjo at eurogaran.com
> since I am not subscribed to this list.

  Mark


More information about the amavis-users mailing list