Troubleshooting the SMTP Event Sink

Hi Exchange!!

I could do with some help please.  And please bear with me here...I'm pretty 
new to Exchange...

I'm adding a disclaimer to all outgoing e-mail via the SMTP Sink Host for a 
customer.

I've ever so slightly modified the script provided by Microsoft to append a 
disclaimer to the outgoing SMTP mail messages in KB 317680 so that it gets 
the disclaimer from a file.

I've created a second Virtual SMTP Server, which listens on 26 and sends on 
25 and configured the first SMTP server to send to self on 26 and listen on 
25.

I've then registered the SMTP Sink Script, as detailed in the same KB, using 
the following commands:

cscript smtpreg.vbs /add 2 onarrival SMTPScriptingHost 
CDO.SS_SMTPOnArrivalSink "mail from=*@your-domain-here.com"
cscript smtpreg.vbs /setprop 2 onarrival SMTPScriptingHost Sink ScriptName 
"C:\EventSinkScript.vbs"

The difference with my command and that in the KB is that I've specified the 
second SMTP server as all of my customer's clients use MAPI clients.

This doesn't seem to be working.  I need to find out why.  The first thing I 
want to check (tell me if there's more obvious places, please) is the script. 
 The problem is the only way I can see to test it is to fire mail through it 
(this is what's happening).  Therefore I'm wondering if there's a log file I 
can look at or enable, or another way of testing it?

I'd also like any other advice on how to troubleshoot this.

Many thanks and have a nice weekend!


-- 
Paul Williams
Microsoft MVP - Windows Server - Directory Services
http://www.msresource.net | http://forums.msresource.net

0
ptw20011 (1)
7/23/2005 12:13:02 PM
exchange.admin 57650 articles. 2 followers. Follow

10 Replies
733 Views

Similar Articles

[PageSpeed] 12

On Sat, 23 Jul 2005 05:13:02 -0700, "Paul Williams [MVP]"
<ptw2001@hotmail.donotspam.com> hired a team of monkeys to write:

>Hi Exchange!!
>
>I could do with some help please.  And please bear with me here...I'm pretty 
>new to Exchange...
>
>I'm adding a disclaimer to all outgoing e-mail via the SMTP Sink Host for a 
>customer.
>
>I've ever so slightly modified the script provided by Microsoft to append a 
>disclaimer to the outgoing SMTP mail messages in KB 317680 so that it gets 
>the disclaimer from a file.
>
>I've created a second Virtual SMTP Server, which listens on 26 and sends on 
>25 and configured the first SMTP server to send to self on 26 and listen on 
>25.

I didn't think it was possible to make Exchange send on a port other
than 25. Is mail actually doing that?


-- 
Chris Scharff
Messaging Services Architect
MessageOne

Don't find fault, find a remedy. - Henry Ford
0
7/23/2005 5:22:33 PM
"Chris Scharff [MVP]" <puevf_fpuness@znvy-erfbheprf.pbz> wrote:

					[ snip ]

>I didn't think it was possible to make Exchange send on a port other
>than 25. Is mail actually doing that?

Check the "Delivery" tab on the SMTP VS. Click on the "Outbound
connections..." button and put a port into the "TCP port:" edit box.

You can't dictate the IP address it'll use on a multi-homed machine,
but you *can* manage the port number. :)

-- 
Rich Matheisen
MCSE+I, Exchange MVP
MS Exchange FAQ at http://www.swinc.com/resource/exch_faq.htm
Don't send mail to this address mailto:h.pott@getronics.com
0
richnews (7316)
7/23/2005 6:13:29 PM
On Sat, 23 Jul 2005 14:13:29 -0400, "Rich Matheisen [MVP]"
<richnews@rmcons.com.NOSPAM.COM> hired a team of monkeys to write:

>"Chris Scharff [MVP]" <puevf_fpuness@znvy-erfbheprf.pbz> wrote:
>
>					[ snip ]
>
>>I didn't think it was possible to make Exchange send on a port other
>>than 25. Is mail actually doing that?
>
>Check the "Delivery" tab on the SMTP VS. Click on the "Outbound
>connections..." button and put a port into the "TCP port:" edit box.
>
>You can't dictate the IP address it'll use on a multi-homed machine,
>but you *can* manage the port number. :)

Ah, I stand corrected. It's been a long day... 
-- 
Chris Scharff
Messaging Services Architect
MessageOne

Don't find fault, find a remedy. - Henry Ford
0
7/24/2005 1:34:26 AM
"Chris Scharff [MVP]" <puevf_fpuness@znvy-erfbheprf.pbz> wrote:

					[ snip ]

