Extension development
All Events

I haven't given up on this project, it's just turned out to be a lot more complicated without some guidance. I'm hoping that one of the programmers from the original mercury software will catch this and give me some more direction. Meanwhile i keep trying to work on this, does anyone know the proper way to "identify" a variable type then show it's contents? that's kind of where i'm at now... (Visual C++ 2010 Express - Using a virtual WinXP machine to code, only windows i had an extra key for VM)

 

<p>I haven't given up on this project, it's just turned out to be a lot more complicated without some guidance. I'm hoping that one of the programmers from the original mercury software will catch this and give me some more direction. Meanwhile i keep trying to work on this, does anyone know the proper way to "identify" a variable type then show it's contents? that's kind of where i'm at now... (Visual C++ 2010 Express - Using a virtual WinXP machine to code, only windows i had an extra key for VM)</p><p> </p>

I am "learning" how to use the DDK for the mail server and did some fiddling around, developed a "all events" dll, and ran into an issue... I have successfully written the dll that loads and registers properly, but i cannot figure out (beyond log  "event occurred") how to figure out which event actual occurred. does anyone have a "list" of (all) events that i'm seeing happen in my system messages window -and/or- an example (just the event handler) on how to "display" in the system messages window which event has occurred so i can filter out which ones i'm really interested in? Ultimately, i am trying to find the event(s) that happen just before it gets handed off to be processed (after spamhalter, clamwall, graywall, AND content control) so i can modify the emails "body" -or- "subject" to indicate i.e. it was flagged as spam, or for deletion (which i have setup and working now, i just want to "do" something with the email after all these checks and headers have been added/done)... i will be happy sharing my end result, because mercury does a fine job of indicating possible spam, i just want to carry it a bit further. right now i just send suspected spam to two accounts; "spam" & "delete these" (to assure nothing slips). did you guess i'm dealing with spam? i'm effectively moving around the suspects pretty good right now, i just want to venture into mercury's events (all of them) and push everything a bit further.

Ok, now i'm REALLY stumped... I tried to create a "new" window for my events daemon in the main console window, and i played with the example in the developers guide quite a bit, and... i can't get  the code to compile, keeps saying that the "MCONSOLE" hasn't been defined... help?

I've been trying to find any examples of daemon scripts on the internet now for a couple days to no avail... if anyone can point me to some examples, i probably can figure out alot of what i'm trying to do on my own. All but (of course) the event messages i'm trying to figure out anyhow. 

<p>I am "learning" how to use the DDK for the mail server and did some fiddling around, developed a "all events" dll, and ran into an issue... I have successfully written the dll that loads and registers properly, but i cannot figure out (beyond log  "event occurred") how to figure out which event actual occurred. does anyone have a "list" of (all) events that i'm seeing happen in my system messages window -and/or- an example (just the event handler) on how to "display" in the system messages window which event has occurred so i can filter out which ones i'm really interested in? Ultimately, i am trying to find the event(s) that happen just before it gets handed off to be processed (after spamhalter, clamwall, graywall, AND content control) so i can modify the emails "body" -or- "subject" to indicate i.e. it was flagged as spam, or for deletion (which i have setup and working now, i just want to "do" something with the email after all these checks and headers have been added/done)... i will be happy sharing my end result, because mercury does a fine job of indicating possible spam, i just want to carry it a bit further. right now i just send suspected spam to two accounts; "spam" & "delete these" (to assure nothing slips). did you guess i'm dealing with spam? i'm effectively moving around the suspects pretty good right now, i just want to venture into mercury's events (all of them) and push everything a bit further.</p><p>Ok, now i'm REALLY stumped... I tried to create a "new" window for my events daemon in the main console window, and i played with the example in the developers guide quite a bit, and... i can't get  the code to compile, keeps saying that the "MCONSOLE" hasn't been defined... help?</p><p>I've been trying to find any examples of daemon scripts on the internet now for a couple days to no avail... if anyone can point me to some examples, i probably can figure out alot of what i'm trying to do on my own. All but (of course) the event messages i'm trying to figure out anyhow. </p>

There is proper event handling for MercuryS (SMTP) and MercuryP (POP3), and the available events are listed in the "MercuryS Events.txt" and  "MercuryP Events.txt" files. Messages passing through Mercury core are accessible from daemons at certain points but not really event based. All deamons can write to the system messages window using the

