I took out <to>unaltered</to>. It initializes correctly as expected.

However there is another problem, now I have an endless loop. The symptom is
obviously that the Redirects reinserts the message to the spool. I am not
sure, if this is the intended behaviour in this case, or only an accident.
If you look at the attached message the body seems to be recursively
included, this is surprising.



  <mailet match="[EMAIL PROTECTED]" class="Redirect">
    <static>true</static>
    <prefix>[SPAM blackholes-easynet-nl]</prefix>
    <passThrough>true</passThrough>
  </mailet>






----- Original Message ----- 
From: "Vincenzo Gianferrari Pini" <[EMAIL PROTECTED]>
To: "James Developers List" <[EMAIL PROTECTED]>
Sent: Tuesday, June 24, 2003 7:07 PM
Subject: RE: subject prefix mailet or unaltered recipients in Redirect


I'm just now adding systematically to most places the "unaltered" value as
acceptable, and behaving like not coding the parameter (i.e. null).

For backward compatibility, in Redirect the logic is to use <recipients>,
*if null use <to>*, if null no change.
I found an error in the current code: if <recipients> is null, will use
<to>; <to> can be "unaltered",  but <recipients> can not be "unaltered", so
you get the error.

As now <recipients> will accept "unaltered", it will work.

In the meantime, just take out the <to>unaltered</to> line from your
config.xml: it is redundant.

Vincenzo

> -----Original Message-----
> From: Hontvari Jozsef [mailto:[EMAIL PROTECTED]
> Sent: martedi 24 giugno 2003 18.39
> To: James Developers List
> Subject: Re: subject prefix mailet or unaltered recipients in Redirect
>
>
> I tried it but it is not working. Looking at the source it seems
> to me that
> it follows the original class description.
>
> I used the following test:
>   <mailet match="[EMAIL PROTECTED]" class="Redirect">
>     <static>true</static>
>     <prefix>[SPAM blackholes-easynet-nl]</prefix>
>     <to>unaltered</to>
>     <passThrough>true</passThrough>
>    </mailet>
>
> This throws an exception at initialization saying that
> "Special ("magic") address found not allowed: unaltered, allowed
> values are
> "[postmaster,sender,returnPath]""
>
> The reason is that if the "recipients" parameter is not supplied
> it uses the
> "to" parameter. The "to" parameter contains "unaltered" in my case. But
> unaltered is not allowed in recipients.
>
> Here is the relevant code part:
>
>     protected Collection getRecipients() throws MessagingException {
>         Collection newRecipients = new HashSet();
>         String addressList = (getInitParameter("recipients") == null)
>                                  ? getInitParameter("to")
>                                  : getInitParameter("recipients");
>         // if nothing was specified, return null meaning no change
>         if (addressList == null) {
>             return null;
>         }
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--- Begin Message ---
Message:
------=_Part_10_14801602.1056475215500
Content-Type: multipart/alternative; 
        boundary="----=_Part_11_31534957.1056475215500"

------=_Part_11_31534957.1056475215500
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


Message:
------=_Part_8_12470752.1056475215093
Content-Type: multipart/alternative; 
        boundary="----=_Part_9_14949315.1056475215093"

------=_Part_9_14949315.1056475215093
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


Message:
------=_Part_6_1465214.1056475214906
Content-Type: multipart/alternative; 
        boundary="----=_Part_7_30462244.1056475214906"

------=_Part_7_30462244.1056475214906
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


Message:
------=_Part_4_19255406.1056475213671
Content-Type: multipart/alternative; 
        boundary="----=_Part_5_26670261.1056475213671"

------=_Part_5_26670261.1056475213671
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


Message:
------=_Part_2_21559496.1056475213343
Content-Type: multipart/alternative; 
        boundary="----=_Part_3_29705835.1056475213343"

------=_Part_3_29705835.1056475213343
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


Message:
------=_Part_0_10233621.1056475213109
Content-Type: multipart/alternative; 
        boundary="----=_Part_1_30008954.1056475213109"

------=_Part_1_30008954.1056475213109
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


Message:
szi=F3ka2



------=_Part_1_30008954.1056475213109--

------=_Part_0_10233621.1056475213109--


------=_Part_3_29705835.1056475213343--

------=_Part_2_21559496.1056475213343--


------=_Part_5_26670261.1056475213671--

------=_Part_4_19255406.1056475213671--


------=_Part_7_30462244.1056475214906--

------=_Part_6_1465214.1056475214906--


------=_Part_9_14949315.1056475215093--

------=_Part_8_12470752.1056475215093--


------=_Part_11_31534957.1056475215500--

------=_Part_10_14801602.1056475215500--


--- End Message ---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to