Right.

Btw.
We use this "GHOST" state in our mailet, but always after writing a comment to 
the log (like Mail from ... to .. with subject ... has been deleted). I 
recommend, not to delete mails without logging.
We also use "ERROR", to get some of the unwanted mails to be stored in the 
error directory.
This directory we clean up every view days (cron job), it is just a buffer for 
users asking "where is my mail".

We also use ClamAV. Which will delete virus mails.

Be aware that some local deamons (like logwatch under linux) could send mails 
to "root@localhost" or some local address.
We have this on our James server, and they should not been deleted.
(Our mail server does not have mailboxes, it routes everything to exchange.)

Just my "operating experience".
Bernd

-----Ursprüngliche Nachricht-----
Von: Mahesh Sivarama Pillai [mailto:srm...@gmail.com] 
Gesendet: Dienstag, 12. August 2014 15:30
An: James Users List
Betreff: Re: Ignore email after processing

Thanks Stefano and Bernd. I am aware of the functionality of the mailets.
Somehow I missed the GHOST state. Yes thats what I want. May be in the 
transport processor, I can have my custom Mailet instead of the following local 
delivery element..

<mailet match="RecipientIsLocal" class="LocalDelivery"/>

And have my mailet take a decision on setting the state as GHOST/ERROR or 
something else based on the processing. Rite ?

Thanks
Mahesh


On Tue, Aug 12, 2014 at 6:44 PM, Bernd Waibel <bwai...@intarsys.de> wrote:

> Hello Mahesh,
>
> if you would like to use Mailets, you could change the state of the 
> mail (the mail object).
> - If you set it to "GHOST", it will be deleted and not stored.
> - If you set it to "ERROR", it will be transported to the "error"
> processor (may store it, may deleted, whatever configured in config.xml).
>
>
> There are some existing mailets which could help you, too. They are 
> configured in config.xml.
> You could define if a mail "match" something, it could be "handled by 
> a mailet class" somehow.
> That means for example:
>          <mailet match="SMTPAuthSuccessful" class="ToProcessor">
>             <processor> transport </processor>
>          </mailet>
> Or
>          <mailet match="All" class="ToRepository">
>             <repositoryPath> file://var/mail/error/</repositoryPath>
>          </mailet>
> There are a lot of existing mailets, and examples in the default 
> config.xml.
> Also here is a overview of mailets:
> http://james.apache.org/mailet/standard/mailet-report.html
>
>
> Furthermore there is also a concept of bouncing back the mail (DSN 
> bounce) you may have a look at, depends on your needs.
> But I think bouncing back mails is not what you would like to.
>
> Greetings,
> Bernd
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Mahesh Sivarama Pillai [mailto:srm...@gmail.com]
> Gesendet: Dienstag, 12. August 2014 14:15
> An: James Users List
> Betreff: Ignore email after processing
>
> Hi,
>
>  In certain mail servers like sendmail, we can pipe the incoming 
> message to a script. Till the execution of the script, the mail will 
> be stored in the spool queue. The mail will not get moved to the inbox 
> after the script is run. So in effect the mail is deleted/ignored 
> after the processing. If I want to implement this in JAMES using 
> mailets how do I do it ? Can I prevent the email from going to the 
> inbox of a user after processing the business logic in Mailets or can I 
> delete it right after the processing ?.
> I don't want my inbox to grow. To give a background,  I am 
> implementing an email application platform; so there is no real users 
> associated with this email server who want to manage their emails 
> using any email client. And this is not meant to be a relay server as 
> well. The email JAMES is going to recieve is forwarded from an Enterprise 
> Email server.
>
> Please provide your comments/suggestions.
>
> Thanks
> Mahesh
>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to