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 Rafal Markut <ra...@mediawave.de> on 2005/07/27 17:18:16 UTC

How to delete emails which are already in James ?

Hello,

I want to delete emails which James haven't sent yet.

I found files in directories:
/james-2.1.2/apps/james/var/mail/spool/
/james-2.1.2/apps/james/var/mail/outgoing/campaigns/newsletters/

I assume that in "outgoing" directory are emails which the James is going to 
send.
but what for is "spool" directory ?

If I want to delete an email (that James won't send it) can I simply delete 
this two files ( Repository.FileObjectStore and Repository.FileStreamStore) 
?
or do I have to do something more ?

I'd very greateful for help.

with best regards,
Rafal 


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


Re: How to delete emails which are already in James ?

Posted by Stefano Bagnara <ap...@bago.org>.
> You can delete such files *even if james is running*.
> 
> Vincenzo

You can, but then it's not granted that it will work. 

James could already have read the message and being ready to save a new
message in another store.
Or in the worst scenario you could delete the mail content when james has a
running "mimemessagewrapper" that will raise an exception when it will try
to read the message body.

I've done this many times, but I want to be sure that james users know the
drawbacks ;-)

Stefano

> Rafal Markut wrote:
> 
> > I deleted and seems to be everything perfect :) Thank you for help.
> >
> > with best regards,
> > Rafal
> >
> > ----- Original Message ----- From: "Stefano Bagnara" 
> <ap...@bago.org>
> > To: "'James Users List'" <se...@james.apache.org>
> > Sent: Wednesday, July 27, 2005 6:06 PM
> > Subject: Re: How to delete emails which are already in James ?
> >
> >
> >>> In spool directory there are files e.g.
> >>> G4858767483857D48848484848.Repository.FileObjectStore
> >>> G4858767483857D48848484848.Repository.FileStreamStore
> >>> This two files represents one email. If I want just delete this 
> >>> email ...
> >>> shall I only to delete these two files ? or do I have to do 
> >>> something more ?
> >>> If I delete them, is it sure that the James won't send the email ?
> >>
> >>
> >> If james is stopped yes.
> >>
> >> Consider that a single "input" mail can be duplicated in more than 
> >> one mail during the spooling.
> >> E.g. you send a single mail with 3 recipients, 1 local to james 
> >> domain, 2 remote addresses in different domains:
> >> During the spool james will create a copy of the message 
> and deliver 
> >> the original to the local user while the cloned (privated of the 
> >> local
> >> recipient) will go to the RemoteDelivery that will remove 
> the message 
> >> from the spool and will create 2 copies (each with a single 
> >> recipient) in the "outgoing" spool.
> >>
> >> Stefano
> >>
> >>
> >> 
> ---------------------------------------------------------------------
> >> 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: How to delete emails which are already in James ?

Posted by Vincenzo Gianferrari Pini <vi...@praxis.it>.
You can delete such files *even if james is running*.

Vincenzo

Rafal Markut wrote:

> I deleted and seems to be everything perfect :)
> Thank you for help.
>
> with best regards,
> Rafal
>
> ----- Original Message ----- From: "Stefano Bagnara" <ap...@bago.org>
> To: "'James Users List'" <se...@james.apache.org>
> Sent: Wednesday, July 27, 2005 6:06 PM
> Subject: Re: How to delete emails which are already in James ?
>
>
>>> In spool directory there are files e.g.
>>> G4858767483857D48848484848.Repository.FileObjectStore
>>> G4858767483857D48848484848.Repository.FileStreamStore
>>> This two files represents one email. If I want just delete
>>> this email ...
>>> shall I only to delete these two files ? or do I have to do
>>> something more ?
>>> If I delete them, is it sure that the James won't send the email ?
>>
>>
>> If james is stopped yes.
>>
>> Consider that a single "input" mail can be duplicated in more than 
>> one mail
>> during the spooling.
>> E.g. you send a single mail with 3 recipients, 1 local to james 
>> domain, 2
>> remote addresses in different domains:
>> During the spool james will create a copy of the message and deliver the
>> original to the local user while the cloned (privated of the local
>> recipient) will go to the RemoteDelivery that will remove the message 
>> from
>> the spool and will create 2 copies (each with a single recipient) in the
>> "outgoing" spool.
>>
>> Stefano
>>
>>
>> ---------------------------------------------------------------------
>> 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: How to delete emails which are already in James ?