>>>I didn't think it was possible to make Exchange send on a port other
>>>than 25. Is mail actually doing that?
>>
>>Check the "Delivery" tab on the SMTP VS. Click on the "Outbound
>>connections..." button and put a port into the "TCP port:" edit box.
>>
>>You can't dictate the IP address it'll use on a multi-homed machine,
>>but you *can* manage the port number. :)
>
>Ah, I stand corrected. It's been a long day... 

Been there. :)

-- 
Rich Matheisen
MCSE+I, Exchange MVP
MS Exchange FAQ at http://www.swinc.com/resource/exch_faq.htm
Don't send mail to this address mailto:h.pott@getronics.com
0
richnews (7316)
7/24/2005 2:38:02 AM
Yes.  I point the smart host to the IP address of the server and outgoing 
port as 26; I then listen on 26 on the 2nd Virtual SMTP Server and send on 
25.  The SMTP connector bridgehead has been changed so that it is using SMTP 
VS 2.  Mail is flowing through this configuration fine.  In fact, this is 
the 2nd time we have used this configuration -but the person who setup the 
first is on a project in another country.

So, mail's working, but the SMTP sink isn't appending the disclaimer.  I'm 
thinking there's an error in the code.  Can I enable some kind of logging? 
How am I meant to troubleshoot this?  How can I test the code?  The code 
worked when I used a string instead of a CDO object.  I don't know how I can 
generate a CDO object...

-- 
Paul Williams
Microsoft MVP - Windows Server - Directory Services
http://www.msresource.net | http://forums.msresource.net


0
ptw2001 (36)
7/24/2005 2:33:44 PM
"Paul Williams [MVP]" <ptw2001@hotmail.com> wrote:

>Yes.  I point the smart host to the IP address of the server and outgoing 
>port as 26; I then listen on 26 on the 2nd Virtual SMTP Server and send on 
>25.  The SMTP connector bridgehead has been changed so that it is using SMTP 
>VS 2.  Mail is flowing through this configuration fine.  In fact, this is 
>the 2nd time we have used this configuration -but the person who setup the 
>first is on a project in another country.
>
>So, mail's working, but the SMTP sink isn't appending the disclaimer.  I'm 
>thinking there's an error in the code.  Can I enable some kind of logging? 
>How am I meant to troubleshoot this?  How can I test the code?  The code 
>worked when I used a string instead of a CDO object.  I don't know how I can 
>generate a CDO object...

How 'bout this KB article?

Cannot change MAPI message contents in a CDO SMTP event sink [273233]

-- 
Rich Matheisen
MCSE+I, Exchange MVP
MS Exchange FAQ at http://www.swinc.com/resource/exch_faq.htm
Don't send mail to this address mailto:h.pott@getronics.com
0
richnews (7316)
7/24/2005 5:59:42 PM
Thanks Rich!

However, that's basically saying to do what I've already done - force the 
mail into SMTP format before trapping the mail in the event sink.

The difference between this setup and the one that works is that the 
customer that works is using a smart host (probably an e500) and this 
customer is using an SMTP connector.

Do you foresee there being any differences here?

-- 
Paul Williams
Microsoft MVP - Windows Server - Directory Services
http://www.msresource.net | http://forums.msresource.net


0
ptw2001 (36)
7/25/2005 9:17:42 AM
OK.  I've fixed it!

I couldn't find any info. on how to troubleshoot the actual script, but I 
had a nice sausage baguette and a coffee and then took another look at the 
script.  I quickly found what is probably a problem and it was - the 
location of the text file and html file that contains the footer did not 
have an absolute path.  In this case, I needed to point to the absolute 
path.  Doing this immediately yielded the correct results.

So may string constant was changed from:

const TEXT_FILE_NAME="disclaimer.txt"

To:

const TEXT_FILE_NAME="c:\disclaimer\disclaimer.txt"

And the same for the HTML one.

Thanks for the help guys!

-- 
Paul Williams
Microsoft MVP - Windows Server - Directory Services
http://www.msresource.net | http://forums.msresource.net


0
ptw2001 (36)
7/25/2005 9:48:23 AM
"Paul Williams [MVP]" <ptw2001@hotmail.com> wrote:

					[ snip ]

>const TEXT_FILE_NAME="c:\disclaimer\disclaimer.txt"

Sory. Gotta do it:

