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 "Marans.Jeffrey" <Je...@cic.gc.ca> on 2019/02/19 18:17:11 UTC

how to resubmit failed messages

I'm setting up a proof of concept mail system using apache james 3.2 with minimal mods.
I have a Postal load test server that sends to a james relay which forwards the email to a second james server. The latter persists the messages into a MySQL database.
During testing I turn off various components, and I've found undeliverable messages accumulating in the second server james/var/mail/error directory when the db server is off-line.
How do I get james to reprocess the messages?

Regards,
Jeffrey Marans.


RE: how to resubmit failed messages

Posted by "Marans.Jeffrey" <Je...@cic.gc.ca>.
Thanks Craig.
I'll give it a try and get back to you.

Jeff.


-----Original Message-----
From: Craig Cudmore [mailto:craig@cudmore.ca] 
Sent: Tuesday, February 19, 2019 1:38 PM
To: James Users List <se...@james.apache.org>
Subject: Re: how to resubmit failed messages

Here's a high-level list of steps you need to re-process rejected message:
1) Configure your mailetcontainer.xml to have a mailet like:
<mailet match=:"RecientIs=trigger@mail.com" class="FromRepository">
  <repositoryPath>file://var/mail/error</repositoryPath>
  <processor>process</processor>
  <delete>true</delete>
</mailet>

This mailet will look for mails that are being sent from trigger@mail.com and if it finds one, it will throw away the trigger message and tell James to grab any messages in the /var/mail/error queue to re-process.

2) Restart James. The reader pointer in the FromRepository needs to be reset back to the beginning of the error queue. If you're using a database for your repository you likely won't need this step.

3) Send a message to james to "trigger@mail.com".

Then James should reprocess any messages in the error queue.

On Tue, Feb 19, 2019 at 1:24 PM cryptearth <cr...@cryptearth.de> wrote:

> Hey Jeffrey,
>
> this awnser could be wrong as I don't now for sure, but I guess once a 
> mail is filtered into one of the error-directories - it's out of the 
> queue. But I could be wrong because the mails stored as serialized 
> java objects - wich also should be able to be read in back again for 
> further processing. But as re-processing would need some action by the 
> user or an admin - there's no command to reprocess filtered-out 
> messages - at least it doesn't show up for james-cli.sh.
>
> Matt
>
> Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:
> > I'm setting up a proof of concept mail system using apache james 3.2
> with minimal mods.
> > I have a Postal load test server that sends to a james relay which
> forwards the email to a second james server. The latter persists the 
> messages into a MySQL database.
> > During testing I turn off various components, and I've found
> undeliverable messages accumulating in the second server 
> james/var/mail/error directory when the db server is off-line.
> > How do I get james to reprocess the messages?
> >
> > Regards,
> > Jeffrey Marans.
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

RE: how to resubmit failed messages

Posted by "Marans.Jeffrey" <Je...@cic.gc.ca>.
Thanks, I'm trying to figure out how to install and run  james-jpa-guice-3.2.0

Jeffrey Marans



-----Original Message-----
From: Benoit Tellier [mailto:benwa@minet.net] 
Sent: Wednesday, February 20, 2019 7:33 PM
To: server-user@james.apache.org
Subject: Re: how to resubmit failed messages

Hi,

There is no binding for Spring (and thus default James server) for webadmin. In order to use webadmin one need to rely on Guice products.

Best regards

On 2/20/19 9:20 PM, Raphael OUAZANA wrote:
> Hi Jeffrey,
> 
> You are trying to contact James on port 25, which is for SMTP.
> 
> Webadmin is listening by default on port 8000.
> 
> Regards,
> Raphaël.
> 
> Le 2019-02-20 13:59, Marans.Jeffrey a écrit :
>> Hi Raphael.
>>
>> I’m using james-server-app-3.2.0.
>>
>> Path is /opt/cibids/james-server-app-3.2.0 and I wonder if I’m 
>> missing some syntax.
>>
>>
>>
>> curl -XPATCH
>> http://172.16.251.133:25/mailRepositories/var%2Fmail%2Ferror%2F/mails
>> ?action=reprocess
>>
>>
>>
>>
>> 220 irc JAMES SMTP Server Server (JAMES SMTP Server ) ready
>>
>> 500 5.5.1 Command PATCH unrecognized.
>>
>> 500 5.5.1 Command USER-AGENT: unrecognized.
>>
>> 500 5.5.1 Command HOST: unrecognized.
>>
>> 500 5.5.1 Command ACCEPT: unrecognized.
>>
>> 500 5.5.1 Command  unrecognized.
>>
>>
>>
>>
>>
>> Jeffrey Marans
>>
>>
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: Raphael OUAZANA [mailto:raphael.ouazana@linagora.com]
>> Sent: Tuesday, February 19, 2019 3:47 PM
>> To: James Users List <se...@james.apache.org>
>> Cc: Craig Cudmore <cr...@cudmore.ca>
>> Subject: Re: how to resubmit failed messages
>>
>>
>>
>> Hi,
>>
>>
>>
>> Nice trick, but there is now a simpler way to achieve this.
>>
>>
>>
>> We tend to prefer webadmin now than cli for new features (cli will 
>> probably be replaced by webadmin in a future version). So with 
>> webadmin you can easily reprocess a mail repository, see here:
>>
>> http://james.apache.org/server/manage-webadmin.html#Reprocessing_mail
>> s_from_a_mail_repository
>>
>>
>>
>>
>> Regards,
>>
>> Raphaël.
>>
>>
>>
>> Le 2019-02-19 19:37, Craig Cudmore a écrit :
>>
>>> Here's a high-level list of steps you need to re-process rejected
>>
>>> message:
>>
>>> 1) Configure your mailetcontainer.xml to have a mailet like:
>>
>>> <mailet
>>> match=:"RecientIs=trigger@mail.com<mailto:RecientIs=trigger@mail.com
>>> >" class="FromRepository">
>>>
>>
>>>  
>>> <repositoryPath>file://var/mail/error</repositoryPath<file:///\\var\
>>> mail\error%3c\repositoryPath>>
>>>
>>
>>>   <processor>process</processor>
>>
>>>   <delete>true</delete>
>>
>>> </mailet>
>>
>>>
>>
>>> This mailet will look for mails that are being sent from
>>
>>> trigger@mail.com<ma...@mail.com> and if it finds one, it 
>>> will throw away the trigger
>>
>>> message and tell James to grab any messages in the /var/mail/error
>>
>>> queue to re-process.
>>
>>>
>>
>>> 2) Restart James. The reader pointer in the FromRepository needs to 
>>> be
>>
>>> reset back to the beginning of the error queue. If you're using a
>>
>>> database for your repository you likely won't need this step.
>>
>>>
>>
>>> 3) Send a message to james to
>>> "trigger@mail.com<ma...@mail.com>".
>>
>>>
>>
>>> Then James should reprocess any messages in the error queue.
>>
>>>
>>
>>> On Tue, Feb 19, 2019 at 1:24 PM cryptearth 
>>> <cr...@cryptearth.de>>
>>
>>> wrote:
>>
>>>
>>
>>>> Hey Jeffrey,
>>
>>>>
>>
>>>> this awnser could be wrong as I don't now for sure, but I guess 
>>>> once
>>
>>>> a mail is filtered into one of the error-directories - it's out of
>>
>>>> the queue. But I could be wrong because the mails stored as
>>
>>>> serialized java objects - wich also should be able to be read in 
>>>> back
>>
>>>> again for further processing. But as re-processing would need some
>>
>>>> action by the user or an admin - there's no command to reprocess
>>
>>>> filtered-out messages - at least it doesn't show up for james-cli.sh.
>>
>>>>
>>
>>>> Matt
>>
>>>>
>>
>>>> Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:
>>
>>>> > I'm setting up a proof of concept mail system using apache james
>>
>>>> > 3.2
>>
>>>> with minimal mods.
>>
>>>> > I have a Postal load test server that sends to a james relay 
>>>> > which
>>
>>>> forwards the email to a second james server. The latter persists 
>>>> the
>>
>>>> messages into a MySQL database.
>>
>>>> > During testing I turn off various components, and I've found
>>
>>>> undeliverable messages accumulating in the second server
>>
>>>> james/var/mail/error directory when the db server is off-line.
>>
>>>> > How do I get james to reprocess the messages?
>>
>>>> >
>>
>>>> > Regards,
>>
>>>> > Jeffrey Marans.
>>
>>>> >
>>
>>>> >
>>
>>>>
>>
>>>>
>>
>>>> -------------------------------------------------------------------
>>>> --
>>
>>>> To unsubscribe, e-mail:
>>>> server-user-unsubscribe@james.apache.org<mailto:server-user-unsubsc
>>>> ribe@james.apache.org>
>>>>
>>
>>>> For additional commands, e-mail:
>>>> server-user-help@james.apache.org<mailto:server-user-help@james.apa
>>>> che.org>
>>>>
>>
>>>>
>>
>>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>>
>> To unsubscribe, e-mail:
>> server-user-unsubscribe@james.apache.org<mailto:server-user-unsubscri
>> be@james.apache.org>
>>
>>
>> For additional commands, e-mail:
>> server-user-help@james.apache.org<mailto:server-user-help@james.apach
>> e.org>
>>
> 
> ---------------------------------------------------------------------
> 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