logstring and logdata functions, see pages 72-74 in the Daemon Developer Guide. 

<p>There is proper event handling for MercuryS (SMTP) and MercuryP (POP3), and the available events are listed in the "MercuryS Events.txt" and <span style="font-size: 13.3333px;"> "MercuryP Events.txt" </span>files. Messages passing through Mercury core are accessible from daemons at certain points but not really event based. All deamons can write to the system messages window using the <span class="fontstyle0">logstring</span> and logdata functions, see pages 72-74 in the Daemon Developer Guide.<span style="font-size: 10pt;"> </span></p>

i found the example for creating a "window" in the main window, but it has issues with the "MCONSOLE" not being declared, do i need another include ? 

<p>i found the example for creating a "window" in the main window, but it has issues with the "MCONSOLE" not being declared, do i need another include ?<span style="font-size: 10pt;"> </span></p>

Haven't tested creating console window objects, but I would expect that the example code on page 79 in the developer guide is correct. Try catching errors from the oif_new call to see what is happening.

 

<p>Haven't tested creating console window objects, but I would expect that the example code on page 79 in the developer guide is correct. Try catching errors from the oif_new call to see what is happening.</p><p> </p>

Gary - I'm interested in following your progress on this.

I've been running a policy for some years which alters the subject line of certain incoming messages, and that works well.  I'm currently experimenting with expanding that to avoid the DMARC / mailing list problems by altering the From: address.  Using the DDK would seem like a more efficient method and is an option I'd like to explore.

 

<P>Gary - I'm interested in following your progress on this.</P> <P>I've been running a policy for some years which alters the subject line of certain incoming messages, and that works well.  I'm currently experimenting with expanding that to avoid the DMARC / mailing list problems by altering the From: address.  Using the DDK would seem like a more efficient method and is an option I'd like to explore.</P> <P mce_keep="true"> </P>

Well, as mentioned above Paul, i have already tried to use the example in the ddk reference (as referred to above) but that's where the problems started, it would not recognize the 'MCONSOLE' declaration. I'm assuming i need to use another include which is my 1st step in resolving this myself, the next step; i will try is to "decompile" the dll (if possible) and see how David created the windows inside the main window, then i'll try to find a viable way to decipher the event calls. Right now i have successively sent to the system messages window that "an event has occurred" - but i have no idea which one. I have gone over the ddk reference several times and it does not provide a lot of info on what i'm trying to do, i was hoping someone else had attempted any of these scenarios.(hope you see this David, i seriously like the software, just being a coder myself...). I will be posting anything i manage to figure out here only because i believe in "open source"... *heh*

Attaching the current code i am currently "testing" for anyone else interested. 

Wait, Paul? You said you had something that edits the subject line? Is the code protected -or- mind sharing? - Thanx 

<p>Well, as mentioned above Paul, i have already tried to use the example in the ddk reference (as referred to above) but that's where the problems started, it would not recognize the 'MCONSOLE' declaration. I'm assuming i need to use another include which is my 1st step in resolving this myself, the next step; i will try is to "decompile" the dll (if possible) and see how David created the windows inside the main window, then i'll try to find a viable way to decipher the event calls. Right now i have successively sent to the system messages window that "an event has occurred" - but i have no idea which one. I have gone over the ddk reference several times and it does not provide a lot of info on what i'm trying to do, i was hoping someone else had attempted any of these scenarios.(hope you see this David, i seriously like the software, just being a coder myself...). I will be posting anything i manage to figure out here only because i believe in "open source"... *heh*</p><p>Attaching the current code i am currently "testing" for anyone else interested. </p><p>Wait, Paul? You said you had something that edits the subject line? Is the code protected -or- mind sharing? - Thanx </p>

