Firewall Rules for CDO
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS and SMTP > Firewall Rules for CDO




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Firewall Rules for CDO  
William Tasso


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-21-05 11:02 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

--
William Tasso





[ Post a follow-up to this message ]



    Re: Firewall Rules for CDO  
Jeff Cochran


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-21-05 11:02 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"
<spamblocked@tbdata.com> wrote:

>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 serve
r
>  .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






[ Post a follow-up to this message ]



    Re: Firewall Rules for CDO  
j1c


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-21-05 11:02 PM

can she/he:
telnet their.mailserver.com 25

from their workstation? if not, that would likely be firewall related






[ Post a follow-up to this message ]



    Re: Firewall Rules for CDO  
Jeff Cochran


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-22-05 07:51 AM

On 21 Mar 2005 14:15:43 -0800, "j1c" <just1coder@yahoo.ca> wrote:

>can she/he:
>telnet their.mailserver.com 25
>
>from their workstation? if not, that would likely be firewall related

Or the ISP blocks port 25.

Jeff





[ Post a follow-up to this message ]



    Re: Firewall Rules for CDO  
Derek vd Merwe


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-31-05 08:00 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

_____________________________________
"William Tasso" <spamblocked@tbdata.com> wrote in message
news:op.snz2pi0g3jnr2w@jupiter.cavern.tbdata.com...
> 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
>
> --
> William Tasso







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:38 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register