<vent>
I really hate the use of "\" as a directory separator in scripts.
Moving between VBS and Perl will screw them (and you) up every time.
:(  Better to use "/" 'coz the file system doesn't care, just the
stoopid shell. Same thing for using "/" in switch notation on the
command line. Stick with "-" and "--" and be happy. :)
</vent>

>And the same for the HTML one.

Sometimes all it takes is a fresh look. Kinda like trying to figure
out the "FileDate" stuff. Who ever heard of "centi-nanosecond"
time-keeping, and why the year 1601?! Sheesh.

Glad it's all working. :)

-- 
Rich Matheisen
MCSE+I, Exchange MVP
MS Exchange FAQ at http://www.swinc.com/resource/exch_faq.htm
Don't send mail to this address mailto:h.pott@getronics.com
0
richnews (7316)
7/26/2005 12:59:36 AM
LOL.  I agree!!!

A nano what?  <g>  GMT is what I love and know!

Oh, and I think 1601 is the start of the Gregorian calendar ;-)

-- 
Paul Williams
Microsoft MVP - Windows Server - Directory Services
http://www.msresource.net | http://forums.msresource.net


0
ptw2001 (36)
7/26/2005 5:34:11 PM
Reply:

Similar Artilces:

SMTP - ISP Question
Hi everyone, please accept my apologies in advance if this slightly off-topic but I though this would be a good place to ask... I am looking for some recommendations for a UK ISP who will register a domain (web hosting not terribly important) and will provide me with an SMTP feed. I have the connection and the public IP addresses already so I do not need a bundled service. Many thanks to all in advance, Kapa ...

