locked
How to get CDOSYS to work with "Distribution list->Exchange general->Message restriction->Only from" RRS feed

  • Question

  • Hello,

    I have a web application that shall send mail through a database using CDOSYS.
    To that I have a distribution list on a Windows 2003 Enterprice server with Exchange 2003 standard installed (latest service packs). From a Windows 2000 (developer machine) I have SQL-Server 2000 installed (both with latest service packs) with which I am trying to send mail with CDOSYS from (using sp_OA). The problem is that when I configure my distribution list on the windows server 2003 machine and on its Exchange general tab set the Message restriction->Only from with an adm. group it will no longer send my mail using cdosys. However if I use outlook instead it works fine. Also it blocks users that are not part of the adm. group as it should.
    For CDOSYS I have tried to set the authoring type to cdoNTLM (2) and also cdoBasic (1) with username and password without success. However in the eventlog I can see that the user is trying to send the mail (I have included 4 event entries at the end of this message). The user I test with jlj is part of the adm. group and it can send mail with Outlook as I mentioned. I have also tried to set the MSSQLSERVER service of SQL-Server 2000 to log in as this user (like one setup SQL mail) but it is still not working. However if I remove the Message restriction it sends the mail like it should. I have also tried with "From authenticated users only" but this does not work either. This tells me those that it is probably an anonomys user that CDOSYS tries to use when it sends the send mail command. However in the eventlog (see below) I have not managed to determine what user it is using.

    I have also tried to put this CDOSYS functionality in a VB6 application. But I get the same result as I do when I try to send it through the SQL-server.

    The reason for using "Only from" is that I do not want other than the managers to be able to send mail using this mail group. Also I am using CDOSYS with port since I save the state of the success or failure of the mail send commad to a database so that one can see how it went. With the directory option I have got the impression that you can not be completely sure of how it went because you do not get a message back when you send the mail. Also I am not sure about the security issues here, because you do not set them and I do not think it will work with the message restrictions I want. Please correct me if I am wrong.



    *** 4 Event log entries on the Windows 2003 server for a mail send command ****************
    Event Type: Success Audit
    Event Source: Security
    Event Category: Account Logon
    Event ID: 680
    Date:  2009-04-05
    Time:  11:49:45
    User:  ENHANCEIT\jlj
    Computer: EITS0001
    Description:
    Logon attempt by: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
     Logon account: jlj
     Source Workstation: EITS0001
     Error Code: 0x0

    ***********************

    Event Type: Success Audit
    Event Source: Security
    Event Category: Logon/Logoff
    Event ID: 552
    Date:  2009-04-05
    Time:  11:49:45
    User:  NT AUTHORITY\SYSTEM
    Computer: EITS0001
    Description:
    Logon attempt using explicit credentials:
     Logged on user:
      User Name: EITS0001$
      Domain:  ENHANCEIT
      Logon ID:  (0x0,0x3E7)
      Logon GUID: {d30c4045-8862-c543-a5fe-aa24a00e9a93}
     User whose credentials were used:
      Target User Name: jlj
      Target Domain: ENHANCEIT
      Target Logon GUID: -

     Target Server Name: localhost
     Target Server Info: localhost
     Caller Process ID: 1676
     Source Network Address: -
     Source Port: -

    ***********************

    Event Type: Success Audit
    Event Source: Security
    Event Category: Logon/Logoff
    Event ID: 540
    Date:  2009-04-05
    Time:  11:49:45
    User:  ENHANCEIT\jlj
    Computer: EITS0001
    Description:
    Successful Network Logon:
      User Name: jlj
      Domain:  ENHANCEIT
      Logon ID:  (0x0,0xBCBF9)
      Logon Type: 3
      Logon Process: Advapi 
      Authentication Package: Negotiate
      Workstation Name: EITS0001
      Logon GUID: -
      Caller User Name: EITS0001$
      Caller Domain: ENHANCEIT
      Caller Logon ID: (0x0,0x3E7)
      Caller Process ID: 1676
      Transited Services: -
      Source Network Address: -
      Source Port: -

    ***********************

    Event Type: Success Audit
    Event Source: Security
    Event Category: Logon/Logoff
    Event ID: 538
    Date:  2009-04-05
    Time:  11:49:46
    User:  ENHANCEIT\jlj
    Computer: EITS0001
    Description:
    User Logoff:
      User Name: jlj
      Domain:  ENHANCEIT
      Logon ID:  (0x0,0xBCBF9)
      Logon Type: 3

    *********************************************


    Hope you have any ideas!

    Regards

    Sunday, April 5, 2009 2:52 PM

All replies