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 Hut Carspecken <hu...@sbcglobal.net> on 2003/07/01 17:12:17 UTC

Thank You

I wrote about running James on Linux.  Still trying to make it run, but we are making advances with your responses.

Hut

Re: Mailet question

Posted by Kenny Smith <ja...@journalscape.com>.
Here is a snippet from JDBCVirtualUserTable that does this kind of 
thing, so you know where to start searching:

getMailetContext().sendMail(mail.getSender(), recipientsToAddForward, 
mail.getMessage());

recipientsToAddForward is a Collection of MailAddress(es).

Kenny Smith
JournalScape.com

Danny Angus wrote:
> you have to "send" the mail using the mailet context, and GHOST the original so that it re-enters from the top, alternatively copy the message and send that in a new mail to the cc recipient.
> 
> Mail message headers *don't* control the recipients of the email, strange but true. 
> 
> d.
> 
> 
>>-----Original Message-----
>>From: Shal Jain [mailto:shal_jain@intertechsys.com]
>>Sent: 01 July 2003 16:45
>>To: James Users List
>>Subject: Mailet question
>>
>>
>>James vers 2.1.2
>>OS - Win2K
>>
>>I have a mailet that monitors all outbound messages and under certain
>>conditions adds a CC recipient
>>I know the mailet executes because the headers of the outbound 
>>messages show
>>the added CC recipient address.
>>However, the message is not delivered to this special address.
>>The SMTP log shows message being spooled to all other recipients 
>>(to/cc/bcc)
>>except for the one that I added
>>
>>I am including the service method as well as the changes to the config.xml
>>file.
>>
>>What am I missing ?
>>
>>
>>
>>
>>The service method looks somewhat like this
>>
>>
>>  public void service(Mail mailObj) throws javax.mail.MessagingException
>>  {
>>    MimeMessage msg = mailObj.getMessage();
>>    boolean evalSuccess = evalConditions();
>>   if (evalSuccess)
>>   {
>>       msg.addRecipients(Message.RecipientType.CC, someone@someplace.com);
>>   }
>> }
>>
>>
>>
>>In the config file the the mailet has been configured at the very begining
>>of the transport processor
>>
>>      <processor name="transport">
>>
>>    <!-- add custom address to the CC List -->
>>    <mailet match="All" class="CCSender" />    <-- my mailet
>>
>>    <!-- Is the recipient is for a local account, deliver it locally -->
>>    <mailet match="RecipientIsLocal" class="LocalDelivery"/>
>>
>>    <!-- If the host is handled by this server and it did not get -->
>>    <!-- locally delivered, this is an invalid recipient -->
>>    <mailet match="HostIsLocal" class="ToProcessor">
>>           <processor>error</processor>
>>     </mailet>
>>  ...
>>  --- rest of the transport processort block -->
>> </processor>
>>
>>
>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: james-user-help@jakarta.apache.org


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


RE: Mailet question

Posted by Danny Angus <da...@apache.org>.
you have to "send" the mail using the mailet context, and GHOST the original so that it re-enters from the top, alternatively copy the message and send that in a new mail to the cc recipient.

Mail message headers *don't* control the recipients of the email, strange but true. 

d.

> -----Original Message-----
> From: Shal Jain [mailto:shal_jain@intertechsys.com]
> Sent: 01 July 2003 16:45
> To: James Users List
> Subject: Mailet question
> 
> 
> James vers 2.1.2
> OS - Win2K
> 
> I have a mailet that monitors all outbound messages and under certain
> conditions adds a CC recipient
> I know the mailet executes because the headers of the outbound 
> messages show
> the added CC recipient address.
> However, the message is not delivered to this special address.
> The SMTP log shows message being spooled to all other recipients 
> (to/cc/bcc)
> except for the one that I added
> 
> I am including the service method as well as the changes to the config.xml
> file.
> 
> What am I missing ?
> 
> 
> 
> 
> The service method looks somewhat like this
> 
> 
>   public void service(Mail mailObj) throws javax.mail.MessagingException
>   {
>     MimeMessage msg = mailObj.getMessage();
>     boolean evalSuccess = evalConditions();
>    if (evalSuccess)
>    {
>        msg.addRecipients(Message.RecipientType.CC, someone@someplace.com);
>    }
>  }
> 
> 
> 
> In the config file the the mailet has been configured at the very begining
> of the transport processor
> 
>       <processor name="transport">
> 
>     <!-- add custom address to the CC List -->
>     <mailet match="All" class="CCSender" />    <-- my mailet
> 
>     <!-- Is the recipient is for a local account, deliver it locally -->
>     <mailet match="RecipientIsLocal" class="LocalDelivery"/>
> 
>     <!-- If the host is handled by this server and it did not get -->
>     <!-- locally delivered, this is an invalid recipient -->
>     <mailet match="HostIsLocal" class="ToProcessor">
>            <processor>error</processor>
>      </mailet>
>   ...
>   --- rest of the transport processort block -->
>  </processor>
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
> 

