Hi, You could write your own MessageHandler and add it to the smtp-handlerchain.xml to get rid of the Email before it get queued (this includes changing the mail content etc).
If you want a notification when a new mail was queued, you should just write your own Mailet and put it on the beginning of the root processor using the All Matcher. http://james.apache.org/server/2.3.2/custom_mailet.html Bye, Norman 2010/4/12 Saurabh Bhatt <[email protected]>: > Thanks a lot for your response. > > Suppose the mail delivery is local i.e. all my mailboxes are on this > installation, > and this is a RECV ONLY installation. I dont send any SMTP messages, just > receive them and put them into users' mailboxes. > > Now when a message is received, I want to get hold of it as early as > possible. > What is the earliest time at which I can get such a callback? > > Additionally, suppose I dont want to change the message, just want a > notification > of a new message once it is received and deposited, with some data to be > able > to identify that message (get hold of the msg in one query). > How to do that? > > thanks > Saurabh > > On Mon, Apr 12, 2010 at 4:46 PM, Norman Maurer <[email protected] >> wrote: > >> Hi, >> >> do you want to change the message before it is queued (after the DATA >> SMTP command) or before it is delivered ? >> >> Bye, >> Norman >> >> >> 2010/4/12 Saurabh Bhatt <[email protected]>: >> > I am new to JAMES and I have this query. >> > >> > When I receive an incoming SMTP message on the JAMES server installation, >> > I want to have a callback which enables me to run some code (that may or >> may >> > not change the message) before the message is actually stored. >> > >> > For example, on receiving an incoming SMTP message and before the message >> is >> > stored in the DB for that user, I want to execute my function that checks >> a >> > system >> > limit or some arbitrary value based on which I may or may not want to >> store >> > the msg. >> > >> > Thanks in advance for your help. >> > >> > Saurabh >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
