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
smime.p7s
Description: S/MIME Cryptographic Signature