Notification emails to a different domain

This forum is for discussing Mailtraq's Scripting features. Get help with Mailtraq scripts, templates and external ActiveX scripting.

Notification emails to a different domain

Postby pspalmer » Fri Nov 28th, 2008 4:23pm

I set up STARTTLS secure email between our MailTraq server and a client of ours. After going through that trouble, I didn't want to simply forward the messages in the clear to our main production email. Since the main account on this MT will not be closely monitored, I needed a way to alert our production team to inbound messages. I tried a number of things to accomplish this goal, but the one that worked (with some careful trial and error) was using an automated action that kicked off a Javascript when filter conditions are met during inbound delivery.

The Javascript looks like this:

Code: Select all
 <@LANGUAGE=JavaScript@>
    <%

    var msgBody =
      "YOU HAVE MAIL.\r\n" +
      "\r\n" +
      "A secure message has been sent from Client X.  Please log on to secure webmail to retrieve the message.  Please be aware that no further notifications will be sent regarding the message.\r\n"+
      "\r\n" +
      "If you receive this message and do not know what to do with it, please contact the IT Department for assistance.";
   
    var msgHeader =
      "Subject: NOTIFICATION: SECURE MESSAGE IS WAITING\r\n";

   
      Server.MessageSend("[specify the email address you wish to show in the 'from' field]", "[destination email address or addresses separated by comma]", msgHeader, msgBody);
     //remove [brackets] from above entry and replace with corresponding email addresses

    %>


After figuring out the proper syntax for the coding and running successful tests to my own account from the Scripts tab, I went to the "Automated Scripting" tab and built out separate actions to filter messages FROM each of client's domain TO the main account on the MT server. If an inbound message triggers the filter and kicks off the JScript, a simple notification message alerting the production team is generated and sent to a closely monitored distribution list on our main mail server.

IMPORTANT NOTE: The filters have to be set up correctly for this - you must specify the "FROM" and the "TO", and set the match to "All". If you try to filter more than one inbound domain, the filter will fail. If you add additional "FROM" entries and then change the match condition to "Any", then you will cause a looping condition that sends the notification repeatedly (I never let it get beyond 500 messages, but it didn't show any signs of stopping).

Now that I have that working, I've noticed one bit of odd behavior - for each entry created in the "Automated Scripting" tab (I have six), the scripts are duplicated on the "Scripts" tab. This also took place on some pre-existing entries on that tab even though they are not specifically tapped in the automation actions - specifically, the "dialogues" and "mime" scripts are repeated six times along with the ones I created. Would love to know why this happens.
pspalmer
 
Posts: 3
Joined: Fri Nov 28th, 2008 3:08pm

Re: Notification emails to a different domain

Postby jimhill » Fri Nov 28th, 2008 9:52pm

pspalmer wrote:I set up STARTTLS secure email between our MailTraq server and a client of ours. After going through that trouble, I didn't want to simply forward the messages in the clear to our main production email.
Doesn't that suggest that you have no confidence in the security of your internal network?
pspalmer wrote: Since the main account on this MT will not be closely monitored, I needed a way to alert our production team to inbound messages.
Sending a message to say that a message has been received is a recipe for confusion, imo. For example, what happens if a new secure message arrives while the end user is already reading his webmail? He'll most likely see the secure message before he sees your notification of it.
pspalmer wrote: Please log on to secure webmail to retrieve the message.
Don't forget that, however secure the logon, the message text, in the clear, becomes available to every process running on the end user's computer. See above if you have no confidence that your network is secure.

It might pay to re-examine your requirements at this stage. What do you really need - a secure transmission channel between administrative boundaries or a secure message? If it's the latter, you need the client to encrypt the message using pgp or smime. Once they've done that, transmission security becomes irrelevant although there's no reason not to continue using tls as well.
pspalmer wrote:Now that I have that working, I've noticed one bit of odd behavior - for each entry created in the "Automated Scripting" tab (I have six), the scripts are duplicated on the "Scripts" tab. This also took place on some pre-existing entries on that tab even though they are not specifically tapped in the automation actions - specifically, the "dialogues" and "mime" scripts are repeated six times along with the ones I created. Would love to know why this happens.
I suspect that your system.cfg file is corrupt. Do the duplications appear in \database\configuration\system.cfg as well as in the user interface?

if you have recent backups of system.cfg, daily preferably, try substituting them (stopping and restarting Mailtraq each time) to see if the duplication disappears.
jimhill
Expert User
 
Posts: 337
Joined: Sun Dec 19th, 2004 9:59pm
Location: UK

Re: Notification emails to a different domain

Postby pspalmer » Sat Nov 29th, 2008 8:03am

Doesn't that suggest that you have no confidence in the security of your internal network?


I have plenty of confidence in my internal network. This was a client requirement. I would have greatly preferred to simplify things by not having to set up and host an email server for one client (albeit a very large one) for this purpose, but that was the decision - which, I might add, was met with IT screaming "PGP???" at the top of our lungs to no avail...

Sending a message to say that a message has been received is a recipe for confusion, imo. For example, what happens if a new secure message arrives while the end user is already reading his webmail? He'll most likely see the secure message before he sees your notification of it.


I anticipate the traffic to be light in the extreme with short-duration bursts of mail. I don't see how this will cause any confusion as long as the users are educated properly (processes like this that fail are usually due to lack of direction and documentation from IT, imo). No one - NOT ONE USER - will be picking up mail from this server via POP3 and they will not stay logged on to web mail 24/7 due to the fact that this will be used very rarely. The script was a way to let them know something came in. That's it.

I will check to see if that duplication exists in the file structure on Monday. Good thought. Another bit of strangeness - I went to change an attribute on one of the automations and it populated through all of them, so it seems that the duplication is perhaps an interface anomaly. Will validate more and post findings on Monday.
pspalmer
 
Posts: 3
Joined: Fri Nov 28th, 2008 3:08pm

Re: Notification emails to a different domain

Postby pspalmer » Mon Dec 01st, 2008 11:33am

As of this morning, the script duplication is gone and I can't recreate it. The good news is that the filters and the script are working brilliantly. Although I'm not happy doing this (I hate mysteries), I'm just going to make an admin note on the server documentation and not worry about it until it becomes a problem.

Hope this posting helps if anyone has a need to do something similar.
pspalmer
 
Posts: 3
Joined: Fri Nov 28th, 2008 3:08pm

Re: Notification emails to a different domain

Postby Susan Bunbury » Mon Dec 01st, 2008 6:16pm

Hello,

Thanks for sharing the solution you found.

It is appreciated.
Best wishes,
Susan

Sales and Initial Support
Enstar Mailtraq
User avatar
Susan Bunbury
Mailtraq Enstar Sales and Support
 
Posts: 359
Joined: Mon Aug 22nd, 2005 3:09pm
Location: CT, USA


Return to Mailtraq Scripting

Who is online

Users browsing this forum: No registered users and 1 guest