Groups | Blog | Home
all groups > iis smtp nntp > march 2005 >

iis smtp nntp : Firewall Rules for CDO


j1c
3/21/2005 2:15:43 PM
can she/he:
telnet their.mailserver.com 25

from their workstation? if not, that would likely be firewall related
William Tasso
3/21/2005 6:23:32 PM
Hello

I have a trivial CDO example script (below) which works perfectly. A
colleague using my script as a base always gets error: "The transport
failed to connect to the server." The only differences I can see are
these calls...


[**** start snippet

Const cdoSendUsingMethod =
"http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort = 2
Const cdoSMTPServer =
"http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort =
"http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout =
"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate =
"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic = 1
Const cdoSendUserName =
"http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword =
"http://schemas.microsoft.com/cdo/configuration/sendpassword"

Dim Fields ' As ADODB.Fields
Set Fields = objConfig.Fields

' Set configuration fields we care about
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort ' send method
.Item(cdoSMTPServerPort) = 25 ' smtp port #
.Item(cdoSMTPConnectionTimeout) = 10 ' Connection
Timeout
.Item(cdoSMTPAuthenticate) = cdoBasic ' basic
authentication
.Item(cdoSMTPServer) = "mail.example.com" ' a real
smtp server
.Item(cdoSendUserName) = "valid@example.com" ' a real user
name
.Item(cdoSendPassword) = "password" ' a real
password
.Update
End With

end snippet ****]



I'm clutching at straws now and starting to wonder if there's a rule
needed on the firewall to allow these outgoing calls. Any clues
appreciated.




[********** Trivial CDO Mail Script **********]

<!--METADATA TYPE="typelib"
NAME="CDO for Windows 2000 Library"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
-->
<%
' mail-cdo-sample.asp
option explicit

dim sMessage ' As string
sMessage = "Contact has been made." & vbCrLf & "This is a test message
from the cdo script." & vbCrLf

Dim objConfig ' As CDO.Configuration
Set objConfig = Server.CreateObject("CDO.Configuration")

Dim Fields ' As ADODB.Fields
Set Fields = objConfig.Fields

' Set configuration fields we care about
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort ' send method
.Item(cdoSMTPServerPort) = 25 ' smtp port #
.Item(cdoSMTPConnectionTimeout) = 10 ' Connection
Timeout
.Item(cdoSMTPAuthenticate) = cdoBasic ' basic
authentication

.Item(cdoSMTPServer) = "mail.example.com" ' a real smtp server
.Item(cdoSendUserName) = "valid@example.com" ' a real user name
.Item(cdoSendPassword) = "password" ' a real password

.Update
End With
Set Fields = Nothing

Dim objMessage ' As CDO.Message
Set objMessage = Server.CreateObject("CDO.Message")

Set objMessage.Configuration = objConfig
Set objConfig = Nothing

With objMessage
.To = "mailbox@example.com"
.From = "valid@example.com"
.ReplyTo = "valid@example.com"
.Subject = "test from cdo"
.TextBody = sMessage
.Send
End With

Set objMessage = Nothing

%>

Thanks for looking

--
jeff.nospam NO[at]SPAM zina.com
3/21/2005 7:27:29 PM
Port 25 on the firewall has to be open, but that's the only place the
firewall would come into play. Have you looked at the SMTP log files?

Jeff

On Mon, 21 Mar 2005 18:23:32 -0000, "William Tasso"
[quoted text, click to view]
jeff.nospam NO[at]SPAM zina.com
3/22/2005 5:33:48 AM
[quoted text, click to view]

Or the ISP blocks port 25.

Derek vd Merwe
3/31/2005 12:27:02 AM
Hi,

Depending on your SMTP server maybe look at your DNS rules on the Firewall.
Microsoft SMTP uses TCP 53 and not UDP 53 for it DNS lookups.
More information can be found reading the following article: PSS ID Number:
263237

--

Regards,
Derek vd Merwe

_____________________________________
[quoted text, click to view]

AddThis Social Bookmark Button