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 Max Levinson <ma...@gmail.com> on 2010/08/16 12:00:43 UTC

Resending email from a DB repository.

Hi guys,

I have a situation which requires your help, I have this DB repository:

  <processor name="spam">
  <mailet match="All" class="ToRepository">
   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
  </mailet>
 </processor>

All spam goes here, what if a user will decide to release a message from
this repository(let's say release), how this can be achieved.

Maybe there is a mailet which can resend a message from repository?

Re: Resending email from a DB repository.

Posted by Jean Luc Guislain <jl...@gmail.com>.
Hi! I am a new user. I can't poll gmail with my james server (fetchmail).
The rest is OK. Please somebody help me... I need this working

On Mon, Aug 23, 2010 at 8:09 PM, Jean Luc Guislain <jl...@gmail.com>wrote:

> Please help jl.guislain@gmail.com
>
>
> On Mon, Aug 23, 2010 at 4:59 AM, Max Levinson <ma...@gmail.com>wrote:
>
>> Hi guys, can anyone help on this?
>>
>> 2010/8/19 Max Levinson <ma...@gmail.com>
>>
>> > Hi Norman,
>> >
>> > I just got achance to test it, as you know I am on James 3 from trunk.
>> >
>> > Have anyone actually tried this mailet with James 3.
>> >
>> > It's not working for me, unfortunately.
>> >
>> >   <mailet match="RecipientIs=max@max.com" class="FromRepository">
>> >   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>> >   <processor> transport </processor>
>> >   <delete>true</delete>
>> >   </mailet>
>> >
>> > It says in the logs that mailet was initialised, but it's not resending
>> > email.
>> >
>> > What can be the problem?
>> >
>> > 2010/8/16 Norman Maurer <no...@apache.org>
>> >
>> > Hi Max,
>> >>
>> >> check the FromRepository Mailet...
>> >>
>> >> http://james.apache.org/server/2.3.2/provided_mailets.html
>> >>
>> >> Bye,
>> >> Norman
>> >>
>> >> 2010/8/16 Max Levinson <ma...@gmail.com>:
>> >> > Hi guys,
>> >> >
>> >> > I have a situation which requires your help, I have this DB
>> repository:
>> >> >
>> >> >  <processor name="spam">
>> >> >  <mailet match="All" class="ToRepository">
>> >> >   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>> >> >  </mailet>
>> >> >  </processor>
>> >> >
>> >> > All spam goes here, what if a user will decide to release a message
>> from
>> >> > this repository(let's say release), how this can be achieved.
>> >> >
>> >> > Maybe there is a mailet which can resend a message from repository?
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> >> For additional commands, e-mail: server-user-help@james.apache.org
>> >>
>> >>
>> >
>>
>
>

Re: Resending email from a DB repository.

Posted by Jean Luc Guislain <jl...@gmail.com>.
Hi Eric!

Do you know if I can use the plain version of fetchmail that comes included
in the Slack 13.1 distro together with James?

JL


On Tue, Aug 24, 2010 at 10:08 AM, Jean Luc Guislain
<jl...@gmail.com>wrote:

> Hi Eric
>
> Thanks for your mail. I have reviewed the what I received from ezmlm and it
> does not tell how to start a new thread.
> I am pretty sure that my issue --How to poll gmail-- has been answered by
> somebody else but I just can't find it.
> I am using James 2.3.2 on a Slackware 13.1 box
>
> The log file looks OK
>
> JL
>
>
> On Tue, Aug 24, 2010 at 2:04 AM, Eric Charles <er...@apache.org> wrote:
>
>>  Hi Jean-Luc,
>>
>> Maybe you could start a new thread ? (I think you're talking on a new
>> topic)
>> You could indicate the version you're using (2.3, 3 ?) and the
>> configuration you used.
>> Do you see something in the logs ?
>>
>> Tks,
>>
>> Eric
>>
>>
>>
>> On 24/08/2010 02:13, Jean Luc Guislain wrote:
>>
>>> Hi! I am a new user. I can't poll gmail with my james server (fetchmail).
>>> The rest is OK. Please somebody help me... I need this working
>>>
>>> On Mon, Aug 23, 2010 at 8:09 PM, Jean Luc Guislain<jl.guislain@gmail.com
>>> >wrote:
>>>
>>>  Please help jl.guislain@gmail.com
>>>>
>>>>
>>>> On Mon, Aug 23, 2010 at 4:59 AM, Max Levinson<max.levinson@gmail.com
>>>> >wrote:
>>>>
>>>>  Hi guys, can anyone help on this?
>>>>>
>>>>> 2010/8/19 Max Levinson<ma...@gmail.com>
>>>>>
>>>>>  Hi Norman,
>>>>>>
>>>>>> I just got achance to test it, as you know I am on James 3 from trunk.
>>>>>>
>>>>>> Have anyone actually tried this mailet with James 3.
>>>>>>
>>>>>> It's not working for me, unfortunately.
>>>>>>
>>>>>>   <mailet match="RecipientIs=max@max.com" class="FromRepository">
>>>>>>   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>>>   <processor>  transport</processor>
>>>>>>   <delete>true</delete>
>>>>>>   </mailet>
>>>>>>
>>>>>> It says in the logs that mailet was initialised, but it's not
>>>>>> resending
>>>>>> email.
>>>>>>
>>>>>> What can be the problem?
>>>>>>
>>>>>> 2010/8/16 Norman Maurer<no...@apache.org>
>>>>>>
>>>>>> Hi Max,
>>>>>>
>>>>>>> check the FromRepository Mailet...
>>>>>>>
>>>>>>> http://james.apache.org/server/2.3.2/provided_mailets.html
>>>>>>>
>>>>>>> Bye,
>>>>>>> Norman
>>>>>>>
>>>>>>> 2010/8/16 Max Levinson<ma...@gmail.com>:
>>>>>>>
>>>>>>>> Hi guys,
>>>>>>>>
>>>>>>>> I have a situation which requires your help, I have this DB
>>>>>>>>
>>>>>>> repository:
>>>>>
>>>>>>  <processor name="spam">
>>>>>>>>  <mailet match="All" class="ToRepository">
>>>>>>>>   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>>>>  </mailet>
>>>>>>>>  </processor>
>>>>>>>>
>>>>>>>> All spam goes here, what if a user will decide to release a message
>>>>>>>>
>>>>>>> from
>>>>>
>>>>>> this repository(let's say release), how this can be achieved.
>>>>>>>>
>>>>>>>> Maybe there is a mailet which can resend a message from repository?
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>> 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
>>
>>
>

Fetchmail gmail (was: Re: Resending email from a DB repository.)

Posted by Eric Charles <er...@apache.org>.
Hi Jean Luc,

I searched for "fetchmail gmail" in mailing list, but didn't find an 
easy and working config for gmail.
I don't know much about slackware, but if slack fetchmail can inject 
mails via smtp in james, it should do the job.

Right now, I'm trying to make fetchmail work for james 3.0.
I will send you the config I used.

Btw, you should also check that your gmail is enabled for imap 
(http://mail.google.com/support/bin/answer.py?answer=77695)

Tks,

Eric


PS : To start a new thread, simply send your mail to 
server-user@james.apache.org with any subject.


On 08/24/2010 04:40 PM, Jean Luc Guislain wrote:
> Hi Eric!
>
> Do you know if I can use the plain version of fetchmail that comes included
> in the Slack 13.1 distro together with James?
>
> JL
>
>
> On Tue, Aug 24, 2010 at 10:08 AM, Jean Luc Guislain
> <jl...@gmail.com>wrote:
>
>    
>> Hi Eric
>>
>> Thanks for your mail. I have reviewed the what I received from ezmlm and it
>> does not tell how to start a new thread.
>> I am pretty sure that my issue --How to poll gmail-- has been answered by
>> somebody else but I just can't find it.
>> I am using James 2.3.2 on a Slackware 13.1 box
>>
>> The log file looks OK
>>
>> JL
>>
>>
>> On Tue, Aug 24, 2010 at 2:04 AM, Eric Charles<er...@apache.org>  wrote:
>>
>>      
>>>   Hi Jean-Luc,
>>>
>>> Maybe you could start a new thread ? (I think you're talking on a new
>>> topic)
>>> You could indicate the version you're using (2.3, 3 ?) and the
>>> configuration you used.
>>> Do you see something in the logs ?
>>>
>>> Tks,
>>>
>>> Eric
>>>
>>>
>>>
>>> On 24/08/2010 02:13, Jean Luc Guislain wrote:
>>>
>>>        
>>>> Hi! I am a new user. I can't poll gmail with my james server (fetchmail).
>>>> The rest is OK. Please somebody help me... I need this working
>>>>
>>>> On Mon, Aug 23, 2010 at 8:09 PM, Jean Luc Guislain<jl.guislain@gmail.com
>>>>          
>>>>> wrote:
>>>>>            
>>>>   Please help jl.guislain@gmail.com
>>>>          
>>>>>
>>>>> On Mon, Aug 23, 2010 at 4:59 AM, Max Levinson<max.levinson@gmail.com
>>>>>            
>>>>>> wrote:
>>>>>>              
>>>>>   Hi guys, can anyone help on this?
>>>>>            
>>>>>> 2010/8/19 Max Levinson<ma...@gmail.com>
>>>>>>
>>>>>>   Hi Norman,
>>>>>>              
>>>>>>> I just got achance to test it, as you know I am on James 3 from trunk.
>>>>>>>
>>>>>>> Have anyone actually tried this mailet with James 3.
>>>>>>>
>>>>>>> It's not working for me, unfortunately.
>>>>>>>
>>>>>>>    <mailet match="RecipientIs=max@max.com" class="FromRepository">
>>>>>>>    <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>>>>    <processor>   transport</processor>
>>>>>>>    <delete>true</delete>
>>>>>>>    </mailet>
>>>>>>>
>>>>>>> It says in the logs that mailet was initialised, but it's not
>>>>>>> resending
>>>>>>> email.
>>>>>>>
>>>>>>> What can be the problem?
>>>>>>>
>>>>>>> 2010/8/16 Norman Maurer<no...@apache.org>
>>>>>>>
>>>>>>> Hi Max,
>>>>>>>
>>>>>>>                
>>>>>>>> check the FromRepository Mailet...
>>>>>>>>
>>>>>>>> http://james.apache.org/server/2.3.2/provided_mailets.html
>>>>>>>>
>>>>>>>> Bye,
>>>>>>>> Norman
>>>>>>>>
>>>>>>>> 2010/8/16 Max Levinson<ma...@gmail.com>:
>>>>>>>>
>>>>>>>>                  
>>>>>>>>> Hi guys,
>>>>>>>>>
>>>>>>>>> I have a situation which requires your help, I have this DB
>>>>>>>>>
>>>>>>>>>                    
>>>>>>>> repository:
>>>>>>>>                  
>>>>>>              
>>>>>>>   <processor name="spam">
>>>>>>>                
>>>>>>>>>   <mailet match="All" class="ToRepository">
>>>>>>>>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>>>>>   </mailet>
>>>>>>>>>   </processor>
>>>>>>>>>
>>>>>>>>> All spam goes here, what if a user will decide to release a message
>>>>>>>>>
>>>>>>>>>                    
>>>>>>>> from
>>>>>>>>                  
>>>>>>              
>>>>>>> this repository(let's say release), how this can be achieved.
>>>>>>>                
>>>>>>>>> Maybe there is a mailet which can resend a message from repository?
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>                    
>>>>>>>> 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
>>>
>>>
>>>        
>>      
>    

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


Re: Resending email from a DB repository.

Posted by Jean Luc Guislain <jl...@gmail.com>.
Hi Eric

Thanks for your mail. I have reviewed the what I received from ezmlm and it
does not tell how to start a new thread.
I am pretty sure that my issue --How to poll gmail-- has been answered by
somebody else but I just can't find it.
I am using James 2.3.2 on a Slackware 13.1 box

The log file looks OK

JL


On Tue, Aug 24, 2010 at 2:04 AM, Eric Charles <er...@apache.org> wrote:

>  Hi Jean-Luc,
>
> Maybe you could start a new thread ? (I think you're talking on a new
> topic)
> You could indicate the version you're using (2.3, 3 ?) and the
> configuration you used.
> Do you see something in the logs ?
>
> Tks,
>
> Eric
>
>
>
> On 24/08/2010 02:13, Jean Luc Guislain wrote:
>
>> Hi! I am a new user. I can't poll gmail with my james server (fetchmail).
>> The rest is OK. Please somebody help me... I need this working
>>
>> On Mon, Aug 23, 2010 at 8:09 PM, Jean Luc Guislain<jl.guislain@gmail.com
>> >wrote:
>>
>>  Please help jl.guislain@gmail.com
>>>
>>>
>>> On Mon, Aug 23, 2010 at 4:59 AM, Max Levinson<max.levinson@gmail.com
>>> >wrote:
>>>
>>>  Hi guys, can anyone help on this?
>>>>
>>>> 2010/8/19 Max Levinson<ma...@gmail.com>
>>>>
>>>>  Hi Norman,
>>>>>
>>>>> I just got achance to test it, as you know I am on James 3 from trunk.
>>>>>
>>>>> Have anyone actually tried this mailet with James 3.
>>>>>
>>>>> It's not working for me, unfortunately.
>>>>>
>>>>>   <mailet match="RecipientIs=max@max.com" class="FromRepository">
>>>>>   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>>   <processor>  transport</processor>
>>>>>   <delete>true</delete>
>>>>>   </mailet>
>>>>>
>>>>> It says in the logs that mailet was initialised, but it's not resending
>>>>> email.
>>>>>
>>>>> What can be the problem?
>>>>>
>>>>> 2010/8/16 Norman Maurer<no...@apache.org>
>>>>>
>>>>> Hi Max,
>>>>>
>>>>>> check the FromRepository Mailet...
>>>>>>
>>>>>> http://james.apache.org/server/2.3.2/provided_mailets.html
>>>>>>
>>>>>> Bye,
>>>>>> Norman
>>>>>>
>>>>>> 2010/8/16 Max Levinson<ma...@gmail.com>:
>>>>>>
>>>>>>> Hi guys,
>>>>>>>
>>>>>>> I have a situation which requires your help, I have this DB
>>>>>>>
>>>>>> repository:
>>>>
>>>>>  <processor name="spam">
>>>>>>>  <mailet match="All" class="ToRepository">
>>>>>>>   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>>>  </mailet>
>>>>>>>  </processor>
>>>>>>>
>>>>>>> All spam goes here, what if a user will decide to release a message
>>>>>>>
>>>>>> from
>>>>
>>>>> this repository(let's say release), how this can be achieved.
>>>>>>>
>>>>>>> Maybe there is a mailet which can resend a message from repository?
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>> 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: Resending email from a DB repository.

Posted by Eric Charles <er...@apache.org>.
  Hi Jean-Luc,

Maybe you could start a new thread ? (I think you're talking on a new topic)
You could indicate the version you're using (2.3, 3 ?) and the 
configuration you used.
Do you see something in the logs ?

Tks,

Eric


On 24/08/2010 02:13, Jean Luc Guislain wrote:
> Hi! I am a new user. I can't poll gmail with my james server (fetchmail).
> The rest is OK. Please somebody help me... I need this working
>
> On Mon, Aug 23, 2010 at 8:09 PM, Jean Luc Guislain<jl...@gmail.com>wrote:
>
>> Please help jl.guislain@gmail.com
>>
>>
>> On Mon, Aug 23, 2010 at 4:59 AM, Max Levinson<ma...@gmail.com>wrote:
>>
>>> Hi guys, can anyone help on this?
>>>
>>> 2010/8/19 Max Levinson<ma...@gmail.com>
>>>
>>>> Hi Norman,
>>>>
>>>> I just got achance to test it, as you know I am on James 3 from trunk.
>>>>
>>>> Have anyone actually tried this mailet with James 3.
>>>>
>>>> It's not working for me, unfortunately.
>>>>
>>>>    <mailet match="RecipientIs=max@max.com" class="FromRepository">
>>>>    <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>    <processor>  transport</processor>
>>>>    <delete>true</delete>
>>>>    </mailet>
>>>>
>>>> It says in the logs that mailet was initialised, but it's not resending
>>>> email.
>>>>
>>>> What can be the problem?
>>>>
>>>> 2010/8/16 Norman Maurer<no...@apache.org>
>>>>
>>>> Hi Max,
>>>>> check the FromRepository Mailet...
>>>>>
>>>>> http://james.apache.org/server/2.3.2/provided_mailets.html
>>>>>
>>>>> Bye,
>>>>> Norman
>>>>>
>>>>> 2010/8/16 Max Levinson<ma...@gmail.com>:
>>>>>> Hi guys,
>>>>>>
>>>>>> I have a situation which requires your help, I have this DB
>>> repository:
>>>>>>   <processor name="spam">
>>>>>>   <mailet match="All" class="ToRepository">
>>>>>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>>   </mailet>
>>>>>>   </processor>
>>>>>>
>>>>>> All spam goes here, what if a user will decide to release a message
>>> from
>>>>>> this repository(let's say release), how this can be achieved.
>>>>>>
>>>>>> Maybe there is a mailet which can resend a message from repository?
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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: Resending email from a DB repository.

Posted by Jean Luc Guislain <jl...@gmail.com>.
Please help jl.guislain@gmail.com

On Mon, Aug 23, 2010 at 4:59 AM, Max Levinson <ma...@gmail.com>wrote:

> Hi guys, can anyone help on this?
>
> 2010/8/19 Max Levinson <ma...@gmail.com>
>
> > Hi Norman,
> >
> > I just got achance to test it, as you know I am on James 3 from trunk.
> >
> > Have anyone actually tried this mailet with James 3.
> >
> > It's not working for me, unfortunately.
> >
> >   <mailet match="RecipientIs=max@max.com" class="FromRepository">
> >   <repositoryPath>db://maildb/messages/spam</repositoryPath>
> >   <processor> transport </processor>
> >   <delete>true</delete>
> >   </mailet>
> >
> > It says in the logs that mailet was initialised, but it's not resending
> > email.
> >
> > What can be the problem?
> >
> > 2010/8/16 Norman Maurer <no...@apache.org>
> >
> > Hi Max,
> >>
> >> check the FromRepository Mailet...
> >>
> >> http://james.apache.org/server/2.3.2/provided_mailets.html
> >>
> >> Bye,
> >> Norman
> >>
> >> 2010/8/16 Max Levinson <ma...@gmail.com>:
> >> > Hi guys,
> >> >
> >> > I have a situation which requires your help, I have this DB
> repository:
> >> >
> >> >  <processor name="spam">
> >> >  <mailet match="All" class="ToRepository">
> >> >   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
> >> >  </mailet>
> >> >  </processor>
> >> >
> >> > All spam goes here, what if a user will decide to release a message
> from
> >> > this repository(let's say release), how this can be achieved.
> >> >
> >> > Maybe there is a mailet which can resend a message from repository?
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >> For additional commands, e-mail: server-user-help@james.apache.org
> >>
> >>
> >
>

Re: Resending email from a DB repository.

Posted by Max Levinson <ma...@gmail.com>.
Hi guys, can anyone help on this?

2010/8/19 Max Levinson <ma...@gmail.com>

> Hi Norman,
>
> I just got achance to test it, as you know I am on James 3 from trunk.
>
> Have anyone actually tried this mailet with James 3.
>
> It's not working for me, unfortunately.
>
>   <mailet match="RecipientIs=max@max.com" class="FromRepository">
>   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>   <processor> transport </processor>
>   <delete>true</delete>
>   </mailet>
>
> It says in the logs that mailet was initialised, but it's not resending
> email.
>
> What can be the problem?
>
> 2010/8/16 Norman Maurer <no...@apache.org>
>
> Hi Max,
>>
>> check the FromRepository Mailet...
>>
>> http://james.apache.org/server/2.3.2/provided_mailets.html
>>
>> Bye,
>> Norman
>>
>> 2010/8/16 Max Levinson <ma...@gmail.com>:
>> > Hi guys,
>> >
>> > I have a situation which requires your help, I have this DB repository:
>> >
>> >  <processor name="spam">
>> >  <mailet match="All" class="ToRepository">
>> >   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>> >  </mailet>
>> >  </processor>
>> >
>> > All spam goes here, what if a user will decide to release a message from
>> > this repository(let's say release), how this can be achieved.
>> >
>> > Maybe there is a mailet which can resend a message from repository?
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>

Re: Resending email from a DB repository.

Posted by Max Levinson <ma...@gmail.com>.
It is currently in a root processor.

 <processor name="root">
  <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
   <spamdHost>localhost</spamdHost>
   <spamdPort>783</spamdPort>
  </mailet>
  <mailet
match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
class="ToProcessor">
   <processor>spam</processor>
  </mailet>
  <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
  <repositoryPath>db://maildb/messages/spam</repositoryPath>
  <processor> transport </processor>
  <delete>true</delete>
  </mailet>
</processor>

 <processor name="spam">
  <mailet match="All" class="ToRepository">
   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
  </mailet>
 </processor>

They way I see it is if message is already in spam repository and recipient
is sales@domain.com or any other matcher triggering it, FromRepository
mailet moves this email to transport processor, sort of release.

Does it make sense, but unfortunately it is not working :(

Maybe I do something wrong, and you need to use FromRepository mailet in
different way?

Thanks.


2010/8/24 Eric Charles <er...@apache.org>

>  Hi Max,
>
> In which processor (root, transport, spam ?) did you put the FromRepository
> mailet.
> I never used it, but I would put it just after the ToRepository in spam.
>
> If it still doesn't work at your side, I will give it a try.
> Tell me...
>
> Tks,
>
> Eric
>
>
>
> On 23/08/2010 10:59, Max Levinson wrote:
>
>> Hi guys, can anyone help on this?
>>
>> 2010/8/19 Max Levinson<ma...@gmail.com>
>>
>>
>>  Hi Norman,
>>>
>>> I just got achance to test it, as you know I am on James 3 from trunk.
>>>
>>> Have anyone actually tried this mailet with James 3.
>>>
>>> It's not working for me, unfortunately.
>>>
>>>   <mailet match="RecipientIs=max@max.com" class="FromRepository">
>>>   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>   <processor>  transport</processor>
>>>   <delete>true</delete>
>>>   </mailet>
>>>
>>> It says in the logs that mailet was initialised, but it's not resending
>>> email.
>>>
>>> What can be the problem?
>>>
>>> 2010/8/16 Norman Maurer<no...@apache.org>
>>>
>>> Hi Max,
>>>
>>>> check the FromRepository Mailet...
>>>>
>>>> http://james.apache.org/server/2.3.2/provided_mailets.html
>>>>
>>>> Bye,
>>>> Norman
>>>>
>>>> 2010/8/16 Max Levinson<ma...@gmail.com>:
>>>>
>>>>> Hi guys,
>>>>>
>>>>> I have a situation which requires your help, I have this DB repository:
>>>>>
>>>>>  <processor name="spam">
>>>>>  <mailet match="All" class="ToRepository">
>>>>>   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>  </mailet>
>>>>>  </processor>
>>>>>
>>>>> All spam goes here, what if a user will decide to release a message
>>>>> from
>>>>> this repository(let's say release), how this can be achieved.
>>>>>
>>>>> Maybe there is a mailet which can resend a message from repository?
>>>>>
>>>>>  ---------------------------------------------------------------------
>>>> 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: Resending email from a DB repository.

Posted by Max Levinson <ma...@gmail.com>.
Hi Eric,

Unfortunately configuration which you've suggested is not working for
me(just a reminder I am on James 3 from trunk):

 <processor name="spam">
  <mailet match="All" class="ToRepository">
   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
   <passTrough>true</passTrough>
  </mailet>
  <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
   <repositoryPath>db://maildb/messages/spam</repositoryPath>
   <processor>transport</processor>
   <delete>true</delete>
  </mailet>
 </processor>


This is what I am getting in the logs (message is getting caught by
spamassassin and it put it into spam repository but FromRepository is not
working after that)

DEBUG 11:31:20,897 | james.smtpserver | Lookup command handler for command:
DATA
DEBUG 11:31:21,089 | james.smtpserver | executing james message handler
org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension@a9f827
DEBUG 11:31:21,092 | james.smtpserver | executing james message handler
org.apache.james.smtpserver.AddDefaultAttributesMessageHook@8ce0ea
DEBUG 11:31:21,104 | james.smtpserver | executing james message handler
org.apache.james.smtpserver.SendMailHandler@1023565
DEBUG 11:31:21,106 | james.smtpserver | sending mail
INFO  11:31:22,217 | james.smtpserver | Successfully spooled mail
Mail1282735881052-1 from max.levinson@gmail.com on 209.85.214.182 for [
sales@domain.com]
INFO  11:31:22,538 | james.mailetcontext | OK (by CLAMD on localhost/
127.0.0.1)
INFO  11:31:31,062 | james.mailetcontext | Storing mail Mail1282735881052-1
in db://maildb/messages/spam/
DEBUG 11:31:52,383 | james.smtpserver | Lookup command handler for command:
QUIT


2010/8/24 Eric Charles <er...@apache.org>

>  Hi Max,
>
> If you define the FromRepository before the ToRepository(spam), the mail
> will not reside in the spam repo, so it will be not retrieved during the
> processing of itself (probably well retrieved during the processing of the
> following one).
>
> Moreover, you have to define <passThrough>true</passThrough> in the mailet
> in your spam processor. This is used to say James to not "Ghost" the mail
> and to continue its processing.
>
> This gives use:
>
>
> <processor name="root">
>  <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
>   <spamdHost>localhost</spamdHost>
>   <spamdPort>783</spamdPort>
>  </mailet>
>  <mailet
> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
> class="ToProcessor">
>   <processor>spam</processor>
>  </mailet>
> </processor>
>
>
>  <processor name="spam">
>  <mailet match="All" class="ToRepository">
>   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>   <passTrough>true</passTrough>
>  </mailet>
>  <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>
>  <repositoryPath>db://maildb/messages/spam</repositoryPath>
>  <processor>  transport</processor>
>  <delete>true</delete>
>  </mailet>
>  </processor>
>
> I didn't test that exact configuration, but an equivalent one.
>
> If you leave like that, the sales@domain.com should be reprocessed by the
> transport processor.
> You will have for the other spams a message such as:
> WARN  19:55:14,752 | james.spoolmanager | Message Mail1282672514625-3
> reached the end of this processor, and is automatically deleted.  This may
> indicate a configuration error.
>
> If you don't like it, you may add
>
> <mailet match="All" class="Null"/>
>
> after the FromRepository mailet.
>
> Tks,
>
> Eric
>
>
>
> On 24/08/2010 12:54, Max Levinson wrote:
>
>> It is currently in a root processor.
>>
>>  <processor name="root">
>>   <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
>>    <spamdHost>localhost</spamdHost>
>>    <spamdPort>783</spamdPort>
>>   </mailet>
>>   <mailet
>> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
>> class="ToProcessor">
>>    <processor>spam</processor>
>>   </mailet>
>>   <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>>
>>   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>   <processor>  transport</processor>
>>   <delete>true</delete>
>>   </mailet>
>> </processor>
>>
>>
>>  <processor name="spam">
>>   <mailet match="All" class="ToRepository">
>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>   </mailet>
>>  </processor>
>>
>> They way I see it is if message is already in spam repository and
>> recipient
>> is sales@domain.com or any other matcher triggering it, FromRepository
>> mailet moves this email to transport processor, sort of release.
>>
>> Does it make sense, but unfortunately it is not working :(
>>
>> Maybe I do something wrong, and you need to use FromRepository mailet in
>> different way?
>>
>> Thanks.
>>
>>
>> 2010/8/24 Eric Charles<er...@apache.org>
>>
>>
>>   Hi Max,
>>>
>>> In which processor (root, transport, spam ?) did you put the
>>> FromRepository
>>> mailet.
>>> I never used it, but I would put it just after the ToRepository in spam.
>>>
>>> If it still doesn't work at your side, I will give it a try.
>>> Tell me...
>>>
>>> Tks,
>>>
>>> Eric
>>>
>>>
>>>
>>> On 23/08/2010 10:59, Max Levinson wrote:
>>>
>>>  Hi guys, can anyone help on this?
>>>>
>>>> 2010/8/19 Max Levinson<ma...@gmail.com>
>>>>
>>>>
>>>>  Hi Norman,
>>>>
>>>>> I just got achance to test it, as you know I am on James 3 from trunk.
>>>>>
>>>>> Have anyone actually tried this mailet with James 3.
>>>>>
>>>>> It's not working for me, unfortunately.
>>>>>
>>>>>   <mailet match="RecipientIs=max@max.com" class="FromRepository">
>>>>>   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>>   <processor>   transport</processor>
>>>>>   <delete>true</delete>
>>>>>   </mailet>
>>>>>
>>>>> It says in the logs that mailet was initialised, but it's not resending
>>>>> email.
>>>>>
>>>>> What can be the problem?
>>>>>
>>>>> 2010/8/16 Norman Maurer<no...@apache.org>
>>>>>
>>>>> Hi Max,
>>>>>
>>>>>  check the FromRepository Mailet...
>>>>>>
>>>>>> http://james.apache.org/server/2.3.2/provided_mailets.html
>>>>>>
>>>>>> Bye,
>>>>>> Norman
>>>>>>
>>>>>> 2010/8/16 Max Levinson<ma...@gmail.com>:
>>>>>>
>>>>>>  Hi guys,
>>>>>>>
>>>>>>> I have a situation which requires your help, I have this DB
>>>>>>> repository:
>>>>>>>
>>>>>>>  <processor name="spam">
>>>>>>>  <mailet match="All" class="ToRepository">
>>>>>>>   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>>>  </mailet>
>>>>>>>  </processor>
>>>>>>>
>>>>>>> All spam goes here, what if a user will decide to release a message
>>>>>>> from
>>>>>>> this repository(let's say release), how this can be achieved.
>>>>>>>
>>>>>>> Maybe there is a mailet which can resend a message from repository?
>>>>>>>
>>>>>>>
>>>>>>>  ---------------------------------------------------------------------
>>>>>>>
>>>>>> 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
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

Re: Resending email from a DB repository.

Posted by Max Levinson <ma...@gmail.com>.
Yes, I am absolutely sure that message is getting caught by SpamAssassin, I
am adding a special subject to the message which is getting caught by
spamassassin. I am not sure why it's not shown in this log but message is
getting caught by spamassassin.

ClamAV puts messages in other repository (called virus).

2010/8/25 Eric Charles <er...@apache.org>

>  Hi Max,
>
> From the log, it seems that CLAMD mailet is executed, but not SpamAssassin.
> Are you sure mail is passing via
>
>
>  <mailet
> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
> class="ToProcessor">
>   <processor>spam</processor>
>  </mailet>
>
> and is redirected to the spam processor ?
>
> Log shows that mail is stored in db://maildb/messages/spam/, but is it the
> one of "spam" processor ?
>
> I also don't see the "...
>
> ...reached the end of this processor, and is automatically deleted.  This
> may
> indicate a configuration error."
>
>
> So I wonder if it really goes there?
>
> I will also retest, but it was working at my side (it was reprocessing from
> spam)
>
> Tks,
>
> Eric
>
> PS: I also use James 3 from trunk
>
>
>
>
>
>
> On 25/08/2010 13:51, Max Levinson wrote:
>
>> Hi Eric,
>>
>> Unfortunately configuration which you've suggested is not working for
>> me(just a reminder I am on James 3 from trunk):
>>
>>
>>  <processor name="spam">
>>   <mailet match="All" class="ToRepository">
>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>    <passTrough>true</passTrough>
>>   </mailet>
>>   <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>>    <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>    <processor>transport</processor>
>>    <delete>true</delete>
>>   </mailet>
>>  </processor>
>>
>>
>> This is what I am getting in the logs (message is getting caught by
>> spamassassin and it put it into spam repository but FromRepository is not
>> working after that)
>>
>> DEBUG 11:31:20,897 | james.smtpserver | Lookup command handler for
>> command:
>> DATA
>> DEBUG 11:31:21,089 | james.smtpserver | executing james message handler
>> org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension@a9f827
>> DEBUG 11:31:21,092 | james.smtpserver | executing james message handler
>> org.apache.james.smtpserver.AddDefaultAttributesMessageHook@8ce0ea
>> DEBUG 11:31:21,104 | james.smtpserver | executing james message handler
>> org.apache.james.smtpserver.SendMailHandler@1023565
>> DEBUG 11:31:21,106 | james.smtpserver | sending mail
>> INFO  11:31:22,217 | james.smtpserver | Successfully spooled mail
>> Mail1282735881052-1 from max.levinson@gmail.com on 209.85.214.182 for [
>> sales@domain.com]
>> INFO  11:31:22,538 | james.mailetcontext | OK (by CLAMD on localhost/
>> 127.0.0.1)
>> INFO  11:31:31,062 | james.mailetcontext | Storing mail
>> Mail1282735881052-1
>> in db://maildb/messages/spam/
>> DEBUG 11:31:52,383 | james.smtpserver | Lookup command handler for
>> command:
>> QUIT
>>
>>
>> 2010/8/24 Eric Charles<er...@apache.org>
>>
>>   Hi Max,
>>>
>>> If you define the FromRepository before the ToRepository(spam), the mail
>>> will not reside in the spam repo, so it will be not retrieved during the
>>> processing of itself (probably well retrieved during the processing of
>>> the
>>> following one).
>>>
>>> Moreover, you have to define<passThrough>true</passThrough>  in the
>>> mailet
>>> in your spam processor. This is used to say James to not "Ghost" the mail
>>> and to continue its processing.
>>>
>>> This gives use:
>>>
>>>
>>> <processor name="root">
>>>  <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
>>>   <spamdHost>localhost</spamdHost>
>>>   <spamdPort>783</spamdPort>
>>>  </mailet>
>>>  <mailet
>>> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
>>> class="ToProcessor">
>>>   <processor>spam</processor>
>>>  </mailet>
>>> </processor>
>>>
>>>
>>>  <processor name="spam">
>>>  <mailet match="All" class="ToRepository">
>>>   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>   <passTrough>true</passTrough>
>>>  </mailet>
>>>  <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>>>
>>>  <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>  <processor>   transport</processor>
>>>  <delete>true</delete>
>>>  </mailet>
>>>  </processor>
>>>
>>> I didn't test that exact configuration, but an equivalent one.
>>>
>>> If you leave like that, the sales@domain.com should be reprocessed by
>>> the
>>> transport processor.
>>> You will have for the other spams a message such as:
>>> WARN  19:55:14,752 | james.spoolmanager | Message Mail1282672514625-3
>>> reached the end of this processor, and is automatically deleted.  This
>>> may
>>> indicate a configuration error.
>>>
>>> If you don't like it, you may add
>>>
>>> <mailet match="All" class="Null"/>
>>>
>>> after the FromRepository mailet.
>>>
>>> Tks,
>>>
>>> Eric
>>>
>>>
>>>
>>> On 24/08/2010 12:54, Max Levinson wrote:
>>>
>>>  It is currently in a root processor.
>>>>
>>>>  <processor name="root">
>>>>   <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
>>>>    <spamdHost>localhost</spamdHost>
>>>>    <spamdPort>783</spamdPort>
>>>>   </mailet>
>>>>   <mailet
>>>> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag,
>>>> YES"
>>>> class="ToProcessor">
>>>>    <processor>spam</processor>
>>>>   </mailet>
>>>>   <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>>>>
>>>>   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>   <processor>   transport</processor>
>>>>   <delete>true</delete>
>>>>   </mailet>
>>>> </processor>
>>>>
>>>>
>>>>  <processor name="spam">
>>>>   <mailet match="All" class="ToRepository">
>>>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>   </mailet>
>>>>  </processor>
>>>>
>>>> They way I see it is if message is already in spam repository and
>>>> recipient
>>>> is sales@domain.com or any other matcher triggering it, FromRepository
>>>> mailet moves this email to transport processor, sort of release.
>>>>
>>>> Does it make sense, but unfortunately it is not working :(
>>>>
>>>> Maybe I do something wrong, and you need to use FromRepository mailet in
>>>> different way?
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> 2010/8/24 Eric Charles<er...@apache.org>
>>>>
>>>>
>>>>   Hi Max,
>>>>
>>>>> In which processor (root, transport, spam ?) did you put the
>>>>> FromRepository
>>>>> mailet.
>>>>> I never used it, but I would put it just after the ToRepository in
>>>>> spam.
>>>>>
>>>>> If it still doesn't work at your side, I will give it a try.
>>>>> Tell me...
>>>>>
>>>>> Tks,
>>>>>
>>>>> Eric
>>>>>
>>>>>
>>>>>
>>>>> On 23/08/2010 10:59, Max Levinson wrote:
>>>>>
>>>>>  Hi guys, can anyone help on this?
>>>>>
>>>>>> 2010/8/19 Max Levinson<ma...@gmail.com>
>>>>>>
>>>>>>
>>>>>>  Hi Norman,
>>>>>>
>>>>>>  I just got achance to test it, as you know I am on James 3 from
>>>>>>> trunk.
>>>>>>>
>>>>>>> Have anyone actually tried this mailet with James 3.
>>>>>>>
>>>>>>> It's not working for me, unfortunately.
>>>>>>>
>>>>>>>   <mailet match="RecipientIs=max@max.com" class="FromRepository">
>>>>>>>   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>>>>   <processor>    transport</processor>
>>>>>>>   <delete>true</delete>
>>>>>>>   </mailet>
>>>>>>>
>>>>>>> It says in the logs that mailet was initialised, but it's not
>>>>>>> resending
>>>>>>> email.
>>>>>>>
>>>>>>> What can be the problem?
>>>>>>>
>>>>>>> 2010/8/16 Norman Maurer<no...@apache.org>
>>>>>>>
>>>>>>> Hi Max,
>>>>>>>
>>>>>>>  check the FromRepository Mailet...
>>>>>>>
>>>>>>>> http://james.apache.org/server/2.3.2/provided_mailets.html
>>>>>>>>
>>>>>>>> Bye,
>>>>>>>> Norman
>>>>>>>>
>>>>>>>> 2010/8/16 Max Levinson<ma...@gmail.com>:
>>>>>>>>
>>>>>>>>  Hi guys,
>>>>>>>>
>>>>>>>>> I have a situation which requires your help, I have this DB
>>>>>>>>> repository:
>>>>>>>>>
>>>>>>>>>  <processor name="spam">
>>>>>>>>>  <mailet match="All" class="ToRepository">
>>>>>>>>>   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>>>>>  </mailet>
>>>>>>>>>  </processor>
>>>>>>>>>
>>>>>>>>> All spam goes here, what if a user will decide to release a message
>>>>>>>>> from
>>>>>>>>> this repository(let's say release), how this can be achieved.
>>>>>>>>>
>>>>>>>>> Maybe there is a mailet which can resend a message from repository?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>  ---------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>>  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
>>>>>
>>>>>
>>>>>
>>>>>  ---------------------------------------------------------------------
>>> 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: Resending email from a DB repository.

Posted by Max Levinson <ma...@gmail.com>.
Hi Eric,

I've tested it, and it is not exactly what I wanted from this mailet.

And I also found a couple of weird problems:

1. When you type this in spoolmanager.xml

 <processor name="spam">
  <mailet match="All" class="ToRepository">
   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
   <passThrough>true</passThrough>
  </mailet>
  <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
  <repositoryPath>db://maildb/messages/spam</repositoryPath>
  <processor> transport</processor>
  <delete>true</delete>
 </mailet>
 </processor>


It seems it's not only pushes emails matched by this matcher (RecipientIs=
sales@domain.com) but the rest of emails as well.

Second problem is when spam is caught and it suppose to go to spam
repository and it not matches the matcher is not hold in spam repository
anymore but instead passed through to transport :(

So what I am trying to achieve here, let's imagine I have a portal where
user can see his spam repository, user decided to release a message,he is
choosing a message and clicks release on a portal.

Then I need to give James and idea in real time that this message should be
pushed to transport processor for further delivery(I can generate a config
entry which will have a matcher SubjectIs with a subject which should be
released). I don't think that the matcher RecipientIs will work for me here,
because there still can be other messages which user don't want to release
from spam repository which has the same recipient, will matcher like
SubjectIs will work in this case?

Can I achieve what I need in current James trunk?

Please help, I am got stuck for more then a month on this :( And this is
what my users and boss want desperately.



2010/8/27 Eric Charles <er...@apache.org>

>  Oops,
>
> It's not
>
>   <passTrough>true</passTrough>
>
> but
>
>   <passThrough>true</passThrough>
>
> (with a h between T and r...)
>
> Sorry, my fault,
>
> Eric
>
>
>
> On 25/08/2010 14:40, Max Levinson wrote:
>
>> Yes, I am absolutely sure that message is getting caught by SpamAssassin,
>> I
>> am adding a special subject to the message which is getting caught by
>> spamassassin. I am not sure why it's not shown in this log but message is
>>
>> getting caught by spamassassin.
>>
>> ClamAV puts messages in other repository (called virus).
>>
>> 2010/8/25 Eric Charles<er...@apache.org>
>>
>>
>>   Hi Max,
>>>
>>>  From the log, it seems that CLAMD mailet is executed, but not
>>> SpamAssassin.
>>> Are you sure mail is passing via
>>>
>>>
>>>  <mailet
>>> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
>>> class="ToProcessor">
>>>   <processor>spam</processor>
>>>  </mailet>
>>>
>>> and is redirected to the spam processor ?
>>>
>>> Log shows that mail is stored in db://maildb/messages/spam/, but is it
>>> the
>>> one of "spam" processor ?
>>>
>>> I also don't see the "...
>>>
>>> ...reached the end of this processor, and is automatically deleted.  This
>>> may
>>> indicate a configuration error."
>>>
>>>
>>> So I wonder if it really goes there?
>>>
>>> I will also retest, but it was working at my side (it was reprocessing
>>> from
>>> spam)
>>>
>>> Tks,
>>>
>>> Eric
>>>
>>> PS: I also use James 3 from trunk
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 25/08/2010 13:51, Max Levinson wrote:
>>>
>>>  Hi Eric,
>>>>
>>>> Unfortunately configuration which you've suggested is not working for
>>>> me(just a reminder I am on James 3 from trunk):
>>>>
>>>>
>>>>  <processor name="spam">
>>>>   <mailet match="All" class="ToRepository">
>>>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>    <passTrough>true</passTrough>
>>>>   </mailet>
>>>>   <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>>>>    <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>    <processor>transport</processor>
>>>>    <delete>true</delete>
>>>>   </mailet>
>>>>  </processor>
>>>>
>>>>
>>>> This is what I am getting in the logs (message is getting caught by
>>>> spamassassin and it put it into spam repository but FromRepository is
>>>> not
>>>> working after that)
>>>>
>>>> DEBUG 11:31:20,897 | james.smtpserver | Lookup command handler for
>>>> command:
>>>> DATA
>>>> DEBUG 11:31:21,089 | james.smtpserver | executing james message handler
>>>> org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension@a9f827
>>>> DEBUG 11:31:21,092 | james.smtpserver | executing james message handler
>>>> org.apache.james.smtpserver.AddDefaultAttributesMessageHook@8ce0ea
>>>> DEBUG 11:31:21,104 | james.smtpserver | executing james message handler
>>>> org.apache.james.smtpserver.SendMailHandler@1023565
>>>> DEBUG 11:31:21,106 | james.smtpserver | sending mail
>>>> INFO  11:31:22,217 | james.smtpserver | Successfully spooled mail
>>>> Mail1282735881052-1 from max.levinson@gmail.com on 209.85.214.182 for [
>>>> sales@domain.com]
>>>> INFO  11:31:22,538 | james.mailetcontext | OK (by CLAMD on localhost/
>>>> 127.0.0.1)
>>>> INFO  11:31:31,062 | james.mailetcontext | Storing mail
>>>> Mail1282735881052-1
>>>> in db://maildb/messages/spam/
>>>> DEBUG 11:31:52,383 | james.smtpserver | Lookup command handler for
>>>> command:
>>>> QUIT
>>>>
>>>>
>>>> 2010/8/24 Eric Charles<er...@apache.org>
>>>>
>>>>   Hi Max,
>>>>
>>>>> If you define the FromRepository before the ToRepository(spam), the
>>>>> mail
>>>>> will not reside in the spam repo, so it will be not retrieved during
>>>>> the
>>>>> processing of itself (probably well retrieved during the processing of
>>>>> the
>>>>> following one).
>>>>>
>>>>> Moreover, you have to define<passThrough>true</passThrough>   in the
>>>>> mailet
>>>>> in your spam processor. This is used to say James to not "Ghost" the
>>>>> mail
>>>>> and to continue its processing.
>>>>>
>>>>> This gives use:
>>>>>
>>>>>
>>>>> <processor name="root">
>>>>>  <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
>>>>>   <spamdHost>localhost</spamdHost>
>>>>>   <spamdPort>783</spamdPort>
>>>>>  </mailet>
>>>>>  <mailet
>>>>> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag,
>>>>> YES"
>>>>> class="ToProcessor">
>>>>>   <processor>spam</processor>
>>>>>  </mailet>
>>>>> </processor>
>>>>>
>>>>>
>>>>>  <processor name="spam">
>>>>>  <mailet match="All" class="ToRepository">
>>>>>   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>   <passTrough>true</passTrough>
>>>>>  </mailet>
>>>>>  <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>>>>>
>>>>>  <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>>  <processor>    transport</processor>
>>>>>  <delete>true</delete>
>>>>>  </mailet>
>>>>>  </processor>
>>>>>
>>>>> I didn't test that exact configuration, but an equivalent one.
>>>>>
>>>>> If you leave like that, the sales@domain.com should be reprocessed by
>>>>> the
>>>>> transport processor.
>>>>> You will have for the other spams a message such as:
>>>>> WARN  19:55:14,752 | james.spoolmanager | Message Mail1282672514625-3
>>>>> reached the end of this processor, and is automatically deleted.  This
>>>>> may
>>>>> indicate a configuration error.
>>>>>
>>>>> If you don't like it, you may add
>>>>>
>>>>> <mailet match="All" class="Null"/>
>>>>>
>>>>> after the FromRepository mailet.
>>>>>
>>>>> Tks,
>>>>>
>>>>> Eric
>>>>>
>>>>>
>>>>>
>>>>> On 24/08/2010 12:54, Max Levinson wrote:
>>>>>
>>>>>  It is currently in a root processor.
>>>>>
>>>>>>  <processor name="root">
>>>>>>   <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
>>>>>>    <spamdHost>localhost</spamdHost>
>>>>>>    <spamdPort>783</spamdPort>
>>>>>>   </mailet>
>>>>>>   <mailet
>>>>>> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag,
>>>>>> YES"
>>>>>> class="ToProcessor">
>>>>>>    <processor>spam</processor>
>>>>>>   </mailet>
>>>>>>   <mailet match="RecipientIs=sales@domain.com"
>>>>>> class="FromRepository">
>>>>>>
>>>>>>   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>>>   <processor>    transport</processor>
>>>>>>   <delete>true</delete>
>>>>>>   </mailet>
>>>>>> </processor>
>>>>>>
>>>>>>
>>>>>>  <processor name="spam">
>>>>>>   <mailet match="All" class="ToRepository">
>>>>>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>>   </mailet>
>>>>>>  </processor>
>>>>>>
>>>>>> They way I see it is if message is already in spam repository and
>>>>>> recipient
>>>>>> is sales@domain.com or any other matcher triggering it,
>>>>>> FromRepository
>>>>>> mailet moves this email to transport processor, sort of release.
>>>>>>
>>>>>> Does it make sense, but unfortunately it is not working :(
>>>>>>
>>>>>> Maybe I do something wrong, and you need to use FromRepository mailet
>>>>>> in
>>>>>> different way?
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>>
>>>>>> 2010/8/24 Eric Charles<er...@apache.org>
>>>>>>
>>>>>>
>>>>>>   Hi Max,
>>>>>>
>>>>>>  In which processor (root, transport, spam ?) did you put the
>>>>>>> FromRepository
>>>>>>> mailet.
>>>>>>> I never used it, but I would put it just after the ToRepository in
>>>>>>> spam.
>>>>>>>
>>>>>>> If it still doesn't work at your side, I will give it a try.
>>>>>>> Tell me...
>>>>>>>
>>>>>>> Tks,
>>>>>>>
>>>>>>> Eric
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 23/08/2010 10:59, Max Levinson wrote:
>>>>>>>
>>>>>>>  Hi guys, can anyone help on this?
>>>>>>>
>>>>>>>  2010/8/19 Max Levinson<ma...@gmail.com>
>>>>>>>>
>>>>>>>>
>>>>>>>>  Hi Norman,
>>>>>>>>
>>>>>>>>  I just got achance to test it, as you know I am on James 3 from
>>>>>>>>
>>>>>>>>> trunk.
>>>>>>>>>
>>>>>>>>> Have anyone actually tried this mailet with James 3.
>>>>>>>>>
>>>>>>>>> It's not working for me, unfortunately.
>>>>>>>>>
>>>>>>>>>   <mailet match="RecipientIs=max@max.com" class="FromRepository">
>>>>>>>>>   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>>>>>>   <processor>     transport</processor>
>>>>>>>>>   <delete>true</delete>
>>>>>>>>>   </mailet>
>>>>>>>>>
>>>>>>>>> It says in the logs that mailet was initialised, but it's not
>>>>>>>>> resending
>>>>>>>>> email.
>>>>>>>>>
>>>>>>>>> What can be the problem?
>>>>>>>>>
>>>>>>>>> 2010/8/16 Norman Maurer<no...@apache.org>
>>>>>>>>>
>>>>>>>>> Hi Max,
>>>>>>>>>
>>>>>>>>>  check the FromRepository Mailet...
>>>>>>>>>
>>>>>>>>>  http://james.apache.org/server/2.3.2/provided_mailets.html
>>>>>>>>>>
>>>>>>>>>> Bye,
>>>>>>>>>> Norman
>>>>>>>>>>
>>>>>>>>>> 2010/8/16 Max Levinson<ma...@gmail.com>:
>>>>>>>>>>
>>>>>>>>>>  Hi guys,
>>>>>>>>>>
>>>>>>>>>>  I have a situation which requires your help, I have this DB
>>>>>>>>>>> repository:
>>>>>>>>>>>
>>>>>>>>>>>  <processor name="spam">
>>>>>>>>>>>  <mailet match="All" class="ToRepository">
>>>>>>>>>>>   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>>>>>>>  </mailet>
>>>>>>>>>>>  </processor>
>>>>>>>>>>>
>>>>>>>>>>> All spam goes here, what if a user will decide to release a
>>>>>>>>>>> message
>>>>>>>>>>> from
>>>>>>>>>>> this repository(let's say release), how this can be achieved.
>>>>>>>>>>>
>>>>>>>>>>> Maybe there is a mailet which can resend a message from
>>>>>>>>>>> repository?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>  ---------------------------------------------------------------------
>>>>>>>>>>>
>>>>>>>>>>>  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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>  ---------------------------------------------------------------------
>>>>>>>
>>>>>> 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
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

Re: Resending email from a DB repository.

Posted by Eric Charles <er...@apache.org>.
  Hi Max,

Current implementation of FromRepository is "mailet is triggered further 
to  matcher, but *all* mails of the repository are reprocessed, 
independently of the matcher...".
I was also confused about this.

Two comments on your request:
1.- I am also interessed in having a kind of "spam" folder per user 
where mails tagged as spam would be directed. This is what you mean with 
your portal case (btw, outlook has such a spam directory per user).
2.- You're talking about using subject as recpicient. I would rather use 
the mail id which is supposed to be unique on the server.

I don't know if this makes sense in the frame of your project ?
If yes, I don't see how to implement with current mailets/matchers/... 
Maybe someone else can help and show how ??

If we have to develop it, a "ToFolder" mailet could be imagined...

Tks,

Eric


On 31/08/2010 18:25, Max Levinson wrote:
> Hi Eric,
>
> I've tested it, and it is not exactly what I wanted from this mailet.
>
> And I also found a couple of weird problems:
>
> 1. When you type this in spoolmanager.xml
>
>   <processor name="spam">
>    <mailet match="All" class="ToRepository">
>     <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>     <passThrough>true</passThrough>
>    </mailet>
>    <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>    <repositoryPath>db://maildb/messages/spam</repositoryPath>
>    <processor>  transport</processor>
>    <delete>true</delete>
>   </mailet>
>   </processor>
>
>
> It seems it's not only pushes emails matched by this matcher (RecipientIs=
> sales@domain.com) but the rest of emails as well.
>
> Second problem is when spam is caught and it suppose to go to spam
> repository and it not matches the matcher is not hold in spam repository
> anymore but instead passed through to transport :(
>
> So what I am trying to achieve here, let's imagine I have a portal where
> user can see his spam repository, user decided to release a message,he is
> choosing a message and clicks release on a portal.
>
> Then I need to give James and idea in real time that this message should be
> pushed to transport processor for further delivery(I can generate a config
> entry which will have a matcher SubjectIs with a subject which should be
> released). I don't think that the matcher RecipientIs will work for me here,
> because there still can be other messages which user don't want to release
> from spam repository which has the same recipient, will matcher like
> SubjectIs will work in this case?
>
> Can I achieve what I need in current James trunk?
>
> Please help, I am got stuck for more then a month on this :( And this is
> what my users and boss want desperately.
>
>
>
> 2010/8/27 Eric Charles<er...@apache.org>
>


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


Re: Resending email from a DB repository.

Posted by Eric Charles <er...@apache.org>.
  Oops,

It's not

    <passTrough>true</passTrough>

but

    <passThrough>true</passThrough>

(with a h between T and r...)

Sorry, my fault,

Eric


On 25/08/2010 14:40, Max Levinson wrote:
> Yes, I am absolutely sure that message is getting caught by SpamAssassin, I
> am adding a special subject to the message which is getting caught by
> spamassassin. I am not sure why it's not shown in this log but message is
> getting caught by spamassassin.
>
> ClamAV puts messages in other repository (called virus).
>
> 2010/8/25 Eric Charles<er...@apache.org>
>
>>   Hi Max,
>>
>>  From the log, it seems that CLAMD mailet is executed, but not SpamAssassin.
>> Are you sure mail is passing via
>>
>>
>>   <mailet
>> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
>> class="ToProcessor">
>>    <processor>spam</processor>
>>   </mailet>
>>
>> and is redirected to the spam processor ?
>>
>> Log shows that mail is stored in db://maildb/messages/spam/, but is it the
>> one of "spam" processor ?
>>
>> I also don't see the "...
>>
>> ...reached the end of this processor, and is automatically deleted.  This
>> may
>> indicate a configuration error."
>>
>>
>> So I wonder if it really goes there?
>>
>> I will also retest, but it was working at my side (it was reprocessing from
>> spam)
>>
>> Tks,
>>
>> Eric
>>
>> PS: I also use James 3 from trunk
>>
>>
>>
>>
>>
>>
>> On 25/08/2010 13:51, Max Levinson wrote:
>>
>>> Hi Eric,
>>>
>>> Unfortunately configuration which you've suggested is not working for
>>> me(just a reminder I am on James 3 from trunk):
>>>
>>>
>>>   <processor name="spam">
>>>    <mailet match="All" class="ToRepository">
>>>     <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>     <passTrough>true</passTrough>
>>>    </mailet>
>>>    <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>>>     <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>     <processor>transport</processor>
>>>     <delete>true</delete>
>>>    </mailet>
>>>   </processor>
>>>
>>>
>>> This is what I am getting in the logs (message is getting caught by
>>> spamassassin and it put it into spam repository but FromRepository is not
>>> working after that)
>>>
>>> DEBUG 11:31:20,897 | james.smtpserver | Lookup command handler for
>>> command:
>>> DATA
>>> DEBUG 11:31:21,089 | james.smtpserver | executing james message handler
>>> org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension@a9f827
>>> DEBUG 11:31:21,092 | james.smtpserver | executing james message handler
>>> org.apache.james.smtpserver.AddDefaultAttributesMessageHook@8ce0ea
>>> DEBUG 11:31:21,104 | james.smtpserver | executing james message handler
>>> org.apache.james.smtpserver.SendMailHandler@1023565
>>> DEBUG 11:31:21,106 | james.smtpserver | sending mail
>>> INFO  11:31:22,217 | james.smtpserver | Successfully spooled mail
>>> Mail1282735881052-1 from max.levinson@gmail.com on 209.85.214.182 for [
>>> sales@domain.com]
>>> INFO  11:31:22,538 | james.mailetcontext | OK (by CLAMD on localhost/
>>> 127.0.0.1)
>>> INFO  11:31:31,062 | james.mailetcontext | Storing mail
>>> Mail1282735881052-1
>>> in db://maildb/messages/spam/
>>> DEBUG 11:31:52,383 | james.smtpserver | Lookup command handler for
>>> command:
>>> QUIT
>>>
>>>
>>> 2010/8/24 Eric Charles<er...@apache.org>
>>>
>>>    Hi Max,
>>>> If you define the FromRepository before the ToRepository(spam), the mail
>>>> will not reside in the spam repo, so it will be not retrieved during the
>>>> processing of itself (probably well retrieved during the processing of
>>>> the
>>>> following one).
>>>>
>>>> Moreover, you have to define<passThrough>true</passThrough>   in the
>>>> mailet
>>>> in your spam processor. This is used to say James to not "Ghost" the mail
>>>> and to continue its processing.
>>>>
>>>> This gives use:
>>>>
>>>>
>>>> <processor name="root">
>>>>   <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
>>>>    <spamdHost>localhost</spamdHost>
>>>>    <spamdPort>783</spamdPort>
>>>>   </mailet>
>>>>   <mailet
>>>> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
>>>> class="ToProcessor">
>>>>    <processor>spam</processor>
>>>>   </mailet>
>>>> </processor>
>>>>
>>>>
>>>>   <processor name="spam">
>>>>   <mailet match="All" class="ToRepository">
>>>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>    <passTrough>true</passTrough>
>>>>   </mailet>
>>>>   <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>>>>
>>>>   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>   <processor>    transport</processor>
>>>>   <delete>true</delete>
>>>>   </mailet>
>>>>   </processor>
>>>>
>>>> I didn't test that exact configuration, but an equivalent one.
>>>>
>>>> If you leave like that, the sales@domain.com should be reprocessed by
>>>> the
>>>> transport processor.
>>>> You will have for the other spams a message such as:
>>>> WARN  19:55:14,752 | james.spoolmanager | Message Mail1282672514625-3
>>>> reached the end of this processor, and is automatically deleted.  This
>>>> may
>>>> indicate a configuration error.
>>>>
>>>> If you don't like it, you may add
>>>>
>>>> <mailet match="All" class="Null"/>
>>>>
>>>> after the FromRepository mailet.
>>>>
>>>> Tks,
>>>>
>>>> Eric
>>>>
>>>>
>>>>
>>>> On 24/08/2010 12:54, Max Levinson wrote:
>>>>
>>>>   It is currently in a root processor.
>>>>>   <processor name="root">
>>>>>    <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
>>>>>     <spamdHost>localhost</spamdHost>
>>>>>     <spamdPort>783</spamdPort>
>>>>>    </mailet>
>>>>>    <mailet
>>>>> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag,
>>>>> YES"
>>>>> class="ToProcessor">
>>>>>     <processor>spam</processor>
>>>>>    </mailet>
>>>>>    <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>>>>>
>>>>>    <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>>    <processor>    transport</processor>
>>>>>    <delete>true</delete>
>>>>>    </mailet>
>>>>> </processor>
>>>>>
>>>>>
>>>>>   <processor name="spam">
>>>>>    <mailet match="All" class="ToRepository">
>>>>>     <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>    </mailet>
>>>>>   </processor>
>>>>>
>>>>> They way I see it is if message is already in spam repository and
>>>>> recipient
>>>>> is sales@domain.com or any other matcher triggering it, FromRepository
>>>>> mailet moves this email to transport processor, sort of release.
>>>>>
>>>>> Does it make sense, but unfortunately it is not working :(
>>>>>
>>>>> Maybe I do something wrong, and you need to use FromRepository mailet in
>>>>> different way?
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>> 2010/8/24 Eric Charles<er...@apache.org>
>>>>>
>>>>>
>>>>>    Hi Max,
>>>>>
>>>>>> In which processor (root, transport, spam ?) did you put the
>>>>>> FromRepository
>>>>>> mailet.
>>>>>> I never used it, but I would put it just after the ToRepository in
>>>>>> spam.
>>>>>>
>>>>>> If it still doesn't work at your side, I will give it a try.
>>>>>> Tell me...
>>>>>>
>>>>>> Tks,
>>>>>>
>>>>>> Eric
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 23/08/2010 10:59, Max Levinson wrote:
>>>>>>
>>>>>>   Hi guys, can anyone help on this?
>>>>>>
>>>>>>> 2010/8/19 Max Levinson<ma...@gmail.com>
>>>>>>>
>>>>>>>
>>>>>>>   Hi Norman,
>>>>>>>
>>>>>>>   I just got achance to test it, as you know I am on James 3 from
>>>>>>>> trunk.
>>>>>>>>
>>>>>>>> Have anyone actually tried this mailet with James 3.
>>>>>>>>
>>>>>>>> It's not working for me, unfortunately.
>>>>>>>>
>>>>>>>>    <mailet match="RecipientIs=max@max.com" class="FromRepository">
>>>>>>>>    <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>>>>>    <processor>     transport</processor>
>>>>>>>>    <delete>true</delete>
>>>>>>>>    </mailet>
>>>>>>>>
>>>>>>>> It says in the logs that mailet was initialised, but it's not
>>>>>>>> resending
>>>>>>>> email.
>>>>>>>>
>>>>>>>> What can be the problem?
>>>>>>>>
>>>>>>>> 2010/8/16 Norman Maurer<no...@apache.org>
>>>>>>>>
>>>>>>>> Hi Max,
>>>>>>>>
>>>>>>>>   check the FromRepository Mailet...
>>>>>>>>
>>>>>>>>> http://james.apache.org/server/2.3.2/provided_mailets.html
>>>>>>>>>
>>>>>>>>> Bye,
>>>>>>>>> Norman
>>>>>>>>>
>>>>>>>>> 2010/8/16 Max Levinson<ma...@gmail.com>:
>>>>>>>>>
>>>>>>>>>   Hi guys,
>>>>>>>>>
>>>>>>>>>> I have a situation which requires your help, I have this DB
>>>>>>>>>> repository:
>>>>>>>>>>
>>>>>>>>>>   <processor name="spam">
>>>>>>>>>>   <mailet match="All" class="ToRepository">
>>>>>>>>>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>>>>>>   </mailet>
>>>>>>>>>>   </processor>
>>>>>>>>>>
>>>>>>>>>> All spam goes here, what if a user will decide to release a message
>>>>>>>>>> from
>>>>>>>>>> this repository(let's say release), how this can be achieved.
>>>>>>>>>>
>>>>>>>>>> Maybe there is a mailet which can resend a message from repository?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>   ---------------------------------------------------------------------
>>>>>>>>>>
>>>>>>>>>>   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
>>>>>>
>>>>>>
>>>>>>
>>>>>>   ---------------------------------------------------------------------
>>>> 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
>>
>>


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


Re: Resending email from a DB repository.

Posted by Eric Charles <er...@apache.org>.
  Hi Max,

 From the log, it seems that CLAMD mailet is executed, but not SpamAssassin.
Are you sure mail is passing via

   <mailet
match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
class="ToProcessor">
    <processor>spam</processor>
   </mailet>

and is redirected to the spam processor ?

Log shows that mail is stored in db://maildb/messages/spam/, but is it 
the one of "spam" processor ?

I also don't see the "...

...reached the end of this processor, and is automatically deleted.  This may
indicate a configuration error."


So I wonder if it really goes there?

I will also retest, but it was working at my side (it was reprocessing 
from spam)

Tks,

Eric

PS: I also use James 3 from trunk





On 25/08/2010 13:51, Max Levinson wrote:
> Hi Eric,
>
> Unfortunately configuration which you've suggested is not working for
> me(just a reminder I am on James 3 from trunk):
>
>   <processor name="spam">
>    <mailet match="All" class="ToRepository">
>     <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>     <passTrough>true</passTrough>
>    </mailet>
>    <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>     <repositoryPath>db://maildb/messages/spam</repositoryPath>
>     <processor>transport</processor>
>     <delete>true</delete>
>    </mailet>
>   </processor>
>
>
> This is what I am getting in the logs (message is getting caught by
> spamassassin and it put it into spam repository but FromRepository is not
> working after that)
>
> DEBUG 11:31:20,897 | james.smtpserver | Lookup command handler for command:
> DATA
> DEBUG 11:31:21,089 | james.smtpserver | executing james message handler
> org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension@a9f827
> DEBUG 11:31:21,092 | james.smtpserver | executing james message handler
> org.apache.james.smtpserver.AddDefaultAttributesMessageHook@8ce0ea
> DEBUG 11:31:21,104 | james.smtpserver | executing james message handler
> org.apache.james.smtpserver.SendMailHandler@1023565
> DEBUG 11:31:21,106 | james.smtpserver | sending mail
> INFO  11:31:22,217 | james.smtpserver | Successfully spooled mail
> Mail1282735881052-1 from max.levinson@gmail.com on 209.85.214.182 for [
> sales@domain.com]
> INFO  11:31:22,538 | james.mailetcontext | OK (by CLAMD on localhost/
> 127.0.0.1)
> INFO  11:31:31,062 | james.mailetcontext | Storing mail Mail1282735881052-1
> in db://maildb/messages/spam/
> DEBUG 11:31:52,383 | james.smtpserver | Lookup command handler for command:
> QUIT
>
>
> 2010/8/24 Eric Charles<er...@apache.org>
>
>>   Hi Max,
>>
>> If you define the FromRepository before the ToRepository(spam), the mail
>> will not reside in the spam repo, so it will be not retrieved during the
>> processing of itself (probably well retrieved during the processing of the
>> following one).
>>
>> Moreover, you have to define<passThrough>true</passThrough>  in the mailet
>> in your spam processor. This is used to say James to not "Ghost" the mail
>> and to continue its processing.
>>
>> This gives use:
>>
>>
>> <processor name="root">
>>   <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
>>    <spamdHost>localhost</spamdHost>
>>    <spamdPort>783</spamdPort>
>>   </mailet>
>>   <mailet
>> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
>> class="ToProcessor">
>>    <processor>spam</processor>
>>   </mailet>
>> </processor>
>>
>>
>>   <processor name="spam">
>>   <mailet match="All" class="ToRepository">
>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>    <passTrough>true</passTrough>
>>   </mailet>
>>   <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>>
>>   <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>   <processor>   transport</processor>
>>   <delete>true</delete>
>>   </mailet>
>>   </processor>
>>
>> I didn't test that exact configuration, but an equivalent one.
>>
>> If you leave like that, the sales@domain.com should be reprocessed by the
>> transport processor.
>> You will have for the other spams a message such as:
>> WARN  19:55:14,752 | james.spoolmanager | Message Mail1282672514625-3
>> reached the end of this processor, and is automatically deleted.  This may
>> indicate a configuration error.
>>
>> If you don't like it, you may add
>>
>> <mailet match="All" class="Null"/>
>>
>> after the FromRepository mailet.
>>
>> Tks,
>>
>> Eric
>>
>>
>>
>> On 24/08/2010 12:54, Max Levinson wrote:
>>
>>> It is currently in a root processor.
>>>
>>>   <processor name="root">
>>>    <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
>>>     <spamdHost>localhost</spamdHost>
>>>     <spamdPort>783</spamdPort>
>>>    </mailet>
>>>    <mailet
>>> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
>>> class="ToProcessor">
>>>     <processor>spam</processor>
>>>    </mailet>
>>>    <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>>>
>>>    <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>    <processor>   transport</processor>
>>>    <delete>true</delete>
>>>    </mailet>
>>> </processor>
>>>
>>>
>>>   <processor name="spam">
>>>    <mailet match="All" class="ToRepository">
>>>     <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>    </mailet>
>>>   </processor>
>>>
>>> They way I see it is if message is already in spam repository and
>>> recipient
>>> is sales@domain.com or any other matcher triggering it, FromRepository
>>> mailet moves this email to transport processor, sort of release.
>>>
>>> Does it make sense, but unfortunately it is not working :(
>>>
>>> Maybe I do something wrong, and you need to use FromRepository mailet in
>>> different way?
>>>
>>> Thanks.
>>>
>>>
>>> 2010/8/24 Eric Charles<er...@apache.org>
>>>
>>>
>>>    Hi Max,
>>>> In which processor (root, transport, spam ?) did you put the
>>>> FromRepository
>>>> mailet.
>>>> I never used it, but I would put it just after the ToRepository in spam.
>>>>
>>>> If it still doesn't work at your side, I will give it a try.
>>>> Tell me...
>>>>
>>>> Tks,
>>>>
>>>> Eric
>>>>
>>>>
>>>>
>>>> On 23/08/2010 10:59, Max Levinson wrote:
>>>>
>>>>   Hi guys, can anyone help on this?
>>>>> 2010/8/19 Max Levinson<ma...@gmail.com>
>>>>>
>>>>>
>>>>>   Hi Norman,
>>>>>
>>>>>> I just got achance to test it, as you know I am on James 3 from trunk.
>>>>>>
>>>>>> Have anyone actually tried this mailet with James 3.
>>>>>>
>>>>>> It's not working for me, unfortunately.
>>>>>>
>>>>>>    <mailet match="RecipientIs=max@max.com" class="FromRepository">
>>>>>>    <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>>>    <processor>    transport</processor>
>>>>>>    <delete>true</delete>
>>>>>>    </mailet>
>>>>>>
>>>>>> It says in the logs that mailet was initialised, but it's not resending
>>>>>> email.
>>>>>>
>>>>>> What can be the problem?
>>>>>>
>>>>>> 2010/8/16 Norman Maurer<no...@apache.org>
>>>>>>
>>>>>> Hi Max,
>>>>>>
>>>>>>   check the FromRepository Mailet...
>>>>>>> http://james.apache.org/server/2.3.2/provided_mailets.html
>>>>>>>
>>>>>>> Bye,
>>>>>>> Norman
>>>>>>>
>>>>>>> 2010/8/16 Max Levinson<ma...@gmail.com>:
>>>>>>>
>>>>>>>   Hi guys,
>>>>>>>> I have a situation which requires your help, I have this DB
>>>>>>>> repository:
>>>>>>>>
>>>>>>>>   <processor name="spam">
>>>>>>>>   <mailet match="All" class="ToRepository">
>>>>>>>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>>>>   </mailet>
>>>>>>>>   </processor>
>>>>>>>>
>>>>>>>> All spam goes here, what if a user will decide to release a message
>>>>>>>> from
>>>>>>>> this repository(let's say release), how this can be achieved.
>>>>>>>>
>>>>>>>> Maybe there is a mailet which can resend a message from repository?
>>>>>>>>
>>>>>>>>
>>>>>>>>   ---------------------------------------------------------------------
>>>>>>>>
>>>>>>> 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
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>> 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: Resending email from a DB repository.

Posted by Eric Charles <er...@apache.org>.
  Hi Max,

If you define the FromRepository before the ToRepository(spam), the mail 
will not reside in the spam repo, so it will be not retrieved during the 
processing of itself (probably well retrieved during the processing of 
the following one).

Moreover, you have to define <passThrough>true</passThrough> in the 
mailet in your spam processor. This is used to say James to not "Ghost" 
the mail and to continue its processing.

This gives use:

<processor name="root">
   <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
    <spamdHost>localhost</spamdHost>
    <spamdPort>783</spamdPort>
   </mailet>
   <mailet
match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
class="ToProcessor">
    <processor>spam</processor>
   </mailet>
</processor>

  <processor name="spam">
   <mailet match="All" class="ToRepository">
    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
    <passTrough>true</passTrough>
   </mailet>
   <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
   <repositoryPath>db://maildb/messages/spam</repositoryPath>
   <processor>  transport</processor>
   <delete>true</delete>
   </mailet>
  </processor>

I didn't test that exact configuration, but an equivalent one.

If you leave like that, the sales@domain.com should be reprocessed by 
the transport processor.
You will have for the other spams a message such as:
WARN  19:55:14,752 | james.spoolmanager | Message Mail1282672514625-3 
reached the end of this processor, and is automatically deleted.  This 
may indicate a configuration error.

If you don't like it, you may add

<mailet match="All" class="Null"/>

after the FromRepository mailet.

Tks,

Eric


On 24/08/2010 12:54, Max Levinson wrote:
> It is currently in a root processor.
>
>   <processor name="root">
>    <mailet nomatch="SenderHostIsLocal" class="SpamAssassin">
>     <spamdHost>localhost</spamdHost>
>     <spamdPort>783</spamdPort>
>    </mailet>
>    <mailet
> match="HasMailAttributeWithValue=org.apache.james.spamassassin.flag, YES"
> class="ToProcessor">
>     <processor>spam</processor>
>    </mailet>
>    <mailet match="RecipientIs=sales@domain.com" class="FromRepository">
>    <repositoryPath>db://maildb/messages/spam</repositoryPath>
>    <processor>  transport</processor>
>    <delete>true</delete>
>    </mailet>
> </processor>
>
>   <processor name="spam">
>    <mailet match="All" class="ToRepository">
>     <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>    </mailet>
>   </processor>
>
> They way I see it is if message is already in spam repository and recipient
> is sales@domain.com or any other matcher triggering it, FromRepository
> mailet moves this email to transport processor, sort of release.
>
> Does it make sense, but unfortunately it is not working :(
>
> Maybe I do something wrong, and you need to use FromRepository mailet in
> different way?
>
> Thanks.
>
>
> 2010/8/24 Eric Charles<er...@apache.org>
>
>>   Hi Max,
>>
>> In which processor (root, transport, spam ?) did you put the FromRepository
>> mailet.
>> I never used it, but I would put it just after the ToRepository in spam.
>>
>> If it still doesn't work at your side, I will give it a try.
>> Tell me...
>>
>> Tks,
>>
>> Eric
>>
>>
>>
>> On 23/08/2010 10:59, Max Levinson wrote:
>>
>>> Hi guys, can anyone help on this?
>>>
>>> 2010/8/19 Max Levinson<ma...@gmail.com>
>>>
>>>
>>>   Hi Norman,
>>>> I just got achance to test it, as you know I am on James 3 from trunk.
>>>>
>>>> Have anyone actually tried this mailet with James 3.
>>>>
>>>> It's not working for me, unfortunately.
>>>>
>>>>    <mailet match="RecipientIs=max@max.com" class="FromRepository">
>>>>    <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>>>    <processor>   transport</processor>
>>>>    <delete>true</delete>
>>>>    </mailet>
>>>>
>>>> It says in the logs that mailet was initialised, but it's not resending
>>>> email.
>>>>
>>>> What can be the problem?
>>>>
>>>> 2010/8/16 Norman Maurer<no...@apache.org>
>>>>
>>>> Hi Max,
>>>>
>>>>> check the FromRepository Mailet...
>>>>>
>>>>> http://james.apache.org/server/2.3.2/provided_mailets.html
>>>>>
>>>>> Bye,
>>>>> Norman
>>>>>
>>>>> 2010/8/16 Max Levinson<ma...@gmail.com>:
>>>>>
>>>>>> Hi guys,
>>>>>>
>>>>>> I have a situation which requires your help, I have this DB repository:
>>>>>>
>>>>>>   <processor name="spam">
>>>>>>   <mailet match="All" class="ToRepository">
>>>>>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>>>   </mailet>
>>>>>>   </processor>
>>>>>>
>>>>>> All spam goes here, what if a user will decide to release a message
>>>>>> from
>>>>>> this repository(let's say release), how this can be achieved.
>>>>>>
>>>>>> Maybe there is a mailet which can resend a message from repository?
>>>>>>
>>>>>>   ---------------------------------------------------------------------
>>>>> 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
>>
>>


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


Re: Resending email from a DB repository.

Posted by Eric Charles <er...@apache.org>.
  Hi Max,

In which processor (root, transport, spam ?) did you put the 
FromRepository mailet.
I never used it, but I would put it just after the ToRepository in spam.

If it still doesn't work at your side, I will give it a try.
Tell me...

Tks,

Eric


On 23/08/2010 10:59, Max Levinson wrote:
> Hi guys, can anyone help on this?
>
> 2010/8/19 Max Levinson<ma...@gmail.com>
>
>> Hi Norman,
>>
>> I just got achance to test it, as you know I am on James 3 from trunk.
>>
>> Have anyone actually tried this mailet with James 3.
>>
>> It's not working for me, unfortunately.
>>
>>    <mailet match="RecipientIs=max@max.com" class="FromRepository">
>>    <repositoryPath>db://maildb/messages/spam</repositoryPath>
>>    <processor>  transport</processor>
>>    <delete>true</delete>
>>    </mailet>
>>
>> It says in the logs that mailet was initialised, but it's not resending
>> email.
>>
>> What can be the problem?
>>
>> 2010/8/16 Norman Maurer<no...@apache.org>
>>
>> Hi Max,
>>> check the FromRepository Mailet...
>>>
>>> http://james.apache.org/server/2.3.2/provided_mailets.html
>>>
>>> Bye,
>>> Norman
>>>
>>> 2010/8/16 Max Levinson<ma...@gmail.com>:
>>>> Hi guys,
>>>>
>>>> I have a situation which requires your help, I have this DB repository:
>>>>
>>>>   <processor name="spam">
>>>>   <mailet match="All" class="ToRepository">
>>>>    <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>>>>   </mailet>
>>>>   </processor>
>>>>
>>>> All spam goes here, what if a user will decide to release a message from
>>>> this repository(let's say release), how this can be achieved.
>>>>
>>>> Maybe there is a mailet which can resend a message from repository?
>>>>
>>> ---------------------------------------------------------------------
>>> 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: Resending email from a DB repository.

Posted by Max Levinson <ma...@gmail.com>.
Hi Norman,

I just got achance to test it, as you know I am on James 3 from trunk.

Have anyone actually tried this mailet with James 3.

It's not working for me, unfortunately.

  <mailet match="RecipientIs=max@max.com" class="FromRepository">
  <repositoryPath>db://maildb/messages/spam</repositoryPath>
  <processor> transport </processor>
  <delete>true</delete>
  </mailet>

It says in the logs that mailet was initialised, but it's not resending
email.

What can be the problem?

2010/8/16 Norman Maurer <no...@apache.org>

> Hi Max,
>
> check the FromRepository Mailet...
>
> http://james.apache.org/server/2.3.2/provided_mailets.html
>
> Bye,
> Norman
>
> 2010/8/16 Max Levinson <ma...@gmail.com>:
> > Hi guys,
> >
> > I have a situation which requires your help, I have this DB repository:
> >
> >  <processor name="spam">
> >  <mailet match="All" class="ToRepository">
> >   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
> >  </mailet>
> >  </processor>
> >
> > All spam goes here, what if a user will decide to release a message from
> > this repository(let's say release), how this can be achieved.
> >
> > Maybe there is a mailet which can resend a message from repository?
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

Re: Resending email from a DB repository.

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

check the FromRepository Mailet...

http://james.apache.org/server/2.3.2/provided_mailets.html

Bye,
Norman

2010/8/16 Max Levinson <ma...@gmail.com>:
> Hi guys,
>
> I have a situation which requires your help, I have this DB repository:
>
>  <processor name="spam">
>  <mailet match="All" class="ToRepository">
>   <repositoryPath>db://maildb/messages/spam/</repositoryPath>
>  </mailet>
>  </processor>
>
> All spam goes here, what if a user will decide to release a message from
> this repository(let's say release), how this can be achieved.
>
> Maybe there is a mailet which can resend a message from repository?
>

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