Mail fields and re-sending mail to internal recipients only

I am trying to refine the function of a mail quarantine database.

All incoming SMTP messages which are redirected to the database because of server mail rules are checked manually and if any of the messages are legitimate (false positive) then they are selected and released via an agent which resends the messages to their recipients.

However, if someone from outside our organisation sends an SMTP message that is addressed to many people (including some external addresses in addition to our staff members) then when the message is released, it will be re-sent to people outside the organisation and they will receive a second copy of the message with the subject ‘Mail released from quarantine etc…’. As you can imagine, this isn’t a desirable feature!

I have written an agent which will scan any address field I choose and remove all external addresses (those not in our local Notes or mail domain). (EDIT: I have checked and re-checked the function of this agent and it is working perfectly.)

Which fields do I need to modify and/or erase in order to ensure that all released messages are only re-sent to local recipients?

SendTo

BlindCopyTo

CopyTo

INetSendTo

INetBlindCopyTo

INetCopyTo

Recipients

Are there any other fields I need to consider? Do you think this will work? Is there a better way?

Paul.

(EDIT: I’ve added the fields EnterSendTo, EnterCopyTo and EnterBlindCopyTo to the list of those to be scanned.

See my other thread for the code which removes external e-mail addresses:

http://www-10.lotus.com/ldd/nd6forum.nsf/ShowMyTopicsAllFlatweb/d769ebde002e996785256fef000f26b2?OpenDocument )

Subject: Mail fields and re-sending mail to internal recipients only

the router task only “really” cares about the Recipients field, thats what is uses to see who else to send to, all the others are mostly fancy text placeholders so humans can see stuff, although some of them, i think, are also used for address conversions (internet ↔ notes).

the recipients field is usually gone (removed by the router) by the time it gets delivered anywhere which can make things harder if you route it to a mailfile, unless it’s still in a mailbox in which case it should still contain values for undelivered recipients.

Subject: RE: Mail fields and re-sending mail to internal recipients only

Hi Raymond,

Can you think of any reason why the messages would still be sent to the original non-local recipients after the addresses of these are completely removed from the docs?

After running my agent, I check the properties of the newly edited and resaved documents and none of the mail fields (including recipients) contain non-local addresses - the agent has completely removed them. Despite this, the docs are still sent externally when the re-send command is given. It doesn’t make any sense, unless the addresses of the original recipients are hiding somewhere (in another another field?).

Yes, this is all taking place in a mailfile rather than a mailbox.

Thanks,

Paul.

Subject: Re: Re-sent mail is going to unspecified recipients

It’s not working after all. :frowning:

I am removing all external mail addresses from these fields for all incoming SMTP e-mail messages which have been quarantined, but need to be released:

SendTo

CopyTo

BlindCopyTo

EnterSendTo

EnterCopyTo

EnterBlindCopyTo

INetSendTo

INetCopyTo

INetBlindCopyTo

Recipients

Despite this, mail is still being delivered to the original external recipients when I re-send it.

Does anyone know why? Are there other “invisible” address fields? Could mail.box be doing something to the values in the fields I am modifying?

It appears that the recipients are being recomputed somewhere along the line.

Paul.