Re: how to resubmit failed messages

Posted by Benoit Tellier <be...@minet.net>.
Hi,

There is no binding for Spring (and thus default James server) for
webadmin. In order to use webadmin one need to rely on Guice products.

Best regards

On 2/20/19 9:20 PM, Raphael OUAZANA wrote:
> Hi Jeffrey,
> 
> You are trying to contact James on port 25, which is for SMTP.
> 
> Webadmin is listening by default on port 8000.
> 
> Regards,
> Raphaël.
> 
> Le 2019-02-20 13:59, Marans.Jeffrey a écrit :
>> Hi Raphael.
>>
>> I’m using james-server-app-3.2.0.
>>
>> Path is /opt/cibids/james-server-app-3.2.0 and I wonder if I’m missing
>> some syntax.
>>
>>
>>
>> curl -XPATCH
>> http://172.16.251.133:25/mailRepositories/var%2Fmail%2Ferror%2F/mails?action=reprocess
>>
>>
>>
>>
>> 220 irc JAMES SMTP Server Server (JAMES SMTP Server ) ready
>>
>> 500 5.5.1 Command PATCH unrecognized.
>>
>> 500 5.5.1 Command USER-AGENT: unrecognized.
>>
>> 500 5.5.1 Command HOST: unrecognized.
>>
>> 500 5.5.1 Command ACCEPT: unrecognized.
>>
>> 500 5.5.1 Command  unrecognized.
>>
>>
>>
>>
>>
>> Jeffrey Marans
>>
>>
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: Raphael OUAZANA [mailto:raphael.ouazana@linagora.com]
>> Sent: Tuesday, February 19, 2019 3:47 PM
>> To: James Users List <se...@james.apache.org>
>> Cc: Craig Cudmore <cr...@cudmore.ca>
>> Subject: Re: how to resubmit failed messages
>>
>>
>>
>> Hi,
>>
>>
>>
>> Nice trick, but there is now a simpler way to achieve this.
>>
>>
>>
>> We tend to prefer webadmin now than cli for new features (cli will
>> probably be replaced by webadmin in a future version). So with
>> webadmin you can easily reprocess a mail repository, see here:
>>
>> http://james.apache.org/server/manage-webadmin.html#Reprocessing_mails_from_a_mail_repository
>>
>>
>>
>>
>> Regards,
>>
>> Raphaël.
>>
>>
>>
>> Le 2019-02-19 19:37, Craig Cudmore a écrit :
>>
>>> Here's a high-level list of steps you need to re-process rejected
>>
>>> message:
>>
>>> 1) Configure your mailetcontainer.xml to have a mailet like:
>>
>>> <mailet
>>> match=:"RecientIs=trigger@mail.com<ma...@mail.com>" class="FromRepository">
>>>
>>
>>>  
>>> <repositoryPath>file://var/mail/error</repositoryPath<file:///\\var\mail\error%3c\repositoryPath>>
>>>
>>
>>>   <processor>process</processor>
>>
>>>   <delete>true</delete>
>>
>>> </mailet>
>>
>>>
>>
>>> This mailet will look for mails that are being sent from
>>
>>> trigger@mail.com<ma...@mail.com> and if it finds one, it
>>> will throw away the trigger
>>
>>> message and tell James to grab any messages in the /var/mail/error
>>
>>> queue to re-process.
>>
>>>
>>
>>> 2) Restart James. The reader pointer in the FromRepository needs to be
>>
>>> reset back to the beginning of the error queue. If you're using a
>>
>>> database for your repository you likely won't need this step.
>>
>>>
>>
>>> 3) Send a message to james to
>>> "trigger@mail.com<ma...@mail.com>".
>>
>>>
>>
>>> Then James should reprocess any messages in the error queue.
>>
>>>
>>
>>> On Tue, Feb 19, 2019 at 1:24 PM cryptearth
>>> <cr...@cryptearth.de>>
>>
>>> wrote:
>>
>>>
>>
>>>> Hey Jeffrey,
>>
>>>>
>>
>>>> this awnser could be wrong as I don't now for sure, but I guess once
>>
>>>> a mail is filtered into one of the error-directories - it's out of
>>
>>>> the queue. But I could be wrong because the mails stored as
>>
>>>> serialized java objects - wich also should be able to be read in back
>>
>>>> again for further processing. But as re-processing would need some
>>
>>>> action by the user or an admin - there's no command to reprocess
>>
>>>> filtered-out messages - at least it doesn't show up for james-cli.sh.
>>
>>>>
>>
>>>> Matt
>>
>>>>
>>
>>>> Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:
>>
>>>> > I'm setting up a proof of concept mail system using apache james
>>
>>>> > 3.2
>>
>>>> with minimal mods.
>>
>>>> > I have a Postal load test server that sends to a james relay which
>>
>>>> forwards the email to a second james server. The latter persists the
>>
>>>> messages into a MySQL database.
>>
>>>> > During testing I turn off various components, and I've found
>>
>>>> undeliverable messages accumulating in the second server
>>
>>>> james/var/mail/error directory when the db server is off-line.
>>
>>>> > How do I get james to reprocess the messages?
>>
>>>> >
>>
>>>> > Regards,
>>
>>>> > Jeffrey Marans.
>>
>>>> >
>>
>>>> >
>>
>>>>
>>
>>>>
>>
>>>> ---------------------------------------------------------------------
>>
>>>> To unsubscribe, e-mail:
>>>> server-user-unsubscribe@james.apache.org<ma...@james.apache.org>
>>>>
>>
>>>> For additional commands, e-mail:
>>>> server-user-help@james.apache.org<ma...@james.apache.org>
>>>>
>>
>>>>
>>
>>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>>
>> To unsubscribe, e-mail:
>> server-user-unsubscribe@james.apache.org<ma...@james.apache.org>
>>
>>
>> For additional commands, e-mail:
>> server-user-help@james.apache.org<ma...@james.apache.org>
>>
> 
> ---------------------------------------------------------------------
> 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