Mailet question

Posted by Shal Jain <sh...@intertechsys.com>.
James vers 2.1.2
OS - Win2K

I have a mailet that monitors all outbound messages and under certain
conditions adds a CC recipient
I know the mailet executes because the headers of the outbound messages show
the added CC recipient address.
However, the message is not delivered to this special address.
The SMTP log shows message being spooled to all other recipients (to/cc/bcc)
except for the one that I added

I am including the service method as well as the changes to the config.xml
file.

What am I missing ?




The service method looks somewhat like this


  public void service(Mail mailObj) throws javax.mail.MessagingException
  {
    MimeMessage msg = mailObj.getMessage();
    boolean evalSuccess = evalConditions();
   if (evalSuccess)
   {
       msg.addRecipients(Message.RecipientType.CC, someone@someplace.com);
   }
 }



In the config file the the mailet has been configured at the very begining
of the transport processor

      <processor name="transport">

    <!-- add custom address to the CC List -->
    <mailet match="All" class="CCSender" />    <-- my mailet

    <!-- Is the recipient is for a local account, deliver it locally -->
    <mailet match="RecipientIsLocal" class="LocalDelivery"/>

    <!-- If the host is handled by this server and it did not get -->
    <!-- locally delivered, this is an invalid recipient -->
    <mailet match="HostIsLocal" class="ToProcessor">
           <processor>error</processor>
     </mailet>
  ...
  --- rest of the transport processort block -->
 </processor>







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


RE: Thank You

Posted by scarter <sc...@tsys.com>.
FYI, there is no way to unsubscribe from this list....I've tried it 5
times now and I am still receiving emails.  If there is another way to
do it other than emailing james-user-unsubscribe@jakarta.apache.org,
then you should really update your documentation.

-----Original Message-----
From: Danny Angus [mailto:danny@apache.org] 
Sent: Tuesday, July 01, 2003 2:15 PM
To: James Users List
Subject: RE: Thank You


http://james.apache.org/james_and_sendmail.html

> -----Original Message-----
> From: Hut Carspecken [mailto:hutson.carspecken@sbcglobal.net]
> Sent: 01 July 2003 16:57
> To: James Users List
> Subject: Re: Thank You
> 
> 
> Hi everyone,
> 
> Well,  with your instruction.  We managed to get James up and running!

> Thanks once again.  Changing permissions was the key.
> 
> I had to change the port number from 25 to 26 because the SMTP Server 
> registered the port as being used.  We think that there is a copy of 
> SendMail on the system.  Once we disable that, we should be good to 
> go.
> 
> Hut
> ----- Original Message -----
> From: "Danny Angus" <da...@apache.org>
> To: "James Users List" <ja...@jakarta.apache.org>
> Sent: Tuesday, July 01, 2003 10:39 AM
> Subject: RE: Thank You
> 
> 
> > You shouldn't have problems,
> >
> > you need to set $JAVA_HOME to the location of java, I use..
> >
> > JAVA_HOME=/opt/j2sdk1.4.1
> > export JAVA_HOME
> >
> > then cd to james bin and (as root) ./run.sh &
> >
> > You may need to chmod run.sh and phoenix.sh so they are
> executable by root
> >
> > That should be everything you need do to make James start
> >
> > d.
> >
> > > -----Original Message-----
> > > From: Hut Carspecken [mailto:hutson.carspecken@sbcglobal.net]
> > > Sent: 01 July 2003 16:12
> > > To: James Users List
> > > Subject: Thank You
> > >
> > >
> > > I wrote about running James on Linux.  Still trying to make it 
> > > run, but we are making advances with your responses.
> > >
> > > Hut
> > >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
> 


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


