Hi Danny, 1/ *don't* access James for config, that is officially discouraged, and Not Supported, it may well not be possible in the next release
So, basically it is up to my mailets to manage "fancy" configuration for themselves? I guess (as you suggested) I can write my own config file and use Avalon Configuration to deal with it. Moving forward we are going to have to take a stance here and either offer a configuration service to mailets or not because as it stands now we are offering IMO an incomplete solution. I know that there has been some talk on this issue before, I will have to revisit the messages now that I am getting more familiar with things. 2. OK > Why can't you split this all up into seperate mailet/matchers in their own linear processor? : On the 22.01 I wrote an email to the dev list discussing my idea and I did mention that I had thought (maybe not enough) about using the seperate mailet/matcher aproach, I was kinda hoping for some feedback Re. that mail :-) Maybe I can use the mailet/matcher aproach, I had orginally broken down the process into three things. Match -> Parse -> Process. Match would basically indicate if this message is a bounce of type X and can be parsed by the related parser (Their is a tight relationship between match and parse) Parse would parse the message to try and extract the necessary info (Bounce Type, Status Code, Original recipient etc ....) and create a new instace of a Bounce object housing this data. Process would act on the data it recived from the parser. Anyone should be able to plug in their own processor and do what they like with the data. eg. Update a DB. Process would need to receive an instance of Object Bounce from the parse operation containing the data. For the moment I have not found a clean way to satisfy these requirements with the standard mailet/matcher approach. > Without knowing what your doing its hard to say exactly what the answer should be. I tried to describe the process here http://www.mail-archive.com/[email protected]/msg06017.html Thanks, Sergei ----- Original Message ----- From: "Danny Angus" <[EMAIL PROTECTED]> To: "James Developers List" <[EMAIL PROTECTED]> Sent: Monday, January 27, 2003 12:12 PM Subject: RE: Mailet Configuration Serge My 2c.. 1/ *don't* access James for config, that is officially discouraged, and Not Supported, it may well not be possible in the next release. 2/ use the nastylooking hack for now, we can improve mailet/matcher config if its wanted, or use config files for your mailets I see no reason why that shouldn't be acceptable. 3/ tell us what you want from the config. look at the mailet plans wiki page. Why can't you split this all up into seperate mailet/matchers in their own linear processor? : <processor name="root"> <mailet match="RecipientIs=test1@localhost" class="ToProcessor"> <processorname>bounceprocessor</processorname> </mailet> </processor> <processor name="bounce> <mailet match="All" class="DNSBounce"/> <mailet match="All" class="....."/> </processor> Without knowing what your doing its hard to say exactly what the answer should be. d. > -----Original Message----- > From: Serge Sozonoff [mailto:[EMAIL PROTECTED]] > Sent: 27 January 2003 10:17 > To: James Developers List > Subject: Mailet Configuration > > > Hi Guys, > > Continuing on with my BounceHandler mailet idea, I would need to do > something like this in my configuration block for my mailet > > <mailet match="RecipientIs=test1@localhost" class="BounceHandler"> > <bounceHandlers> > <bounceHandler class="DSNBounce"/> > <bounceHandler class=".........."/> > </bounceHandlers> > <bounceProcessors> > <bounceProcessor class="DBBounceProcessor"> > <database>.....</database> > <....>...</...> > <bounceProcessor> > </bounceProcessors> > </mailet> > > However the mailet API does not give me access to this sort of thing and I > have not figured out if I can gain access directly to the James > Configuration object from my Mailet. I think not. > > As a temporary work around I could do something like this: > > <mailet match="RecipientIs=test1@localhost" class="BounceHandler"> > > <bounceHandlers>class=DSNBounce;class=QmailBounce;class=etc</bounc > eHandlers> > > <bounceProcessors>name=DBBounceProcessor;database=......</bouncePr > ocessors> > </mailet> > > But this is not very elegent and idealy I would at the very > minimum need to > pass additional config parameters to the bounceProcessors. > > Anyone have any ideas, suggestions? > > Thanks, > Sergei > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
