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 Samuel Arnod-Prin <sa...@dxd2.com> on 2003/07/09 19:14:34 UTC

Moving mails to the nntp server

Hello,

I would like to copy all mails from our customer to a forum in the nntp 
server.
The rule would be the following :
 if a mail is for or from an email like *@customer.com then I would like 
this mail to be moved into the com.customer.inbox forum...
is there a way to do this using a mailet ?
Is it possible from a MailContext to reach a NNTP context ??

thank you...


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


Re: Moving mails to the nntp server

Posted by Harmeet Bedi <ha...@kodemuse.com>.
----- Original Message ----- 
From: "Samuel Arnod-Prin" <sa...@dxd2.com>
> I would like to copy all mails from our customer to a forum in the nntp 
> server.



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


Re: Moving mails to the nntp server

Posted by Harmeet Bedi <ha...@kodemuse.com>.
----- Original Message -----
From: "Samuel Arnod-Prin" <sa...@dxd2.com>
>
> I would like to copy all mails from our customer to a forum in the nntp
> server.


Utility described here may help
http://marc.theaimsgroup.com/?l=james-dev&m=105095131916737&w=2
It reads and posts mail messages to newsgroup server.

or chapter 6 from Stephan Wiesner's excellent James Tutorial if you want a
mailet that posts mail to Newsgroup at runtime.
http://rzserv2.fhnon.de/~lg002556/james/James.html#chap_NewsServer

> The rule would be the following :
>  if a mail is for or from an email like *@customer.com then I would like
> this mail to be moved into the com.customer.inbox forum...

You'll need to iterate over existing mails, do subject check and post to
newsgroup. Subject could be found by creating mime message using and
MimeMessage::getSubject API or by parsing mail headers to look for 'Subject'
header. Latter is a bit messier but may be faster.

Harmeet



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


RE: Moving mails to the nntp server

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I would like to copy all mails from our customer to a forum
> in the nntp server.

Someone was going to do a Mailet for that, but I don't see one.  Harmeet
Bedi posted some code back in April that could act as the core for such a
Mailet.

	--- Noel


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