RE: how to resubmit failed messages

Posted by "Marans.Jeffrey" <Je...@cic.gc.ca>.
I think I'm fairly close now.
The james-jpa-guice-3.2.0 and the latest mysql driver took some configuring, but the database tables were finally instantiated.

I'm stuck on how to register the MailRepository detailed below.
728  Global  INFO   [main] openjpa.Runtime - Starting OpenJPA 3.0.0
757  Global  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.MySQLDictionary".
1088  Global  INFO   [main] openjpa.jdbc.JDBC - Connected to MySQL version 5.5 using JDBC driver MySQL Connector/J version mysql-connector-java-8.0.15 (Revision: 79a4336f140499bd22dd07f02b708e163844e3d5).

10:46:15.666 [INFO ] o.a.j.m.m.MemoryMailRepositoryStore - JamesMailStore init... org.apache.james.mailrepository.memory.MemoryMailRepositoryStore@24eeac69
Exception in thread "main" java.lang.RuntimeException: org.apache.commons.configuration.ConfigurationException: MailRepository org.apache.james.mailrepository.jdbc.JDBCMailRepository has not been registered

Jeffrey Marans



-----Original Message-----
From: Raphael OUAZANA [mailto:raphael.ouazana@linagora.com] 
Sent: Wednesday, February 20, 2019 10:38 AM
To: Marans.Jeffrey <Je...@cic.gc.ca>
Subject: RE: how to resubmit failed messages

There is a downloadable version of Guice-JPA, see https://james.apache.org/download.cgi#Apache_James_Server .

But I'm not sure this version includes webadmin, I must check.

Can you tell us where is the doc telling that Guice is only for Cassandra? It seems to be wrong.

Regards,
Raphaël.

