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 Guido Franz <Gu...@1und1.de> on 2008/03/31 11:27:08 UTC

Call a processor from outside the mailet context

Hello 

 

I want to call a James processor from outside the regular mailet
context. My app (integrated into James with a Spring application
context) listens to a JMS message queue and needs to do some additional
processing and routing for certain messages. The 'James way' of doing
this would be to call a James processor. At the moment I would use
JavaMail to send a local email and start regular James handling this
way, but I think it would be neater to directly call a processor. So
what I need is a way to convert a MimeMessage into a mailet.Mail and
start a processor. Perhaps someone can point me to a code fragment or
James source class, which does a similar job?

 

Thanks and greetings from Germany

Guido Franz

 


Re: Suddenly Can not receive email anymore--Urgent, Please help

Posted by Norman Maurer <no...@apache.org>.
Hi,

get sure you not use "relays.ordb.org" in any blacklist.

See this:
http://it.slashdot.org/it/08/03/25/2124224.shtml

Cheers,
Norman

Am Freitag, den 04.04.2008, 22:58 -0700 schrieb frank chen:
> Greeting....
> 
> I have been running james-2.2.0 on linux for about two
> years. it works all right.
> 
> But suddenly, it starts to have problem today after
> 18:02pm (PST). Clients are not able to receive emails
> from james-2.2.0 any more.  Client received the last
> email successfully at 18:02pm(PST).
> 
> There is NO java email application change, NO system
> configuration change, and NO james-2.2.0 configuration
> change. Somehow, sth stop james-2.2.0 working
> properly.
> 
> Here is the all detail about the log file
> /home/name/james/james-2.2.0/apps/james/logs/
> mailet-2008-04-04-18-02.log
> {
> 04/04/08 18:02:51 INFO  James.Mailet: RemoteDelivery:
> Attempting delivery of Mail1207357354027-11 to host
> <x.y.com> at <111.222.333.444> to addresses
> [myemail@xyz.com]
> 04/04/08 18:02:51 INFO  James.Mailet: RemoteDelivery:
> Mail (Mail1207357354027-11) sent successfully to
> <x.y.com> at <111.222.333.444>
> 
> 04/04/08 18:28:15 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207358894954-12 in
> file://var/mail/spam/
> 04/04/08 18:29:47 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207358987779-13 in
> file://var/mail/spam/
> 04/04/08 18:39:55 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207359595200-14 in
> file://var/mail/spam/
> 04/04/08 19:07:31 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207361249880-17 in
> file://var/mail/spam/
> 04/04/08 19:07:31 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207361249804-16 in
> file://var/mail/spam/
> 04/04/08 19:07:31 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207361247645-15 in
> file://var/mail/spam/
> 04/04/08 19:13:40 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207361619929-18 in
> file://var/mail/spam/
> 04/04/08 21:42:01 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207370521385-19 in
> file://var/mail/spam/
> 04/04/08 22:00:51 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207371651442-20 in
> file://var/mail/spam/
> }
> 
> As you can see, somehow, after 18:02pm, there are 9
> files lost. Those are the number of files my client
> are waiting for.
> 
> Could some expert explain what is going on?  
> what does it mean: James.Mailet: ToRepository: Storing
> mail Mail1207371651442-20 in file://var/mail/spam/ ???
> why it happened?
> and most important how to fix the problem?
> 
> I am really confused. There is really no any change on
>  my application and my server conf.
> 
> Thank you in advance!
> 
> Best Regards,
> 
> Frank
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 


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


FIXED - Re: Suddenly Can not receive email anymore--Urgent, Please help

Posted by frank chen <xi...@yahoo.com>.
After 5 hours struggling overnight, found the issue:
refer to:
http://www.mail-archive.com/server-user@james.apache.org/msg09563.html.

Solution: remove the following mailet from your james
config.xml.
<mailet match="InSpammerBlacklist=relays.ordb.org"
                 class="ToProcessor">
           <processor> spam </processor>
           <notice>550 Requested action not taken:
rejected - see http://www.ordb.org/ </notice>
         </mailet>

who said: the key for web service to sucess is:
governance.
I see the point now.

Best,

Frank

--- frank chen <xi...@yahoo.com> wrote:

