SMTP (Simple Mail Transport Protocol) is how email is sent. Troubleshooting SMTP is difficult because of security concerns about Spam. Most email servers limit who can send email in order to prevent spam or a so-called "Open Relay".
A quick overview of the default method to send email in WebAccess is:
a. The WebAccess SCADA Node software act as an SMTP client. This is similar to your email program (like Outlook Express or Eudora).
b. If the SCADA node will only send reports and
alarms, then in 3.2 SCADA
Node Properties, you need to fill in the following
fields:
3.2.8 Outgoing Email Server - SMTP
Here are my steps to troubleshooting email assuming the default method above:
WebAccess keeps a log also called BWMAIL.LOG. It is on the SCADA node at drive:\WebAccess\Node\Projectname_Nodename\bwmail.log
Typically it is:
C:\WebAccess\Node\Projectname_Nodename\bwmail.log
This is a text file that can be opened by notepad. It only lists errors.
If it is empty, then there was no error in sending the email to the Outbound SMTP Server. (I.e. the WebAccess SMTP Client had no problems connecting with the first Email Server, which is usually the Project Node). If there are not errors here, you need to go to the Outbound SMTP Server or Host. To determine address is used as the Outbound SMTP Server or Host, see Step 2 below
If you get the unable to relay message in bwmail
Time:10/13/2006 15:59:32
Subject:WebAccess sends emails to pagers, managers and others.
From:webaccess@yourcompany.com
To:carter@yourcompany.com {}
Cc:tim@yourcompany.com
Bcc:{}
Host:64.55.156.4
Port:25
Status:ERROR: bad response `550 5.7.1 Unable to relay for carter@yourcompany.com ', wanted: `25[01]'
1) Verify 3.2.9 Email From, 3.2.16.2 Email Account Name, and 3.2.16.3 Email Password are correct in SCADA Node Properties.
If you are not using SCADA Node properties mail Account Name and Passowrd to log in to the mail server you need to : 1) You need to see if the SCADA Node is authorized to relay on the Outbound SMTP Server or Host. To determine what is used as the Outbound SMTP Server or Host, see Step 2 below. Note that all the addresses are in the same domain in the above error (companyname.com).
The way WebAccess uses email for alarms and reports are almost identical.
If you are debugging Email reports or Email
Alarms, you probably need a system administrator of your the
in 3.2 SCADA Node
Properties,
3.2.8 Outgoing Email Server - SMTP to examine the SMTP SERVICE
configuration and logs.
Scripts and Keymacros differ from alarms and reports in that the default SMTP host is always 3.2.8 Outgoing Email Server - SMTP, unless specified in the MAIL HOST command is used.
If you are debugging Email reports or Email Alarms, go to the OUTBOUND SMTP SERVER listed in MAIL HOST of your script or keymacro, otherwise, go to the 3.2.8 Outgoing Email Server - SMTP.
If you are using the default recommendations, the OUTBOUND SMTP SERVER or Host is the Project Node.
Verify Logging is enabled and the path to the logs.
On the OUTBOUND SMTP Server (typically the project node),
1. Start-> Settings-> Control Panel-> Administrative Tools
2. Select Internet Service Manager
3. Select the name of the computer to expand the tree
4. Right Click on SMTP Virtual Server
5. Select Properties
7. Verify Enable Logging is checked.
8. Select Properties button,
9. Select General Properties Tab.
10. Verify the path
11. Select Extended Properties tab, and make sure most fields are checked for logging especially protocol status.
Select OK
If you are using the default recommendation, the OUTBOUND SMTP Server is the Project Node. Look at the SMTP Logs on whatever OUTBOUND SMTP Server you are trying to use.
The logs, by default are at C:\WINDOWS\system32\Logfiles\SMTPSVC1
However, you should have verified the logs are enabled and their location in step 6 and step 9 above.
If you see the IP address of the SCADA node connecting with all code 250 and DAT or BDAT with code 250, and you see an OUTBOUND connection, then it is successfully receiving email from the SCADA node and forwarding it to the Smart Host. The problem is not here, you need to examine similar logs on your smart host.
If you do not see an OUTBOUND connection to the destination, then this SMTP server is not forwarding the email. Maybe the Outbound Security on this SMTP server uses the wrong SMART HOST, User name or password.
If you see 550 or
500 or 554 when the SCADA node tries to connect, then the SMTP
server is rejecting the SCADA node due to security. Possible causes
are:
1) in 3.2 SCADA Node
Properties, you have the wrong 3.2.8 Outgoing Email
Server - SMTP, 3.2.9 Email
From, 3.2.16.2 Email
Account Name. or 3.2.16.3
Email Password
2) SCADA Node not listed in list of
IP
Addresses allowed to relay.
3) SCADA node Address is in a RBL or black list of your email
server.
1) Note the pattern EHLO, MAIL, RCPT, DATA, QUIT all with a 250 code.
2) If sending outside your domain, there should be an Outbound connection with a similar pattern EHLO, MAIL, RCPT, DATA ( or BDAT), QUIT all with a 250 or other 200 code
00:58:26 67.94.27.177 SCADANode SCADANode 67.94.27.177 EHLO - +SCADANode 250 0 196 9 0 - - -
00:58:26 67.94.27.177 SCADANode SCADANode 67.94.27.177 MAIL - +FROM:<webaccess@yourcompany.com> 250 0 47 34 0 - - -
00:58:26 67.94.27.177 SCADANode SCADANode 67.94.27.177 RCPT - +TO:<user1@sbc.net> 250 0 40 37 0 - - -
00:58:26 67.94.27.177 SCADANode SCADANode 67.94.27.177 DATA - <SCADANodehKkvAUeMo6kKqtD00000018@SCADANode.companyname.com> 250 0 130 758 110 - - -
00:58:26 67.94.27.177 SCADANode SCADANode 67.94.27.177 QUIT - SCADANode 0 125 130 758 110 - - -
00:58:26 - OutboundConnectionResponse SCADANode - - - 220+mail.companyname.com+Microsoft+ESMTP+MAIL+Service,+Version:+6.0.3790.1830+ready+at++Mon,+16+Oct+2006+17:57:56+-0700+ 0 0 117 0 0 - - -
00:58:26 mail.companyname.com OutboundConnectionCommand SCADANode - EHLO - SCADANode.companyname.com 0 0 4 0 16 - - -
00:58:26 mail.companyname.com OutboundConnectionResponse SCADANode - - - 250-mail.companyname.com+Hello+[67.94.27.177] 0 0 42 0 16 - - -
00:58:26 mail.companyname.com OutboundConnectionCommand SCADANode - AUTH - - 0 0 4 0 16 - - -
00:58:26 mail.companyname.com OutboundConnectionResponse SCADANode - - - 334+UGFzc3dvcmQ6 0 0 16 0 16 - - -
00:58:26 mail.companyname.com OutboundConnectionResponse SCADANode - - - 235+2.7.0+Authentication+successful. 0 0 36 0 235 - - -
00:58:26 mail.companyname.com OutboundConnectionCommand SCADANode - MAIL - FROM:<webaccess@yourcompany.com> 0 0 4 0 16 - - -
00:58:26 mail.companyname.com OutboundConnectionResponse SCADANode - - - 250+2.1.0+webaccess@yourcompany.com....Sender+OK 0 0 45 0 235 - - -
00:58:26 mail.companyname.com OutboundConnectionCommand SCADANode - RCPT - TO:<user1@sbc.net> 0 0 4 0 235 - - -
00:58:26 mail.companyname.com OutboundConnectionResponse SCADANode - - - 250+2.1.5+user1@sbc.net+ 0 0 31 0 235 - - -
00:58:26 mail.companyname.com OutboundConnectionCommand SCADANode - BDAT - 1070+LAST 0 0 4 0 235 - - -
00:58:26 mail.companyname.com OutboundConnectionResponse SCADANode - - - 250+2.1.0+webaccess@yourcompany.com....Sender+OK 0 0 45 0 16 - - -
00:58:26 mail.companyname.com OutboundConnectionCommand SCADANode - QUIT - - 0 0 4 0 485 - - -
00:58:26 mail.companyname.com OutboundConnectionResponse SCADANode - - - 221+2.0.0+mail.companyname.com+Service+closing+transmission+channel 0 0 64 0 485 - -