Le 2019-02-20 16:07, Marans.Jeffrey a écrit :
> If I understand the docs, I need to configure Guice in order to get 
> webadmin.
> The docs say Guice is configured only for Cassandra backend.
> I've the source package, so I found the webadmin properties file, but 
> restarting james isn't enough.
> I don't understand the interdependencies between the various modules.
> 
> What am I missing here?
> 
> -----Original Message-----
> From: Raphael OUAZANA [mailto:raphael.ouazana@linagora.com]
> Sent: Wednesday, February 20, 2019 9:21 AM
> To: James Users List <se...@james.apache.org>
> Cc: Craig Cudmore <cr...@cudmore.ca>
> Subject: RE: how to resubmit failed messages
> 
> Hi Jeffrey,
> 
> You are trying to contact James on port 25, which is for SMTP.
> 
> Webadmin is listening by default on port 8000.
> 
> Regards,
> Raphaël.
> 
> Le 2019-02-20 13:59, Marans.Jeffrey a écrit :
>> Hi Raphael.
>> 
>> I’m using james-server-app-3.2.0.
>> 
>> Path is /opt/cibids/james-server-app-3.2.0 and I wonder if I’m 
>> missing some syntax.
>> 
>> 
>> 
>> curl -XPATCH
>> http://172.16.251.133:25/mailRepositories/var%2Fmail%2Ferror%2F/mails?
>> action=reprocess
>> 
>> 
>> 
>> 220 irc JAMES SMTP Server Server (JAMES SMTP Server ) ready
>> 
>> 500 5.5.1 Command PATCH unrecognized.
>> 
>> 500 5.5.1 Command USER-AGENT: unrecognized.
>> 
>> 500 5.5.1 Command HOST: unrecognized.
>> 
>> 500 5.5.1 Command ACCEPT: unrecognized.
>> 
>> 500 5.5.1 Command  unrecognized.
>> 
>> 
>> 
>> 
>> 
>> Jeffrey Marans
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> -----Original Message-----
>> From: Raphael OUAZANA [mailto:raphael.ouazana@linagora.com]
>> Sent: Tuesday, February 19, 2019 3:47 PM
>> To: James Users List <se...@james.apache.org>
>> Cc: Craig Cudmore <cr...@cudmore.ca>
>> Subject: Re: how to resubmit failed messages
>> 
>> 
>> 
>> Hi,
>> 
>> 
>> 
>> Nice trick, but there is now a simpler way to achieve this.
>> 
>> 
>> 
>> We tend to prefer webadmin now than cli for new features (cli will 
>> probably be replaced by webadmin in a future version). So with 
>> webadmin you can easily reprocess a mail repository, see here:
>> 
>> http://james.apache.org/server/manage-webadmin.html#Reprocessing_mail
>> s
>> _from_a_mail_repository
>> 
>> 
>> 
>> Regards,
>> 
>> Raphaël.
>> 
>> 
>> 
>> Le 2019-02-19 19:37, Craig Cudmore a écrit :
>> 
>>> Here's a high-level list of steps you need to re-process rejected
>> 
>>> message:
>> 
>>> 1) Configure your mailetcontainer.xml to have a mailet like:
>> 
>>> <mailet
>>> match=:"RecientIs=trigger@mail.com<ma...@mail.com>"
>>> class="FromRepository">
>> 
>>> 
>>> <repositoryPath>file://var/mail/error</repositoryPath<file:///\\var\
>>> m
>>> ail\error%3c\repositoryPath>>
>> 
>>>   <processor>process</processor>
>> 
>>>   <delete>true</delete>
>> 
>>> </mailet>
>> 
>>> 
>> 
>>> This mailet will look for mails that are being sent from
>> 
>>> trigger@mail.com<ma...@mail.com> and if it finds one, it 
>>> will throw away the trigger
>> 
>>> message and tell James to grab any messages in the /var/mail/error
>> 
>>> queue to re-process.
>> 
>>> 
>> 
>>> 2) Restart James. The reader pointer in the FromRepository needs to 
>>> be
>> 
>>> reset back to the beginning of the error queue. If you're using a
>> 
>>> database for your repository you likely won't need this step.
>> 
>>> 
>> 
>>> 3) Send a message to james to
>>> "trigger@mail.com<ma...@mail.com>".
>> 
>>> 
>> 
>>> Then James should reprocess any messages in the error queue.
>> 
>>> 
>> 
>>> On Tue, Feb 19, 2019 at 1:24 PM cryptearth 
>>> <cr...@cryptearth.de>>
>> 
>>> wrote:
>> 
>>> 
>> 
>>>> Hey Jeffrey,
>> 
>>>> 
>> 
>>>> this awnser could be wrong as I don't now for sure, but I guess 
>>>> once
>> 
>>>> a mail is filtered into one of the error-directories - it's out of
>> 
>>>> the queue. But I could be wrong because the mails stored as
>> 
>>>> serialized java objects - wich also should be able to be read in 
>>>> back
>> 
>>>> again for further processing. But as re-processing would need some
>> 
>>>> action by the user or an admin - there's no command to reprocess
>> 
>>>> filtered-out messages - at least it doesn't show up for 
>>>> james-cli.sh.
>> 
>>>> 
>> 
>>>> Matt
>> 
>>>> 
>> 
>>>> Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:
>> 
>>>> > I'm setting up a proof of concept mail system using apache james
>> 
>>>> > 3.2
>> 
>>>> with minimal mods.
>> 
>>>> > I have a Postal load test server that sends to a james relay 
>>>> > which
>> 
>>>> forwards the email to a second james server. The latter persists 
>>>> the
>> 
>>>> messages into a MySQL database.
>> 
>>>> > During testing I turn off various components, and I've found
>> 
>>>> undeliverable messages accumulating in the second server
>> 
>>>> james/var/mail/error directory when the db server is off-line.
>> 
>>>> > How do I get james to reprocess the messages?
>> 
>>>> >
>> 
>>>> > Regards,
>> 
>>>> > Jeffrey Marans.
>> 
>>>> >
>> 
>>>> >
>> 
>>>> 
>> 
>>>> 
>> 
>>>> -------------------------------------------------------------------
>>>> -
>>>> -
>> 
>>>> To unsubscribe, e-mail:
>>>> server-user-unsubscribe@james.apache.org<mailto:server-user-unsubsc
>>>> r
>>>> ibe@james.apache.org>
>> 
>>>> For additional commands, e-mail:
>>>> server-user-help@james.apache.org<mailto:server-user-help@james.apa
>>>> c
>>>> he.org>
>> 
>>>> 
>> 
>>>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> 
>> To unsubscribe, e-mail:
>> server-user-unsubscribe@james.apache.org<mailto:server-user-unsubscri
>> b
>> e@james.apache.org>
>> 
>> For additional commands, e-mail:
>> server-user-help@james.apache.org<mailto:server-user-help@james.apach
>> e
>> .org>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org

RE: how to resubmit failed messages

Posted by Raphael OUAZANA <ra...@linagora.com>.
Hi Jeffrey,

You are trying to contact James on port 25, which is for SMTP.

Webadmin is listening by default on port 8000.

Regards,
Raphaël.