Posted by Rafal Markut <ra...@mediawave.de>.
I deleted and seems to be everything perfect :)
Thank you for help.

with best regards,
Rafal

----- Original Message ----- 
From: "Stefano Bagnara" <ap...@bago.org>
To: "'James Users List'" <se...@james.apache.org>
Sent: Wednesday, July 27, 2005 6:06 PM
Subject: Re: How to delete emails which are already in James ?


>> In spool directory there are files e.g.
>> G4858767483857D48848484848.Repository.FileObjectStore
>> G4858767483857D48848484848.Repository.FileStreamStore
>> This two files represents one email. If I want just delete
>> this email ...
>> shall I only to delete these two files ? or do I have to do
>> something more ?
>> If I delete them, is it sure that the James won't send the email ?
>
> If james is stopped yes.
>
> Consider that a single "input" mail can be duplicated in more than one 
> mail
> during the spooling.
> E.g. you send a single mail with 3 recipients, 1 local to james domain, 2
> remote addresses in different domains:
> During the spool james will create a copy of the message and deliver the
> original to the local user while the cloned (privated of the local
> recipient) will go to the RemoteDelivery that will remove the message from
> the spool and will create 2 copies (each with a single recipient) in the
> "outgoing" spool.
>
> Stefano
>
>
> ---------------------------------------------------------------------
> 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 delete emails which are already in James ?

Posted by Stefano Bagnara <ap...@bago.org>.
> In spool directory there are files e.g.
> G4858767483857D48848484848.Repository.FileObjectStore
> G4858767483857D48848484848.Repository.FileStreamStore
> This two files represents one email. If I want just delete 
> this email ... 
> shall I only to delete these two files ? or do I have to do 
> something more ?
> If I delete them, is it sure that the James won't send the email ?

If james is stopped yes.

Consider that a single "input" mail can be duplicated in more than one mail
during the spooling.
E.g. you send a single mail with 3 recipients, 1 local to james domain, 2
remote addresses in different domains:
During the spool james will create a copy of the message and deliver the
original to the local user while the cloned (privated of the local
recipient) will go to the RemoteDelivery that will remove the message from
the spool and will create 2 copies (each with a single recipient) in the
"outgoing" spool.

Stefano


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


Re: How to delete emails which are already in James ?

Posted by Rafal Markut <ra...@mediawave.de>.
Thank you for reply.

> You can remove a mail from a repository if you know the mail name (primary
> key).
> You shouldn't use FileObjectStore or FileStreamStore directly.
>
> What is the workflow that you need to delete the mail? When do you need to
> delete?

I dont want to write any software which deletes some mails. I want just 
delete some email. I stopped James (to make sure that it won't send these 
emails) and delete these "unwanted" emails.

In spool directory there are files e.g.
G4858767483857D48848484848.Repository.FileObjectStore
G4858767483857D48848484848.Repository.FileStreamStore
This two files represents one email. If I want just delete this email ... 
shall I only to delete these two files ? or do I have to do something more 
?
If I delete them, is it sure that the James won't send the email ?

with best regards,
Rafal 


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


Re: How to delete emails which are already in James ?

Posted by Stefano Bagnara <ap...@bago.org>.
> I want to delete emails which James haven't sent yet.
> 
> I found files in directories:
> /james-2.1.2/apps/james/var/mail/spool/
> /james-2.1.2/apps/james/var/mail/outgoing/campaigns/newsletters/
> 
> I assume that in "outgoing" directory are emails which the 
> James is going to send.
> but what for is "spool" directory ?

James puts every mail into the spool. Then it run this mails through the
processors (matchers/mailets).
When it find that a mail is to be delivered to an outgoing host the
RemoteDelivery mailet remove the mail from the spool and put it into
outgoing. Outgoing is a spool, too but contains only mails to be delivered
(or mails that are temporary failing and shoudl be retried later). 

> If I want to delete an email (that James won't send it) can I 
> simply delete this two files ( Repository.FileObjectStore and 
> Repository.FileStreamStore) ?
> or do I have to do something more ?

You can remove a mail from a repository if you know the mail name (primary
key).
You shouldn't use FileObjectStore or FileStreamStore directly.

What is the workflow that you need to delete the mail? When do you need to
delete?

Stefano


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