Hi guys, 
   I have written a mailet to filter attachments. I would like the
attachment to be filtered only for incoming mails. Any idea how this can be
done?
I've tried putting the mailet with (match="RecipientIsLocal") but then
you'll have the following scenario:
   Send a mail with:
        To: [EMAIL PROTECTED], [EMAIL PROTECTED]

The mail will be sent to the mailet and will be filtered for both
recepients.
I've been fighting for weeks now. Acctually in the specification of James it
says that mailets are only meant to process _incoming_ mails. Am I doing
anything wrong?

Here is the only mailet part I've changed in config.xml (the root process).

Cheers and Thanks, 
Raied

******************************************************

<processor name="root">

        <mailet match="All" class="AttachmentFilter">
        </mailet>
        <mailet match="RelayLimit=30" class="Null">
          </mailet>

          <!-- Check for delivery from a known spam server -->
          <mailet match="InSpammerBlacklist=blackholes.mail-abuse.org"
                  class="ToProcessor">
            <processor> spam </processor>
            <notice> Rejected - see  http://www.mail-abuse.org/rbl/
</notice>
          </mailet>

          <mailet match="InSpammerBlacklist=dialups.mail-abuse.org"
                  class="ToProcessor">
            <processor> spam </processor>
            <notice> Dialup - see http://www.mail-abuse.org/dul/ </notice>
          </mailet>

          <mailet match="InSpammerBlacklist=relays.mail-abuse.org"
                  class="ToProcessor">
            <processor> spam </processor>
            <notice> Open spam relay - see http://www.mail-abuse.org/rss/
</notice>
          </mailet>

          <!-- Sample matching to kill a message (send to Null) -->
          <mailet match="RecipientIs=badboy@badhost" class="Null">
          </mailet>

          <!-- Sends remaining mails to the transport processor for either
          local or remote delivery -->
          <mailet match="All" class="ToProcessor">
            <processor> transport </processor>
          </mailet>
 </processor>

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

Reply via email to