Le 2019-02-20 13:59, Marans.Jeffrey a écrit :
> Hi Raphael.
> 
> I’m using james-server-app-3.2.0.
> 
> Path is /opt/cibids/james-server-app-3.2.0 and I wonder if I’m missing
> some syntax.
> 
> 
> 
> curl -XPATCH
> http://172.16.251.133:25/mailRepositories/var%2Fmail%2Ferror%2F/mails?action=reprocess
> 
> 
> 
> 220 irc JAMES SMTP Server Server (JAMES SMTP Server ) ready
> 
> 500 5.5.1 Command PATCH unrecognized.
> 
> 500 5.5.1 Command USER-AGENT: unrecognized.
> 
> 500 5.5.1 Command HOST: unrecognized.
> 
> 500 5.5.1 Command ACCEPT: unrecognized.
> 
> 500 5.5.1 Command  unrecognized.
> 
> 
> 
> 
> 
> Jeffrey Marans
> 
> 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Raphael OUAZANA [mailto:raphael.ouazana@linagora.com]
> Sent: Tuesday, February 19, 2019 3:47 PM
> To: James Users List <se...@james.apache.org>
> Cc: Craig Cudmore <cr...@cudmore.ca>
> Subject: Re: how to resubmit failed messages
> 
> 
> 
> Hi,
> 
> 
> 
> Nice trick, but there is now a simpler way to achieve this.
> 
> 
> 
> We tend to prefer webadmin now than cli for new features (cli will
> probably be replaced by webadmin in a future version). So with
> webadmin you can easily reprocess a mail repository, see here:
> 
> http://james.apache.org/server/manage-webadmin.html#Reprocessing_mails_from_a_mail_repository
> 
> 
> 
> Regards,
> 
> Raphaël.
> 
> 
> 
> Le 2019-02-19 19:37, Craig Cudmore a écrit :
> 
>> Here's a high-level list of steps you need to re-process rejected
> 
>> message:
> 
>> 1) Configure your mailetcontainer.xml to have a mailet like:
> 
>> <mailet 
>> match=:"RecientIs=trigger@mail.com<ma...@mail.com>" 
>> class="FromRepository">
> 
>>   
>> <repositoryPath>file://var/mail/error</repositoryPath<file:///\\var\mail\error%3c\repositoryPath>>
> 
>>   <processor>process</processor>
> 
>>   <delete>true</delete>
> 
>> </mailet>
> 
>> 
> 
>> This mailet will look for mails that are being sent from
> 
>> trigger@mail.com<ma...@mail.com> and if it finds one, it will 
>> throw away the trigger
> 
>> message and tell James to grab any messages in the /var/mail/error
> 
>> queue to re-process.
> 
>> 
> 
>> 2) Restart James. The reader pointer in the FromRepository needs to be
> 
>> reset back to the beginning of the error queue. If you're using a
> 
>> database for your repository you likely won't need this step.
> 
>> 
> 
>> 3) Send a message to james to 
>> "trigger@mail.com<ma...@mail.com>".
> 
>> 
> 
>> Then James should reprocess any messages in the error queue.
> 
>> 
> 
>> On Tue, Feb 19, 2019 at 1:24 PM cryptearth 
>> <cr...@cryptearth.de>>
> 
>> wrote:
> 
>> 
> 
>>> Hey Jeffrey,
> 
>>> 
> 
>>> this awnser could be wrong as I don't now for sure, but I guess once
> 
>>> a mail is filtered into one of the error-directories - it's out of
> 
>>> the queue. But I could be wrong because the mails stored as
> 
>>> serialized java objects - wich also should be able to be read in back
> 
>>> again for further processing. But as re-processing would need some
> 
>>> action by the user or an admin - there's no command to reprocess
> 
>>> filtered-out messages - at least it doesn't show up for james-cli.sh.
> 
>>> 
> 
>>> Matt
> 
>>> 
> 
>>> Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:
> 
>>> > I'm setting up a proof of concept mail system using apache james
> 
>>> > 3.2
> 
>>> with minimal mods.
> 
>>> > I have a Postal load test server that sends to a james relay which
> 
>>> forwards the email to a second james server. The latter persists the
> 
>>> messages into a MySQL database.
> 
>>> > During testing I turn off various components, and I've found
> 
>>> undeliverable messages accumulating in the second server
> 
>>> james/var/mail/error directory when the db server is off-line.
> 
>>> > How do I get james to reprocess the messages?
> 
>>> >
> 
>>> > Regards,
> 
>>> > Jeffrey Marans.
> 
>>> >
> 
>>> >
> 
>>> 
> 
>>> 
> 
>>> ---------------------------------------------------------------------
> 
>>> To unsubscribe, e-mail: 
>>> server-user-unsubscribe@james.apache.org<ma...@james.apache.org>
> 
>>> For additional commands, e-mail: 
>>> server-user-help@james.apache.org<ma...@james.apache.org>
> 
>>> 
> 
>>> 
> 
> 
> 
> ---------------------------------------------------------------------
> 
> To unsubscribe, e-mail:
> server-user-unsubscribe@james.apache.org<ma...@james.apache.org>
> 
> For additional commands, e-mail:
> server-user-help@james.apache.org<ma...@james.apache.org>

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


RE: how to resubmit failed messages

Posted by "Marans.Jeffrey" <Je...@cic.gc.ca>.
Hi Raphael.

I’m using james-server-app-3.2.0.

Path is /opt/cibids/james-server-app-3.2.0 and I wonder if I’m missing some syntax.



curl -XPATCH http://172.16.251.133:25/mailRepositories/var%2Fmail%2Ferror%2F/mails?action=reprocess



220 irc JAMES SMTP Server Server (JAMES SMTP Server ) ready

500 5.5.1 Command PATCH unrecognized.

500 5.5.1 Command USER-AGENT: unrecognized.

500 5.5.1 Command HOST: unrecognized.

500 5.5.1 Command ACCEPT: unrecognized.

500 5.5.1 Command  unrecognized.





Jeffrey Marans







-----Original Message-----
From: Raphael OUAZANA [mailto:raphael.ouazana@linagora.com]
Sent: Tuesday, February 19, 2019 3:47 PM
To: James Users List <se...@james.apache.org>
Cc: Craig Cudmore <cr...@cudmore.ca>
Subject: Re: how to resubmit failed messages



Hi,



Nice trick, but there is now a simpler way to achieve this.



We tend to prefer webadmin now than cli for new features (cli will probably be replaced by webadmin in a future version). So with webadmin you can easily reprocess a mail repository, see here:

http://james.apache.org/server/manage-webadmin.html#Reprocessing_mails_from_a_mail_repository



Regards,

Raphaël.



Le 2019-02-19 19:37, Craig Cudmore a écrit :

> Here's a high-level list of steps you need to re-process rejected

> message:

> 1) Configure your mailetcontainer.xml to have a mailet like:

> <mailet match=:"RecientIs=trigger@mail.com<ma...@mail.com>" class="FromRepository">

>   <repositoryPath>file://var/mail/error</repositoryPath<file:///\\var\mail\error%3c\repositoryPath>>

>   <processor>process</processor>

>   <delete>true</delete>

> </mailet>

>

> This mailet will look for mails that are being sent from

> trigger@mail.com<ma...@mail.com> and if it finds one, it will throw away the trigger

> message and tell James to grab any messages in the /var/mail/error

> queue to re-process.

>

> 2) Restart James. The reader pointer in the FromRepository needs to be

> reset back to the beginning of the error queue. If you're using a

> database for your repository you likely won't need this step.

>

> 3) Send a message to james to "trigger@mail.com<ma...@mail.com>".

>

> Then James should reprocess any messages in the error queue.

>

> On Tue, Feb 19, 2019 at 1:24 PM cryptearth <cr...@cryptearth.de>>

> wrote:

>

>> Hey Jeffrey,

>>

>> this awnser could be wrong as I don't now for sure, but I guess once

>> a mail is filtered into one of the error-directories - it's out of

>> the queue. But I could be wrong because the mails stored as

