Re: James:: Move Succesfully Processed Email to a separte directory
Anyone ? On Tue, Mar 24, 2015 at 8:30 PM, Muhammad Ismail it.is.ism...@gmail.com wrote: Hi After processing an email successfully if change its state to some custom processor inside that processor can we copy/ move file to specified directory ? Actually I am trying to figure out how we can copy or move the email which get processed successfully to a separate directory. -- Thanks -- Thanks Muhammad Ismail cell (PAK) : +92.322.5100362 cell (Sweden): +46 700-321-521 e-mail: it.is.ism...@gmail.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.
Re: James:: Move Succesfully Processed Email to a separte directory
There is a ToFolder mailet provided by James (I'm on James 3b5...). Unfortunately, it is not easily subclassable to set the target folder. But I just cloned the entire mailet from the James source, renamed it, and customized it. You can then add whatever logic you need and define the folder that each mail item is to be placed into. Jerry On 3/27/2015 10:25 AM, Muhammad Ismail wrote: Anyone ? On Tue, Mar 24, 2015 at 8:30 PM, Muhammad Ismail it.is.ism...@gmail.com wrote: Hi After processing an email successfully if change its state to some custom processor inside that processor can we copy/ move file to specified directory ? Actually I am trying to figure out how we can copy or move the email which get processed successfully to a separate directory. -- Thanks - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org
AW: James:: Move Succesfully Processed Email to a separte directory
Hello Muhammad, depends on which version von James you are running. And it depends on the question if you want the mail to store and finish, or store and send further. Also it depends if you want it to be stored in a database, a directory, a imap folder,... I suppose you mean a directory on the local server. A directory is called a File Repository. In version 3 there are some mailets to handle that, see: http://james.apache.org/server/3/dev-provided-mailets.html ToRepository ToMultiRepository ToSenderFolder In version 2 there are some mailets to handle that, see: https://james.apache.org/server/2/repositories.html https://james.apache.org/server/2/provided_mailets.html https://james.apache.org/server/2/ Also here, not sure which version: http://james.apache.org/mailet/standard/mailet-report.html So I think, yes, you could do that. The state of a mail is root, if it is in process. It is error, if something went terrible wrong. And it is ghost, if it will not been sent to another server. Ghost means also, that it will be deleted from memory after handling. Some mailets provide an attribute called passThrough. This decides, if the mail flow will continue to the next matcher/mailet, or not. For example: The standard error processor will just store the file in the error folder (in V2). Greetings Bernd -Ursprüngliche Nachricht- Von: Muhammad Ismail [mailto:it.is.ism...@gmail.com] Gesendet: Freitag, 27. März 2015 16:26 An: server-user@james.apache.org Betreff: Re: James:: Move Succesfully Processed Email to a separte directory Anyone ? On Tue, Mar 24, 2015 at 8:30 PM, Muhammad Ismail it.is.ism...@gmail.com wrote: Hi After processing an email successfully if change its state to some custom processor inside that processor can we copy/ move file to specified directory ? Actually I am trying to figure out how we can copy or move the email which get processed successfully to a separate directory. -- Thanks -- Thanks Muhammad Ismail cell (PAK) : +92.322.5100362 cell (Sweden): +46 700-321-521 e-mail: it.is.ism...@gmail.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org
Re: AW: James:: Move Succesfully Processed Email to a separte directory
Thanks Bernd for detail reply. I am currently using james version 2.3. I have already write a custom mailet which process emails where host-is-local. All I want is after processing email in my custom mailet, I want to store those email in directory like success-emails Remote dilevry is disabled. After processing email in my custom mailet changin email state to to repositry will work ? On 28 Mar 2015 03:00, Bernd Waibel bwai...@intarsys.de wrote: Hello Muhammad, depends on which version von James you are running. And it depends on the question if you want the mail to store and finish, or store and send further. Also it depends if you want it to be stored in a database, a directory, a imap folder,... I suppose you mean a directory on the local server. A directory is called a File Repository. In version 3 there are some mailets to handle that, see: http://james.apache.org/server/3/dev-provided-mailets.html ToRepository ToMultiRepository ToSenderFolder In version 2 there are some mailets to handle that, see: https://james.apache.org/server/2/repositories.html https://james.apache.org/server/2/provided_mailets.html https://james.apache.org/server/2/ Also here, not sure which version: http://james.apache.org/mailet/standard/mailet-report.html So I think, yes, you could do that. The state of a mail is root, if it is in process. It is error, if something went terrible wrong. And it is ghost, if it will not been sent to another server. Ghost means also, that it will be deleted from memory after handling. Some mailets provide an attribute called passThrough. This decides, if the mail flow will continue to the next matcher/mailet, or not. For example: The standard error processor will just store the file in the error folder (in V2). Greetings Bernd -Ursprüngliche Nachricht- Von: Muhammad Ismail [mailto:it.is.ism...@gmail.com] Gesendet: Freitag, 27. März 2015 16:26 An: server-user@james.apache.org Betreff: Re: James:: Move Succesfully Processed Email to a separte directory Anyone ? On Tue, Mar 24, 2015 at 8:30 PM, Muhammad Ismail it.is.ism...@gmail.com wrote: Hi After processing an email successfully if change its state to some custom processor inside that processor can we copy/ move file to specified directory ? Actually I am trying to figure out how we can copy or move the email which get processed successfully to a separate directory. -- Thanks -- Thanks Muhammad Ismail cell (PAK) : +92.322.5100362 cell (Sweden): +46 700-321-521 e-mail: it.is.ism...@gmail.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org
AW: AW: James:: Move Succesfully Processed Email to a separte directory
Yes, should work, if the state of the mail is not changed by your code. -Ursprüngliche Nachricht- Von: Muhammad Ismail [mailto:it.is.ism...@gmail.com] Gesendet: Freitag, 27. März 2015 23:10 An: James Users List Betreff: Re: AW: James:: Move Succesfully Processed Email to a separte directory Thanks Bernd for detail reply. I am currently using james version 2.3. I have already write a custom mailet which process emails where host-is-local. All I want is after processing email in my custom mailet, I want to store those email in directory like success-emails Remote dilevry is disabled. After processing email in my custom mailet changin email state to to repositry will work ? On 28 Mar 2015 03:00, Bernd Waibel bwai...@intarsys.de wrote: Hello Muhammad, depends on which version von James you are running. And it depends on the question if you want the mail to store and finish, or store and send further. Also it depends if you want it to be stored in a database, a directory, a imap folder,... I suppose you mean a directory on the local server. A directory is called a File Repository. In version 3 there are some mailets to handle that, see: http://james.apache.org/server/3/dev-provided-mailets.html ToRepository ToMultiRepository ToSenderFolder In version 2 there are some mailets to handle that, see: https://james.apache.org/server/2/repositories.html https://james.apache.org/server/2/provided_mailets.html https://james.apache.org/server/2/ Also here, not sure which version: http://james.apache.org/mailet/standard/mailet-report.html So I think, yes, you could do that. The state of a mail is root, if it is in process. It is error, if something went terrible wrong. And it is ghost, if it will not been sent to another server. Ghost means also, that it will be deleted from memory after handling. Some mailets provide an attribute called passThrough. This decides, if the mail flow will continue to the next matcher/mailet, or not. For example: The standard error processor will just store the file in the error folder (in V2). Greetings Bernd -Ursprüngliche Nachricht- Von: Muhammad Ismail [mailto:it.is.ism...@gmail.com] Gesendet: Freitag, 27. März 2015 16:26 An: server-user@james.apache.org Betreff: Re: James:: Move Succesfully Processed Email to a separte directory Anyone ? On Tue, Mar 24, 2015 at 8:30 PM, Muhammad Ismail it.is.ism...@gmail.com wrote: Hi After processing an email successfully if change its state to some custom processor inside that processor can we copy/ move file to specified directory ? Actually I am trying to figure out how we can copy or move the email which get processed successfully to a separate directory. -- Thanks -- Thanks Muhammad Ismail cell (PAK) : +92.322.5100362 cell (Sweden): +46 700-321-521 e-mail: it.is.ism...@gmail.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org
James:: Move Succesfully Processed Email to a separte directory
Hi After processing an email successfully if change its state to some custom processor inside that processor can we copy/ move file to specified directory ? Actually I am trying to figure out how we can copy or move the email which get processed successfully to a separate directory. -- Thanks