"select" external e-mails disappear after exchange SMTP detected them...
hi, help! i've been working on this problem for several days, just started exch admin :) we have 20+ users, whom i have here split, for explanation purposes: 1- pre-existing ( 30 days or older a/c's) and 2- new-users (under 30-days old a/c's): our situation is: 1- all pre-existing users get and send internal emails, no problems 2- all pre-existing users get and send external emails, no problems 3- all new-users get and send internal emails, no problems 4- all new-users send external emails, no problems 5- all new-users CANNOT get external emails, i've been trying to fix ...

Testing SMTP Server
Hi All, We are developing an application that runs through records in our database, checks each against a set of criteria, and sends an e-mail if necessary. Unfortunately, one of our testers ran this on live data, and it sent real e-mails to our customer via our real smtp server. Arrrggghhhhh! What I'm looking for is a means of setting up a testing smtp server to point our testing instances to, and somehow configuring it so that all emails always get diverted to a given address, and not sent to the address the e-mail was originally intended for. Is there a way to do this with IIS alon...

Troubleshoot
I am find an error in this statement, and the error shown is "Application defined error or object defined error" ActiveSheet.Range(Chr(r + 64 + 0) & c).Formula = "=index(" & Chr(11 + 64) & "2:" & Chr(11 + 64) & (max_date) & ",match(" & Chr(1 + 64) & r & ",L2:L" & max_row & "))" The above statement basically used to match the data from one column with any column, corresponding to the indexed column. used for matching dates and times Could any one please solve this First, you can use oth...

Troubleshoot
Can someone help me with the following statement: =AVERAGEIFS(BeezidTable[final],BeezidTable[time],">TIME(HOUR(NOW()),MINUTE(NOW()),SECOND(NOW()))") It returns DIV/0, but it should return a proper average. Thanks, Roy Try =AVERAGEIF(Range, ">" & NOW()-INT(NOW()) , Sum Range) "rwtrader" wrote: > Can someone help me with the following statement: > =AVERAGEIFS(BeezidTable[final],BeezidTable[time],">TIME(HOUR(NOW()),MINUTE(NOW()),SECOND(NOW()))") > It returns DIV/0, but it should return a proper average. > Thanks, Roy...

Outside SMTP Connections
When I log into the Adminstrator email account I have a mailbox full of undeliverable emails. I have stopped Relaying and have tested that it is 550 but this continues to happen. I get several NDR's in the outgoing queue and I have to delete them daily. They are all spam messages. I have monitored SMTP connections via the "netstat" command and I constantly see these spam connections. Sometimes there are messages in my Admin account where a server's spam filter detected the spam,thus has sent a reply back to my Admin account telling me that they have blocked spam from my ...

SMTP CONNECTOR #18
DEAR MY READER, I HAVE A VERY DEEP QUESTION, & I WANT TO ASK YOU GUYS REGARDING IT. in order to answer my question, please read first ( A- Introduction to what i Know .) . ITS ABOUT THE SMTP CONNECTOR. My Senario start with :- A- Introduction to what i Know . B- My senario & My Quetion on this senario. A- Introduction to what i Know . =================================== The SMTP connectors basically simply tell that SMTP engine how to route mail to out side or to internal mail server or where ever its need to go . Or, i can do the following with using SMTP Connector:- 1- F...

Two domains in same exchange & smtp servers
Exchange 2003, Windows 2003 server. Setup with a primary domain name example.edu.au . Setup another domain name demo.com in the same exchange server & smtp server. How to configure in-coming mail from internet to demo.com ? Hi, Try the following resouce for configuring multiple domains. http://www.microsoft.com/technet/prodtechnol/exchange/2003/library/extransrout.mspx "Em Yeu" <cmchong20@yahoo.com> wrote in message news:%23RPX4EtWEHA.3708@TK2MSFTNGP09.phx.gbl... > Exchange 2003, Windows 2003 server. Setup with a primary domain name > example.edu.au . >...

Onload event
Hi, I want to disable some fields in the Case entity and control it from the event "OnLoad" Can you help me with a web link? Thank you Esteban Hi Esteban, To disable a field named new_custom, use the following code: crmForm.all.new_custom.disabled=true; I recommend that you take a look at Michael Hohne's posts on Client Side Scripting: http://www.stunnware.com/crm2/topic.aspx?id=ClientSideScripting. Michael's posts should help you get a hang of Javascript very quickly. HTH, Niths "Esteban GN" wrote: > Hi, > I want to disable some fields in the C...

Need Troubleshooting Tips
On SBS2003 w/Exchange, I have a user that has intermitent delivery failures. In most cases, there is no notification that that the email was not delivered. Here is an example: user A will log into OWA to send an email to an internal user B. To user A it looks as if the email has been sent, and a copy shows up in their Sent Items folder. User B does not recieve the email. This happens with both internal and external users, but sporadically. When I went to test it, it was working ok. This is only happening with one user. He has Outlook 2003 configured with 2 mail accounts, Excha...

Primary SMTP addresses
Here is the problem. Example user: John Smith I created a user account with user name: jsmith to logon to the domain. However, his email address should be: john.smith@domain.com. However, it defaults to: jsmith@domain.com. I've added the SMTP address and set it as primary but always changes back to jsmith in the GENERAL tab of the user's user account properties in AD. Even if I change it to john.smith and hit apply, I'll go back to AD it will change it back to jsmith. Any suggestions? You setup the default recipeint policy to create the address that way on newly creat...

Detect keyboard events
If i create a new dialog base application and create a view(derived from cscrollview) on dialog. and i add wm_keydown message in this view class then OnKeyDown in view class doesn't detect arrow keys(vk_left, vk_right). While it detect keys a-z, shift, space etc. Can someone tell how to detect these arrow keys? While if i create a SDI application and use CScrollView as base class of view then WM_KEYDOWN detect arrow keys and other keys. That because the dialog box is processing the arrow keys before they get to you. You can catch those keys if you catch the WM_KEYDOWN message in the ...

smtp server address
Exchange 2000 all setup and working, but I need to know what my smtp server's address is so that I can send emails via our website. Simple questions, but I cannot seem to find it in system manager. would it be smtp.server.domain.com or just smtp.domain.com? Thanks! On 10 Nov 2006 07:32:14 -0800, "trading_jacks" <MARKFERGASON@gmail.com> wrote: >Exchange 2000 all setup and working, but I need to know what my smtp >server's address is so that I can send emails via our website. > >Simple questions, but I cannot seem to find it in system manager. >would i...

SMTP Address Not Being Created
Exchange 2003 SP1 on Windows 2003 A user was created and a mailbox created as well. The SMTP address is not showing up in the users account even after a wait of several hours. When clicking on Exchange Tasks, deleting the mailbox, then recreating it succesffuly, the SMTP address still does not appear. If I create the SMTP address manually, I get the following error in the Event Viewer: Event Type: Error Event Source: MSExchangeIS Event Category: General Event ID: 9562 Date: 7/12/2005 Time: 7:30:17 AM User: N/A Computer: MXCA2 Description: Failed to read attribute msExchUserAccountContr...

Troubleshooting SMTP delivery
I've setup a Perl sendmail script on a client's web server. The server is running Microsoft Exchange. The script runs fine, and using Sendmail's log feature, I get a confirmation that the message is queued for delivery: 250 2.6.0 Queued mail for delivery But the message never makes it to its intended recipient. Where in Exchange should we be looking for the problem? (I'm the web developer and not familair with Exchange-- I'm working with the client's IT person to try to resolve the issue) Thanks, Kevin ...