> Greeting....
> 
> I have been running james-2.2.0 on linux for about
> two
> years. it works all right.
> 
> But suddenly, it starts to have problem today after
> 18:02pm (PST). Clients are not able to receive
> emails
> from james-2.2.0 any more.  Client received the last
> email successfully at 18:02pm(PST).
> 
> There is NO java email application change, NO system
> configuration change, and NO james-2.2.0
> configuration
> change. Somehow, sth stop james-2.2.0 working
> properly.
> 
> Here is the all detail about the log file
> /home/name/james/james-2.2.0/apps/james/logs/
> mailet-2008-04-04-18-02.log
> {
> 04/04/08 18:02:51 INFO  James.Mailet:
> RemoteDelivery:
> Attempting delivery of Mail1207357354027-11 to host
> <x.y.com> at <111.222.333.444> to addresses
> [myemail@xyz.com]
> 04/04/08 18:02:51 INFO  James.Mailet:
> RemoteDelivery:
> Mail (Mail1207357354027-11) sent successfully to
> <x.y.com> at <111.222.333.444>
> 
> 04/04/08 18:28:15 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207358894954-12 in
> file://var/mail/spam/
> 04/04/08 18:29:47 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207358987779-13 in
> file://var/mail/spam/
> 04/04/08 18:39:55 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207359595200-14 in
> file://var/mail/spam/
> 04/04/08 19:07:31 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207361249880-17 in
> file://var/mail/spam/
> 04/04/08 19:07:31 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207361249804-16 in
> file://var/mail/spam/
> 04/04/08 19:07:31 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207361247645-15 in
> file://var/mail/spam/
> 04/04/08 19:13:40 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207361619929-18 in
> file://var/mail/spam/
> 04/04/08 21:42:01 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207370521385-19 in
> file://var/mail/spam/
> 04/04/08 22:00:51 INFO  James.Mailet: ToRepository:
> Storing mail Mail1207371651442-20 in
> file://var/mail/spam/
> }
> 
> As you can see, somehow, after 18:02pm, there are 9
> files lost. Those are the number of files my client
> are waiting for.
> 
> Could some expert explain what is going on?  
> what does it mean: James.Mailet: ToRepository:
> Storing
> mail Mail1207371651442-20 in file://var/mail/spam/
> ???
> why it happened?
> and most important how to fix the problem?
> 
> I am really confused. There is really no any change
> on
>  my application and my server conf.
> 
> Thank you in advance!
> 
> Best Regards,
> 
> Frank
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> server-user-unsubscribe@james.apache.org
> For additional commands, e-mail:
> server-user-help@james.apache.org
> 
> 


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


Suddenly Can not receive email anymore--Urgent, Please help

Posted by frank chen <xi...@yahoo.com>.
Greeting....

I have been running james-2.2.0 on linux for about two
years. it works all right.

But suddenly, it starts to have problem today after
18:02pm (PST). Clients are not able to receive emails
from james-2.2.0 any more.  Client received the last
email successfully at 18:02pm(PST).

There is NO java email application change, NO system
configuration change, and NO james-2.2.0 configuration
change. Somehow, sth stop james-2.2.0 working
properly.

Here is the all detail about the log file
/home/name/james/james-2.2.0/apps/james/logs/
mailet-2008-04-04-18-02.log
{
04/04/08 18:02:51 INFO  James.Mailet: RemoteDelivery:
Attempting delivery of Mail1207357354027-11 to host
<x.y.com> at <111.222.333.444> to addresses
[myemail@xyz.com]
04/04/08 18:02:51 INFO  James.Mailet: RemoteDelivery:
Mail (Mail1207357354027-11) sent successfully to
<x.y.com> at <111.222.333.444>

04/04/08 18:28:15 INFO  James.Mailet: ToRepository:
Storing mail Mail1207358894954-12 in
file://var/mail/spam/
04/04/08 18:29:47 INFO  James.Mailet: ToRepository:
Storing mail Mail1207358987779-13 in
file://var/mail/spam/
04/04/08 18:39:55 INFO  James.Mailet: ToRepository:
Storing mail Mail1207359595200-14 in
file://var/mail/spam/
04/04/08 19:07:31 INFO  James.Mailet: ToRepository:
Storing mail Mail1207361249880-17 in
file://var/mail/spam/
04/04/08 19:07:31 INFO  James.Mailet: ToRepository:
Storing mail Mail1207361249804-16 in
file://var/mail/spam/
04/04/08 19:07:31 INFO  James.Mailet: ToRepository:
Storing mail Mail1207361247645-15 in
file://var/mail/spam/
04/04/08 19:13:40 INFO  James.Mailet: ToRepository:
Storing mail Mail1207361619929-18 in
file://var/mail/spam/
04/04/08 21:42:01 INFO  James.Mailet: ToRepository:
Storing mail Mail1207370521385-19 in
file://var/mail/spam/
04/04/08 22:00:51 INFO  James.Mailet: ToRepository:
Storing mail Mail1207371651442-20 in
file://var/mail/spam/
}

As you can see, somehow, after 18:02pm, there are 9
files lost. Those are the number of files my client
are waiting for.

Could some expert explain what is going on?  
what does it mean: James.Mailet: ToRepository: Storing
mail Mail1207371651442-20 in file://var/mail/spam/ ???
why it happened?
and most important how to fix the problem?

I am really confused. There is really no any change on
 my application and my server conf.

Thank you in advance!

Best Regards,

Frank


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


Re: Call a processor from outside the mailet context

Posted by Stefano Bagnara <ap...@bago.org>.
Guido Franz ha scritto:
> I want to call a James processor from outside the regular mailet
> context. My app (integrated into James with a Spring application
> context) listens to a JMS message queue and needs to do some additional
> processing and routing for certain messages. The 'James way' of doing
> this would be to call a James processor. At the moment I would use
> JavaMail to send a local email and start regular James handling this
> way, but I think it would be neater to directly call a processor. So
> what I need is a way to convert a MimeMessage into a mailet.Mail and
> start a processor. Perhaps someone can point me to a code fragment or
> James source class, which does a similar job?

mailetContext.sendMail is what the smtp server does after receiving the 
mail.

You cannot run a processor without a mailetcontext because mailet 
context is used by the processors.

So if are looking for a way to avoid SMTP then you can lookup the 
org.apache.mailet.MailetContext avalon service and then invoke its 
sendMail(MimeMessage msg) or sendMail(MailAddress sender, Collection 
recipients, MimeMessage msg).

If you also what to start the processing from a given processor then you 
call sendMail(MailAddress sender, Collection recipients, MimeMessage 
msg, String state) where state is the name of the processor.

Stefano



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