You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Ide Roth <Id...@trw.com> on 2002/09/03 22:10:20 UTC

Redirect mailet

Hi,
  I'm new to James.  I'm currently trying to configure James to notify the postmaster in case of an error.  I've notice that if you uncomment the section:
    
          <mailet match="All" class="NotifyPostmaster">
          </mailet>
     
of the original config.xml.  Two different messages get send to the postmaster.   If the recipient is of the same server, the header and the body of the original
message is sent to the postmaster.  If the recipient is of a different server, the recipient email address and the body of the original message is sent to the
postmaster.

I would like to change the content of the message being mailed back to the postmaster. In it body I would like to put an error message, the recipient email
address, and the original email message as an attachment.

I've notice the Redirect mailet allow you to send out email message to the postmaster with the original message as an attachment.  I was able to do this in the
config.xml.  I've comment out the section that notify the postmaster and add a Redirect mailet.   Here is the Redirect mail I've written:
  <mailet match="All" class="Redirect">
   <recipients>test@localhost</recipients>
   <sender>postmaster</sender
   <inline>heads</inline>
   <attachment>message</attachment>
   <passThrough>TRUE</passThrough>
   <attachError>TRUE</attachError>
   <replyto>postmaster</replyto>
   <prefix>[spam notification]</prefix>
   <static>TRUE</static
  </mailet>
   <!--
          <mailet match="All" class="NotifyPostmaster">
          </mailet>
      -->

It seem that the class NotifyPostmaster includes the recipient email address in the message being sent out if the recipient is not of the same
server. But if the recipient is of the same server,  the header and the body of the original message is sent to the postmaster.

My question is:  How can you include error message, the recipient email address of the original email, and the original email as attachment when sending
out the email to the postmaster using Redirect mailet?

thanks
Ide

RE: Redirect mailet

Posted by "Noel J. Bergman" <no...@devtech.com>.
Ide,

I'm reading in a hurry, so I might be missing your point.  But if your
problem is what I think it is, please grab a copy of Redirect.java from the
CVS and see if that fixes it for you.

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>