SMTP Connector #9
I want to delete a smtp connector from the Exchange System Manager but it doesn't allow to delete. i right-click the the connector to be deleted, it doesn't have the "delete" option. How can i delete the unwanted smtp connected? ...

.net runtime optimization service event viewer Error
Hi all, After installation of SQL SERVER 2008 R2 on windows server r2 standart editon , in event viewer i saw ".NET Runtime Optimization Service (clr_optimization_v2.0.50727_32) - Failed to compile: C:\Program Files (x86)\Microsoft SQL Server \100\Tools\Binn\VSShell\Common7\Tools\VDT\DataProjects.dll . Error code = 0x8007000b " and ".NET Runtime Optimization Service (clr_optimization_v2.0.50727_32) - Failed to compile: C:\Program Files (x86)\Microsoft SQL Server \100\Tools\Binn\VSShell\Common7\Tools\VDT\DataDesigners.dll . Error code = 0x8007000b " er...

Overflow of FE SMTP email queues, is this normal?
I have a front-end 2k3 sp2 exchange server that had to be rebooted this morning. Upon reboot, the server had 1863 message queues, with several messages in each queue. All of the messages had a blank Sender field. Our setup has 2 backend 2k3 sp2 exchange servers that send mail directly to the internet. All incoming mail hits the FE server and is delivered to the appropriate BE server. The FE server also handles OWA. I have connection, recipient, and sender filters enabled, and recently enabled Sender ID filtering, and IMF. Yet every time I stop and restart my Default SMTP Virtual Server...

Second SMTP Address Space
Hi All, I'm hoping someone can shed some light on a situation which I have at present. We have recently been bought out and have been tasked to, initially, make it appear as though both companies have a common email address structure. Although I know how to make email be forwarded to the old email addresses I'm struggling getting the sender address changed. Existing SMTP domain which we need to recieve and send from has set up contacts which forward to our old SMTP domain. This works. I've tried adding a recipient policy which creates another email address on the old SMTP domain ...

League Tables for sports events
I am trying to find a way to "data-sort" in real time. I have a league table set up for my football team which lists team name, games played, games won, games drawn, games lost, goals for, goals against, goal difference, and points awarded total. The table auto-populates with the scores I enter into a fixtures sheet. All I would like to do is to formulate a way to get the whole table to "data-sort" in real time, in the following order ... Sort by points total (descending), then goal difference (descending) Please could someone help me? Thanks Mike E Take a look at...

Workbook_BeforeSave Event
I want to do some other actions when I do a "SAVEAS". Can someone remind me how to capture that in the BeforeSave event? Thanks, Barb Reinhardt Hi Barb In the below workbook event SaveAsUI will return True Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) End Sub If this post helps click Yes --------------- Jacob Skaria "Barb Reinhardt" wrote: > I want to do some other actions when I do a "SAVEAS". Can someone remind me > how to capture that in the BeforeSave event? > > Thanks, > ...

Troubleshoot Performanceproblems
Hi, My E-mailsystem E2K and Outlook2002 have started to show a few performance problems. What is the best way to pinpoint this out. Sometimes a bar is coming up and tells me that data is retrieved from the exchangeserver. The servername that shows up is sometimes a mailboxserver, sometimes a GC. Any tips appreciated TIA /Mariah ...

troubleshoot views in calendar
When in Calendar view, I like to use the month, and also at the right I like to see 6 months of the small calendar, as well as the task list below that. However, when I close Outlook and then open Outlook again, the calendar view goes back to showing just the month view. It won't seem to keep the view as I set it. I've looked everywhere I can think, but can't seem to find a fix. Can someone help? ...

Virtual SMTP server relay
What are the proper steps to have my Exchange 2003 server send mail via my ISP's or web-provider's SMTP server? This is what I did so far, but I am not sure if I am right: Under System Manager / Administrative Groups / First Admin grp / Routing groups / First routing grp / Connectors / SMTP Properties, I chose "Forward all mail through this connector to the following smart hosts" and then entered my web-provider's SMTP server. I'm not sure this is working all the time though. Is this the right way to do it? Tim Nevermind, I did the testing on my own and it works...

Distribution List Troubleshooting
I have a distribution list that I created - the list works when I type in each individual's email address separately in the "to" field. It also works when I send to each person separately. BUT when I try to use the list, only some of the addresses receive the message - others come back undeliverable host. I have deleted and recreated this list three times already, and still the same result. HELP!!!!! ...