>> serialized java objects - wich also should be able to be read in back

>> again for further processing. But as re-processing would need some

>> action by the user or an admin - there's no command to reprocess

>> filtered-out messages - at least it doesn't show up for james-cli.sh.

>>

>> Matt

>>

>> Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:

>> > I'm setting up a proof of concept mail system using apache james

>> > 3.2

>> with minimal mods.

>> > I have a Postal load test server that sends to a james relay which

>> forwards the email to a second james server. The latter persists the

>> messages into a MySQL database.

>> > During testing I turn off various components, and I've found

>> undeliverable messages accumulating in the second server

>> james/var/mail/error directory when the db server is off-line.

>> > How do I get james to reprocess the messages?

>> >

>> > Regards,

>> > Jeffrey Marans.

>> >

>> >

>>

>>

>> ---------------------------------------------------------------------

>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org<ma...@james.apache.org>

>> For additional commands, e-mail: server-user-help@james.apache.org<ma...@james.apache.org>

>>

>>



---------------------------------------------------------------------

To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org<ma...@james.apache.org>

For additional commands, e-mail: server-user-help@james.apache.org<ma...@james.apache.org>



Re: how to resubmit failed messages

Posted by Raphael OUAZANA <ra...@linagora.com>.
Hi,

Nice trick, but there is now a simpler way to achieve this.

We tend to prefer webadmin now than cli for new features (cli will 
probably be replaced by webadmin in a future version). So with webadmin 
you can easily reprocess a mail repository, see here:
http://james.apache.org/server/manage-webadmin.html#Reprocessing_mails_from_a_mail_repository

Regards,
Raphaël.

Le 2019-02-19 19:37, Craig Cudmore a écrit :
> Here's a high-level list of steps you need to re-process rejected 
> message:
> 1) Configure your mailetcontainer.xml to have a mailet like:
> <mailet match=:"RecientIs=trigger@mail.com" class="FromRepository">
>   <repositoryPath>file://var/mail/error</repositoryPath>
>   <processor>process</processor>
>   <delete>true</delete>
> </mailet>
> 
> This mailet will look for mails that are being sent from 
> trigger@mail.com
> and if it finds one, it will throw away the trigger message and tell 
> James
> to grab any messages in the /var/mail/error queue to re-process.
> 
> 2) Restart James. The reader pointer in the FromRepository needs to be
> reset back to the beginning of the error queue. If you're using a 
> database
> for your repository you likely won't need this step.
> 
> 3) Send a message to james to "trigger@mail.com".
> 
> Then James should reprocess any messages in the error queue.
> 
> On Tue, Feb 19, 2019 at 1:24 PM cryptearth <cr...@cryptearth.de> 
> wrote:
> 
>> Hey Jeffrey,
>> 
>> this awnser could be wrong as I don't now for sure, but I guess once a
>> mail is filtered into one of the error-directories - it's out of the
>> queue. But I could be wrong because the mails stored as serialized 
>> java
>> objects - wich also should be able to be read in back again for 
>> further
>> processing. But as re-processing would need some action by the user or
>> an admin - there's no command to reprocess filtered-out messages - at
>> least it doesn't show up for james-cli.sh.
>> 
>> Matt
>> 
>> Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:
>> > I'm setting up a proof of concept mail system using apache james 3.2
>> with minimal mods.
>> > I have a Postal load test server that sends to a james relay which
>> forwards the email to a second james server. The latter persists the
>> messages into a MySQL database.
>> > During testing I turn off various components, and I've found
>> undeliverable messages accumulating in the second server
>> james/var/mail/error directory when the db server is off-line.
>> > How do I get james to reprocess the messages?
>> >
>> > Regards,
>> > Jeffrey Marans.
>> >
>> >
>> 
>> 
>> ---------------------------------------------------------------------
>> 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


RE: how to resubmit failed messages

Posted by "Marans.Jeffrey" <Je...@cic.gc.ca>.
I think the trigger xml needs to reside inside a <processor state=..> block.
I've put it in the error state block and the message is processed like any other.
I'll try putting it into the root block.


-----Original Message-----
From: Craig Cudmore [mailto:craig@cudmore.ca] 
Sent: Wednesday, February 20, 2019 9:09 AM
To: James Users List <se...@james.apache.org>
Subject: Re: how to resubmit failed messages

Yes you are correct on the format of the matcher. I was doing it from memory…

Is the matcher near the beginning of the mailetcontainer.xml? It needs to be in the right place in the message processing flow that the message to trigger gets processed before going to the main processor. You can always put in some LogMessage calls to write debug the process flow and make sure you’re trigger message is being processed in the right sequence.

> On Feb 20, 2019, at 9:00 AM, Marans.Jeffrey <Je...@cic.gc.ca> wrote:
> 
> Hi Craig.
> 
> I think the match line you suggest below should read  <mailet match="RecipientIs=trigger@ircc.caa" class="FromRepository">
> 
> 
> 
> James starts without error and when I send message to trigger@ircc.caa<ma...@ircc.caa>   it’s delivered as you see below, but the error directory isn’t reprocessed. I’ve tried using the absolute and relative paths to the error directory.
> 
> 
> 
> I can’t find anything in the docs regarding resetting the  “reader pointer in the FromRepository”.
> 
> 
> 
> Jeff.
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Craig Cudmore [mailto:craig@cudmore.ca]
> Sent: Tuesday, February 19, 2019 1:38 PM
> To: James Users List <se...@james.apache.org>
> Subject: Re: how to resubmit failed messages
> 
> 
> 
> Here's a high-level list of steps you need to re-process rejected message:
> 
> 1) Configure your mailetcontainer.xml to have a mailet like:
> 
> <mailet match=:"RecientIs=trigger@mail.com<ma...@mail.com>" class="FromRepository">
> 
>  <repositoryPath>file://var/mail/error</repositoryPath<file:///\\var\mail\error%3c\repositoryPath>>
> 
>  <processor>process</processor>
> 
>  <delete>true</delete>
> 
> </mailet>
> 
> 
> 
> This mailet will look for mails that are being sent from trigger@mail.com<ma...@mail.com> and if it finds one, it will throw away the trigger message and tell James to grab any messages in the /var/mail/error queue to re-process.
> 
> 
> 
> 2) Restart James. The reader pointer in the FromRepository needs to be reset back to the beginning of the error queue. If you're using a database for your repository you likely won't need this step.
> 
> 
> 
> 3) Send a message to james to "trigger@mail.com<ma...@mail.com>".
> 
> 
> 
> Then James should reprocess any messages in the error queue.
> 
> 
> 
> On Tue, Feb 19, 2019 at 1:24 PM cryptearth <cr...@cryptearth.de>> wrote:
> 
> 
> 
>> Hey Jeffrey,
> 
>> 
> 
>> this awnser could be wrong as I don't now for sure, but I guess once a
> 
>> mail is filtered into one of the error-directories - it's out of the
> 
>> queue. But I could be wrong because the mails stored as serialized
> 
>> java objects - wich also should be able to be read in back again for
> 
>> further processing. But as re-processing would need some action by the
> 
>> user or an admin - there's no command to reprocess filtered-out
> 
>> messages - at least it doesn't show up for james-cli.sh.
> 
>> 
> 
>> Matt
> 
>> 
> 
>> Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:
> 
>>> I'm setting up a proof of concept mail system using apache james 3.2
> 
>> with minimal mods.
> 
>>> I have a Postal load test server that sends to a james relay which
> 
>> forwards the email to a second james server. The latter persists the
> 
>> messages into a MySQL database.
> 
>>> During testing I turn off various components, and I've found
> 
>> undeliverable messages accumulating in the second server
> 
>> james/var/mail/error directory when the db server is off-line.
> 
>>> How do I get james to reprocess the messages?
> 
>>> 
> 
>>> Regards,
> 
>>> Jeffrey Marans.
> 
>>> 
> 
>>> 
> 
>> 
> 
>> 
> 
>> ---------------------------------------------------------------------
> 
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org<ma...@james.apache.org>
> 
>> For additional commands, e-mail: server-user-help@james.apache.org<ma...@james.apache.org>
> 
>> 
> 
>> 


