1. Home
  2. Knowledge Base
  3. GMS
  4. How can I receive silent copies of messages destined for a user on my system?

How can I receive silent copies of messages destined for a user on my system?

Question

I would like to be able to silently monitor inbound e-mail from an external organisation sending to one of my local users.

Answer

If you have a licence for GMS Anti-Spam on your server then you will be able to enter an EOM script that will be run on every message passing through that server.

Go to the system level node of GMS Anti-Spam then > Scripts. Click on the "Add Script" button. Select "End of Message" from the Protocol Stage drop down menu, give the script a unique name an paste the following into the "MML Script" text area.

if (emailX-GMSScript == "")
{

if (wildcardmatch(mail,"*externaldomain.com*") && (rcpt == "mylocaluser@localdomain.com"))
{
action = 0;
msg = MsgCopy(email);
if (msg)
{
MsgAddHeader(msg, "X-GMSScript", "MML script executed");
msgrecipient = "postmaster@localdomain.com";
MsgClose(msg, MSG_SEND);
}
}

}

This script will allow the original message through to the intended recipient but will also send a silent copy to postmaster@localdomain.com if certain criteria is met.
This criteria is if the sending domain is "externaldomain.com" and the intended local recipient is the e-mail account of "mylocaluser".

Remember to change the e-mail addresses to suit your specific requirement.

See Also:

Keywords:silent copy mml script monitor

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support