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 16:39:04 GMT
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;
        }







----- Original Message ----- 
From: "Vincenzo Gianferrari Pini" <vincenzo.gianferraripini@praxis.it>
To: "James Developers List" <james-dev@jakarta.apache.org>
Sent: Tuesday, June 24, 2003 10:02 AM
Subject: RE: subject prefix mailet or unaltered recipients in Redirect


No, you are right, it is missing in the class related part of the javadoc;
I'll fix it. I had only written it in the getRecipients() methot related
part of the javadoc:


getRecipients
protected Collection getRecipients()
                            throws MessagingException

Description copied from class: AbstractRedirect
Gets the recipients property. Returns the collection of recipients of the
new message, or null if no change is requested. Is a "getX()" method.

Overrides:
getRecipients in class AbstractRedirect
Returns:
the recipients init parameter or SpecialAddress.SENDER or
SpecialAddress.RETURN_PATH or null if missing


Vincenzo

> -----Original Message-----
> From: Hontvari Jozsef [mailto:hontvari3@solware.com]
> Sent: martedi 24 giugno 2003 9.47
> To: James Developers List
> Subject: Re: subject prefix mailet or unaltered recipients in Redirect
>
>
> Then it seems to me that the class javadoc doesn't reflect the actual
> behaviour.
>
> Description of the recipients parameter:
> A comma delimited list of email addresses for recipients of this
> message, it
> will use the "to" list if not specified.
>
> Do I miss something?
>
>
>
>
>
> ----- Original Message ----- 
> From: "Vincenzo Gianferrari Pini" <vincenzo.gianferraripini@praxis.it>
> To: "James Developers List" <james-dev@jakarta.apache.org>
> Sent: Tuesday, June 24, 2003 12:07 AM
> Subject: RE: subject prefix mailet or unaltered recipients in Redirect
>
>
> In the 2.2.0a7 Redirect, not coding any "recipient" parameter
> means keeping
> it unaltered. For example,in my "spam" processor, I coded the following:
>
>       <!-- spam. -->
>       <processor name="spam">
>          <mailet match="All" class="Redirect">
>             <static>true</static>
>             <sender>postmaster</sender>
>             <replyto>postmaster</replyto>
>             <returnPath>null</returnPath>
>             <inline>none</inline>
>             <attachment>message</attachment>
>             <prefix>[SPAM WARNING]</prefix>
>             <passThrough>true</passThrough>
>             <message>
> Based on our analyser, the attached message, addressed to you, has been
> classified as SPAM with a probability over 99%.
> Reading the subject you should be able to confirm the analysis,
> and if true
> you can delete without even opening it.
>
> Please don't reply to this e-mail as it has been automatically sent by the
> antivirus system.
>
> Regards, Postmaster xyz.it
> -----------------------------
>             </message>
>          </mailet>
>
>          <mailet match="All" class="Forward">
>             <forwardto>uce@ftc.gov</forwardto>
>             <passThrough>true</passThrough>
>          </mailet>
>
>          <mailet match="All" class="ToRepository">
>             <repositoryPath>file://var/mail/spam/</repositoryPath>
>          </mailet>
>       </processor>
>
> Is this what you mean?
>
> Vincenzo
>
> > -----Original Message-----
> > From: Hontvari Jozsef [mailto:hontvari3@solware.com]
> > Sent: lunedi 23 giugno 2003 22.36
> > To: james-dev@jakarta.apache.org
> > Subject: subject prefix mailet or unaltered recipients in Redirect
> >
> >
> > Because Outlook Express cannot filter messages (spam) based on
> headers, I
> > would need a mailet which adds a prefix to the subject. It mustn't do
> > anything else, e.g. it doesn't change the message id etc.
> >
> > This functionality is already in the code, in at least two
> places, in the
> > Redirect mailet and in the GenericListServ mailet. As I already
> > experienced
> > this it is not a simple operation, because it has to guess the
> appropriate
> > charset.
> >
> > I guess if there were an "unaltered" option in the recipients
> parameter of
> > the redirect mailet then it would make the job. Or maybe a
> separate mailet
> > is better. What do you think?
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


Mime
View raw message