---------------------------------------------------------------------
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

Re: how to resubmit failed messages

Posted by Craig Cudmore <cr...@cudmore.ca>.
Yes you are correct on the format of the matcher. I was doing it from memory…

Is the matcher near the beginning of the mailetcontainer.xml? It needs to be in the right place in the message processing flow that the message to trigger gets processed before going to the main processor. You can always put in some LogMessage calls to write debug the process flow and make sure you’re trigger message is being processed in the right sequence.

> On Feb 20, 2019, at 9:00 AM, Marans.Jeffrey <Je...@cic.gc.ca> wrote:
> 
> Hi Craig.
> 
> I think the match line you suggest below should read  <mailet match="RecipientIs=trigger@ircc.caa" class="FromRepository">
> 
> 
> 
> James starts without error and when I send message to trigger@ircc.caa<ma...@ircc.caa>   it’s delivered as you see below, but the error directory isn’t reprocessed. I’ve tried using the absolute and relative paths to the error directory.
> 
> 
> 
> I can’t find anything in the docs regarding resetting the  “reader pointer in the FromRepository”.
> 
> 
> 
> Jeff.
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Craig Cudmore [mailto:craig@cudmore.ca]
> Sent: Tuesday, February 19, 2019 1:38 PM
> To: James Users List <se...@james.apache.org>
> Subject: Re: how to resubmit failed messages
> 
> 
> 
> Here's a high-level list of steps you need to re-process rejected message:
> 
> 1) Configure your mailetcontainer.xml to have a mailet like:
> 
> <mailet match=:"RecientIs=trigger@mail.com<ma...@mail.com>" class="FromRepository">
> 
>  <repositoryPath>file://var/mail/error</repositoryPath<file:///\\var\mail\error%3c\repositoryPath>>
> 
>  <processor>process</processor>
> 
>  <delete>true</delete>
> 
> </mailet>
> 
> 
> 
> This mailet will look for mails that are being sent from trigger@mail.com<ma...@mail.com> and if it finds one, it will throw away the trigger message and tell James to grab any messages in the /var/mail/error queue to re-process.
> 
> 
> 
> 2) Restart James. The reader pointer in the FromRepository needs to be reset back to the beginning of the error queue. If you're using a database for your repository you likely won't need this step.
> 
> 
> 
> 3) Send a message to james to "trigger@mail.com<ma...@mail.com>".
> 
> 
> 
> Then James should reprocess any messages in the error queue.
> 
> 
> 
> On Tue, Feb 19, 2019 at 1:24 PM cryptearth <cr...@cryptearth.de>> wrote:
> 
> 
> 
>> Hey Jeffrey,
> 
>> 
> 
>> this awnser could be wrong as I don't now for sure, but I guess once a
> 
>> mail is filtered into one of the error-directories - it's out of the
> 
>> queue. But I could be wrong because the mails stored as serialized
> 
>> java objects - wich also should be able to be read in back again for
> 
>> further processing. But as re-processing would need some action by the
> 
>> user or an admin - there's no command to reprocess filtered-out
> 
>> messages - at least it doesn't show up for james-cli.sh.
> 
>> 
> 
>> Matt
> 
>> 
> 
>> Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:
> 
>>> I'm setting up a proof of concept mail system using apache james 3.2
> 
>> with minimal mods.
> 
>>> I have a Postal load test server that sends to a james relay which
> 
>> forwards the email to a second james server. The latter persists the
> 
>> messages into a MySQL database.
> 
>>> During testing I turn off various components, and I've found
> 
>> undeliverable messages accumulating in the second server
> 
>> james/var/mail/error directory when the db server is off-line.
> 
>>> How do I get james to reprocess the messages?
> 
>>> 
> 
>>> Regards,
> 
>>> Jeffrey Marans.
> 
>>> 
> 
>>> 
> 
>> 
> 
>> 
> 
>> ---------------------------------------------------------------------
> 
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org<ma...@james.apache.org>
> 
>> For additional commands, e-mail: server-user-help@james.apache.org<ma...@james.apache.org>
> 
>> 
> 
>> 


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


RE: how to resubmit failed messages

Posted by "Marans.Jeffrey" <Je...@cic.gc.ca>.
Hi Craig.

I think the match line you suggest below should read  <mailet match="RecipientIs=trigger@ircc.caa" class="FromRepository">



James starts without error and when I send message to trigger@ircc.caa<ma...@ircc.caa>   it’s delivered as you see below, but the error directory isn’t reprocessed. I’ve tried using the absolute and relative paths to the error directory.



I can’t find anything in the docs regarding resetting the  “reader pointer in the FromRepository”.



Jeff.