RE: Thank You

Posted by Danny Angus <da...@apache.org>.
http://james.apache.org/james_and_sendmail.html

> -----Original Message-----
> From: Hut Carspecken [mailto:hutson.carspecken@sbcglobal.net]
> Sent: 01 July 2003 16:57
> To: James Users List
> Subject: Re: Thank You
> 
> 
> Hi everyone,
> 
> Well,  with your instruction.  We managed to get James up and running!
> Thanks once again.  Changing permissions was the key.
> 
> I had to change the port number from 25 to 26 because the SMTP Server
> registered the port as being used.  We think that there is a copy of
> SendMail on the system.  Once we disable that, we should be good to go.
> 
> Hut
> ----- Original Message -----
> From: "Danny Angus" <da...@apache.org>
> To: "James Users List" <ja...@jakarta.apache.org>
> Sent: Tuesday, July 01, 2003 10:39 AM
> Subject: RE: Thank You
> 
> 
> > You shouldn't have problems,
> >
> > you need to set $JAVA_HOME to the location of java, I use..
> >
> > JAVA_HOME=/opt/j2sdk1.4.1
> > export JAVA_HOME
> >
> > then cd to james bin and (as root) ./run.sh &
> >
> > You may need to chmod run.sh and phoenix.sh so they are 
> executable by root
> >
> > That should be everything you need do to make James start
> >
> > d.
> >
> > > -----Original Message-----
> > > From: Hut Carspecken [mailto:hutson.carspecken@sbcglobal.net]
> > > Sent: 01 July 2003 16:12
> > > To: James Users List
> > > Subject: Thank You
> > >
> > >
> > > I wrote about running James on Linux.  Still trying to make it
> > > run, but we are making advances with your responses.
> > >
> > > Hut
> > >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
> 

Re: Thank You

Posted by Hut Carspecken <hu...@sbcglobal.net>.
Hi everyone,

Well,  with your instruction.  We managed to get James up and running!
Thanks once again.  Changing permissions was the key.

I had to change the port number from 25 to 26 because the SMTP Server
registered the port as being used.  We think that there is a copy of
SendMail on the system.  Once we disable that, we should be good to go.

Hut
----- Original Message -----
From: "Danny Angus" <da...@apache.org>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Tuesday, July 01, 2003 10:39 AM
Subject: RE: Thank You


> You shouldn't have problems,
>
> you need to set $JAVA_HOME to the location of java, I use..
>
> JAVA_HOME=/opt/j2sdk1.4.1
> export JAVA_HOME
>
> then cd to james bin and (as root) ./run.sh &
>
> You may need to chmod run.sh and phoenix.sh so they are executable by root
>
> That should be everything you need do to make James start
>
> d.
>
> > -----Original Message-----
> > From: Hut Carspecken [mailto:hutson.carspecken@sbcglobal.net]
> > Sent: 01 July 2003 16:12
> > To: James Users List
> > Subject: Thank You
> >
> >
> > I wrote about running James on Linux.  Still trying to make it
> > run, but we are making advances with your responses.
> >
> > Hut
> >


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


RE: Thank You

Posted by Danny Angus <da...@apache.org>.
You shouldn't have problems, 

you need to set $JAVA_HOME to the location of java, I use..

JAVA_HOME=/opt/j2sdk1.4.1
export JAVA_HOME

then cd to james bin and (as root) ./run.sh &

You may need to chmod run.sh and phoenix.sh so they are executable by root

That should be everything you need do to make James start

d.

> -----Original Message-----
> From: Hut Carspecken [mailto:hutson.carspecken@sbcglobal.net]
> Sent: 01 July 2003 16:12
> To: James Users List
> Subject: Thank You
> 
> 
> I wrote about running James on Linux.  Still trying to make it 
> run, but we are making advances with your responses.
> 
> Hut
>