[%# $Id: delivery_status_notification.tt2 12737 2016-03-19 22:41:09Z sikeda $ ~%]
Content-Type: multipart/report; report-type=delivery-status; 
	boundary="[% boundary %]"
[% IF action == "delivered" -%]
Subject: [% FILTER qencode %][%|loc%]Message was successfully delivered[%END%][%END%]
[% ELSIF status == '4.2.1' -%]
Subject: [% FILTER qencode %][%|loc%]List could not be created[%END%][%END%]
[% ELSIF status == '4.2.4' -%]
Subject: [% FILTER qencode %][%|loc%]List unknown[%END%][%END%]
[% ELSIF status == '5.1.1' || status == '5.1.2' -%]
Subject: [% FILTER qencode %][%|loc%]List unknown[%END%][%END%]
[% ELSIF status == '5.2.3' -%]
Subject: [% FILTER qencode %][%|loc%]Too large message[%END%][%END%]
[% ELSIF status == '5.3.0' -%]
Subject: [% FILTER qencode %][%|loc%]Message distribution: Internal server error[%END%][%END%]
[% ELSIF status == '5.3.5' -%]
Subject: [% FILTER qencode %][%|loc%]Message distribution: User error[%END%][%END%]
[% ELSIF status == '5.6.0' -%]
Subject: [% FILTER qencode %][%|loc%]Message distribution: User error[%END%][%END%]
[% ELSIF status == '5.6.1' -%]
Subject: [% FILTER qencode %][%|loc%]Results of your commands[%END%][%END%]
[% ELSIF status == '5.6.5' -%]
Subject: [% FILTER qencode %][%|loc%]Cannot personalize message[%END%][%END%]
[% ELSIF status == '5.7.0' -%]
Subject: [% FILTER qencode %][%|loc%]A virus in your mail[%END%][%END%]
[% ELSIF status == '5.7.1' -%]
Subject: [% FILTER qencode %][%|loc%]Message distribution: Authorization denied[%END%][%END%]
[% ELSE -%]
Subject: [% FILTER qencode %][%|loc(action)%]Delivery Status Notification: %1[%END%][%END%]
[% END -%]
X-Loop: [% conf.email %]@[% conf.host %]

This is a MIME-encapsulated message.

--[% boundary %]
Content-Disposition: inline
Content-Description: Notification

[%|loc%]This is an automatic response sent by Sympa Mailing Lists Manager.[%END%]
[% IF action == "delivered" -%]
[%|loc%]Message was successfully delivered to following address:[%END%]

	[% recipient %]

[% ELSE -%]
[%|loc(recipient)%]Impossible to distribute your message for list '%1' for the following reason:[%END%]

[%   IF status == '4.2.1' -%]
[%|loc(listname)%]The %1 list could not be created.[%END%]

[%   ELSIF status == '4.2.4' -%]
[%|loc(listname)%]List '%1' does not exist.[%END%]

[%   ELSIF status == '5.1.2' -%]
[%|loc(recipient)%]List '%1' does not exist.[%END%]

[%   ELSIF status == '5.2.3' -%]
[%|loc(msg_size,max_size)%]Your message could not be sent because its size (%1 kB) was over the maximum size (%2 kB) allowed on this list.

Note: Because binary files have to be encoded in less-efficient ASCII format before being sent over email, the final size of an attachment is often significantly larger that the original file.[%END%]

[%   ELSIF status == '5.3.0' -%]
[% IF entry == 'forward' -%]
[%|loc(list.name,function)%]Impossible to forward your message to '%1-%2' because of an internal server error.[%END%]
[% ELSE -%]
[%|loc(list.name)%]Impossible to distribute your message for list '%1' because of an internal server error.[%END%]
[% END -%]

[%|loc(list.name,list.host)%]For further information, please contact %1-request@%2[%END -%]

[%   ELSIF status == '5.3.5' -%]
[%|loc(listname)%]The %1 list could not be created.[%END%]

[%|loc(conf.listmaster_email,conf.host)%]For further information, please contact %1@%2[%END%]

[%   ELSIF status == '5.6.0' -%]
[%|loc(list.name,"${conf.email}@${conf.host}",list.host,cmd)%]The following message was sent to list '%1' and it contains a line '%4' that can be interpreted as a command.

If your message contained a command (like subscribe, unsubscribe, help, index, get, ...), please note that commands should never be sent to lists. Commands must be sent to %2 exclusively.

If your message was really meant to be sent to the list, it was interpreted by the software as a command. Please contact the list owner:
  %1-request@%3
so that they can take care of your message.

Thank you for your attention.[%END%]

[%   ELSIF status == '5.6.1' -%]
[%|loc%]No command found in message.[%END%]

[%   ELSIF status == '5.6.5' -%]
[%|loc%]Your message cannot be personalized.  Please check template syntax.[%END%]

[%   ELSIF status == '5.7.0' -%]
    [%|loc%]***** V I R U S    A L E R T *****[%END%]

[%|loc(virus_name,recipient,sender)%]Our viruschecker found a virus named %1 in a message addressed to %2 and that seems to be yours (From: %3).[%END%]

[%|loc%]We stopped delivery of this email.[%END%]

[%|loc%]It may be useful to check your system for viruses.

Note, however, that many viruses fake sender's e-mail address, so it is possible that the virus didn't come from your computer. In that case, please disregard this message.[%END%]

[%   ELSIF status == '5.7.1' -%]
[%|loc(list.name)%]Your message for list '%1' (attached below) was rejected.
You are not allowed to send this message for the following reason:[%END%]

 [% PROCESS authorization_reject.tt2 -%]

[%|loc(list.name,list.host)%]For further information, please contact %1-request@%2[%END%]

[%   ELSE -%]
[%|loc%]The following address is not a known mailing list:[%END%]

	[% recipient %]

[%|loc%]To find out the correct listname, ask for this server's lists directory:[%END%]

	[% | mailtourl({subject => 'WHICH'}) ~%]
	  [% conf.email %]@[% conf.host %]
	[%~ END %]

[%|loc(conf.listmaster_email,conf.host)%]For further information, please contact %1@%2[%END%]

[%   END -%]
[% END -%]
--[% boundary %]
Content-Type: message/delivery-status

Reporting-MTA: dns; [% conf.host %]
Arrival-Date: [% date %]

Final-Recipient: rfc822; [% recipient %]
Action: [% action %]
Status: [% status %]
Remote-MTA: dns; [% conf.host %]
Diagnostic-Code: X-Sympa; [% diagnostic_code %]

--[% boundary %]
[%# Attach only header part of potentially unsafe contents. ~%]
[% IF status == '5.1.1' || status == '5.1.2'
   || status == '5.2.3' || status == '5.7.0' -%]
Content-Type: text/rfc822-headers
Content-Disposition: inline

[% header %]

[% ELSE -%]
Content-Type: message/rfc822
Content-Disposition: inline
X-Sympa-Attach: yes

[%# msg inserted here #%]

[% END -%]
--[% boundary %]--