-----Original Message-----
From: Craig Cudmore [mailto:craig@cudmore.ca]
Sent: Tuesday, February 19, 2019 1:38 PM
To: James Users List <se...@james.apache.org>
Subject: Re: how to resubmit failed messages



Here's a high-level list of steps you need to re-process rejected message:

1) Configure your mailetcontainer.xml to have a mailet like:

<mailet match=:"RecientIs=trigger@mail.com<ma...@mail.com>" class="FromRepository">

  <repositoryPath>file://var/mail/error</repositoryPath<file:///\\var\mail\error%3c\repositoryPath>>

  <processor>process</processor>

  <delete>true</delete>

</mailet>



This mailet will look for mails that are being sent from trigger@mail.com<ma...@mail.com> and if it finds one, it will throw away the trigger message and tell James to grab any messages in the /var/mail/error queue to re-process.



2) Restart James. The reader pointer in the FromRepository needs to be reset back to the beginning of the error queue. If you're using a database for your repository you likely won't need this step.



3) Send a message to james to "trigger@mail.com<ma...@mail.com>".



Then James should reprocess any messages in the error queue.



On Tue, Feb 19, 2019 at 1:24 PM cryptearth <cr...@cryptearth.de>> wrote:



> Hey Jeffrey,

>

> this awnser could be wrong as I don't now for sure, but I guess once a

> mail is filtered into one of the error-directories - it's out of the

> queue. But I could be wrong because the mails stored as serialized

> java objects - wich also should be able to be read in back again for

> further processing. But as re-processing would need some action by the

> user or an admin - there's no command to reprocess filtered-out

> messages - at least it doesn't show up for james-cli.sh.

>

> Matt

>

> Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:

> > I'm setting up a proof of concept mail system using apache james 3.2

> with minimal mods.

> > I have a Postal load test server that sends to a james relay which

> forwards the email to a second james server. The latter persists the

> messages into a MySQL database.

> > During testing I turn off various components, and I've found

> undeliverable messages accumulating in the second server

> james/var/mail/error directory when the db server is off-line.

> > How do I get james to reprocess the messages?

> >

> > Regards,

> > Jeffrey Marans.

> >

> >

>

>

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org<ma...@james.apache.org>

> For additional commands, e-mail: server-user-help@james.apache.org<ma...@james.apache.org>

>

>

Re: how to resubmit failed messages

Posted by Craig Cudmore <cr...@cudmore.ca>.
Here's a high-level list of steps you need to re-process rejected message:
1) Configure your mailetcontainer.xml to have a mailet like:
<mailet match=:"RecientIs=trigger@mail.com" class="FromRepository">
  <repositoryPath>file://var/mail/error</repositoryPath>
  <processor>process</processor>
  <delete>true</delete>
</mailet>

This mailet will look for mails that are being sent from trigger@mail.com
and if it finds one, it will throw away the trigger message and tell James
to grab any messages in the /var/mail/error queue to re-process.

2) Restart James. The reader pointer in the FromRepository needs to be
reset back to the beginning of the error queue. If you're using a database
for your repository you likely won't need this step.

3) Send a message to james to "trigger@mail.com".

Then James should reprocess any messages in the error queue.

On Tue, Feb 19, 2019 at 1:24 PM cryptearth <cr...@cryptearth.de> wrote:

> Hey Jeffrey,
>
> this awnser could be wrong as I don't now for sure, but I guess once a
> mail is filtered into one of the error-directories - it's out of the
> queue. But I could be wrong because the mails stored as serialized java
> objects - wich also should be able to be read in back again for further
> processing. But as re-processing would need some action by the user or
> an admin - there's no command to reprocess filtered-out messages - at
> least it doesn't show up for james-cli.sh.
>
> Matt
>
> Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:
> > I'm setting up a proof of concept mail system using apache james 3.2
> with minimal mods.
> > I have a Postal load test server that sends to a james relay which
> forwards the email to a second james server. The latter persists the
> messages into a MySQL database.
> > During testing I turn off various components, and I've found
> undeliverable messages accumulating in the second server
> james/var/mail/error directory when the db server is off-line.
> > How do I get james to reprocess the messages?
> >
> > Regards,
> > Jeffrey Marans.
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

RE: how to resubmit failed messages

Posted by "Marans.Jeffrey" <Je...@cic.gc.ca>.
Thanks Matt.
I'm hopeful someone has encountered this before.
The failure condition I'm expecting is a 20,000 message backlog requiring admin intervention and likely scripting.

Jeff.


-----Original Message-----
From: cryptearth [mailto:cryptearth@cryptearth.de] 
Sent: Tuesday, February 19, 2019 1:24 PM
To: server-user@james.apache.org
Subject: Re: how to resubmit failed messages

Hey Jeffrey,

this awnser could be wrong as I don't now for sure, but I guess once a mail is filtered into one of the error-directories - it's out of the queue. But I could be wrong because the mails stored as serialized java objects - wich also should be able to be read in back again for further processing. But as re-processing would need some action by the user or an admin - there's no command to reprocess filtered-out messages - at least it doesn't show up for james-cli.sh.

Matt

Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:
> I'm setting up a proof of concept mail system using apache james 3.2 with minimal mods.
> I have a Postal load test server that sends to a james relay which forwards the email to a second james server. The latter persists the messages into a MySQL database.
> During testing I turn off various components, and I've found undeliverable messages accumulating in the second server james/var/mail/error directory when the db server is off-line.
> How do I get james to reprocess the messages?
>
> Regards,
> Jeffrey Marans.
>
>


---------------------------------------------------------------------
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


Re: how to resubmit failed messages

Posted by cryptearth <cr...@cryptearth.de>.
Hey Jeffrey,

this awnser could be wrong as I don't now for sure, but I guess once a 
mail is filtered into one of the error-directories - it's out of the 
queue. But I could be wrong because the mails stored as serialized java 
objects - wich also should be able to be read in back again for further 
processing. But as re-processing would need some action by the user or 
an admin - there's no command to reprocess filtered-out messages - at 
least it doesn't show up for james-cli.sh.

Matt

Am 19.02.2019 um 19:17 schrieb Marans.Jeffrey:
> I'm setting up a proof of concept mail system using apache james 3.2 with minimal mods.
> I have a Postal load test server that sends to a james relay which forwards the email to a second james server. The latter persists the messages into a MySQL database.
> During testing I turn off various components, and I've found undeliverable messages accumulating in the second server james/var/mail/error directory when the db server is off-line.
> How do I get james to reprocess the messages?
>
> Regards,
> Jeffrey Marans.
>
>


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