O...K... It seems that "Decompiling" a DLL proved to be a major $$$ problem. It seems that I need some real C++ examples of how to create a window inside the main window. While i go onto the internet and try to find "anything" other than the example in the DDK (which i can't figure out... yet), if anyone else has any ideas/examples please let me know. Again, i will try to keep everything posted here that i do figure out.

O...K... It seems that "Decompiling" a DLL proved to be a major $$$ problem. It seems that I need some real C++ examples of how to create a window inside the main window. While i go onto the internet and try to find "anything" other than the example in the DDK (which i can't figure out... yet), if anyone else has any ideas/examples please let me know. Again, i will try to keep everything posted here that i do figure out.

My goal is to catch "all" events so i can redirect them (if needed) appropriately. I want to be as though as possible for expansion.

As i promised of course; the attachments this time are the revised code with the actual output (i still haven't figured out the new "console" window problem...) of what i have figured out so far.

 
<div>My goal is to catch "all" events so i can redirect them (if needed) appropriately. I want to be as though as possible for expansion.</div><div> </div><div>As i promised of course; the attachments this time are the revised code with the actual output (i still haven't figured out the new "console" window problem...) of what i have figured out so far.</div><div> </div><div> </div>

*hah*... it seems i can't upload more than one file per reply... here's the output...

(this is the result of my email client checking 9 accounts, curious eh?)

now if i can just figure out which each of these calls mean... 

<p>*hah*... it seems i can't upload more than one file per reply... here's the output...</p><p>(this is the result of my email client checking 9 accounts, curious eh?)</p><p>now if i can just figure out which each of these calls mean... </p>

[quote user="Gary"] Wait, Paul? You said you had something that edits the subject line? Is the code protected -or- mind sharing? - Thanx [/quote]

Happy to share it but it's nothing special - just a compiled script that copies the message body line by line and modifies the subject line when it finds it.  Originally I produced it to avoid overlong subject lines caused by [absurdly long mailing list titles] and buggy emailers that produced multiple multilingual "Re:" insertions.

(It has quite a few limitations, encoded text being one and it struggles with multi-line subjects, but it does the job for me.)

If you are still interested I'll PM it to you.

<P>[quote user="Gary"] Wait, Paul? You said you had something that edits the subject line? Is the code protected -or- mind sharing? - Thanx [/quote]</P> <P>Happy to share it but it's nothing special - just a compiled script that copies the message body line by line and modifies the subject line when it finds it.  Originally I produced it to avoid overlong subject lines caused by [absurdly long mailing list titles] and buggy emailers that produced multiple multilingual "Re:" insertions.</P> <P>(It has quite a few limitations, encoded text being one and it struggles with multi-line subjects, but it does the job for me.)</P> <P>If you are still interested I'll PM it to you.</P>

yes, i would love you to send me a copy, eventually i want to be able to "modify" the subject of "suspicious" emails so they can be caught "faster" when read. I'm still having major trouble with the event-table that i mentioned above (what does what and what it means)... because of the context, i'm trying to include <typeinfo> so i can decipher the responses, but it seems that vc++ 2010 express doesn't like that include at all, and i'm limited to which operating system i can use to run that compiler. I'm trying to use XP, it's terrible hard to restore win7 if i crash the system (which happens when you try to write code *heh*) and i still haven't been able to create my "own" window for output inside the primary window... even using the example in the ddk. Thanx for responding Paul.

yes, i would love you to send me a copy, eventually i want to be able to &quot;modify&quot; the subject of &quot;suspicious&quot; emails so they can be caught &quot;faster&quot; when read. I&#039;m still having major trouble with the event-table that i mentioned above (what does what and what it means)... because of the context, i&#039;m trying to include &amp;lt;typeinfo&amp;gt; so i can decipher the responses, but it seems that vc++ 2010 express doesn&#039;t like that include at all, and i&#039;m limited to which operating system i can use to run that compiler. I&#039;m trying to use XP, it&#039;s terrible hard to restore win7 if i crash the system (which happens when you try to write code *heh*) and i still haven&#039;t been able to create my &quot;own&quot; window for output inside the primary window... even using the example in the ddk. Thanx for responding Paul.

That's done.

As I said I'm changing it to cope with DMARC mailing list problems by altering From addresses (particularly yahoo ones!) and may change it from a script to something with less overhead.

&lt;P&gt;That&#039;s done.&lt;/P&gt; &lt;P&gt;As I said I&#039;m changing it to cope with DMARC mailing list problems by altering From addresses (particularly yahoo ones!) and may change it from a script to something with less overhead.&lt;/P&gt;
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft