james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hontvari Jozsef" <hontva...@solware.com>
Subject Re: subject prefix mailet or unaltered recipients in Redirect
Date Tue, 24 Jun 2003 17:50:40 GMT
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="RecipientIs=xxx@flyordie.com" class="Redirect">
    <prefix>[SPAM blackholes-easynet-nl]</prefix>

----- Original Message ----- 
From: "Vincenzo Gianferrari Pini" <vincenzo.gianferraripini@praxis.it>
To: "James Developers List" <james-dev@jakarta.apache.org>
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",
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.


> -----Original Message-----
> From: Hontvari Jozsef [mailto:hontvari3@solware.com]
> 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="RecipientIs=xxx@flyordie.com" 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: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org

View raw message