locked
PowerShell script to prevent sent mails from a secondary inbox to end in 'sent' folder from main account? RRS feed

  • Question

  • Hello,

    I am IT administrator in a middle-size company. We use a number of secondary inboxes (in outlook 2010), which we are able to send "from" (not on behalf of) and have full access to. I have set these rights up with PowerShell scripts for each user, and this works superbly.

    The only problem we encounter is that every sent email always ends up in the main account's sent items, regardless of the "from" address. It would be much more convenient if the sent emails could be directed to their respective account automatically.

    Is there a way to achieve this through PowerShell scripts? or otherwise, for that matter...

    Thanks in advance for your input

    Saturday, November 17, 2012 9:52 PM

Answers

  • Hi,
    You didn't mention the version, SP and Rollup level you have, but if you are on Exchange 2010 SP2 RU4, you can configure sent messages to be stored in both the Senders and the Owners Mailbox using the new cmdlet
    Set-MailboxSentItemsConfiguration.

    Example:
    Set-MailboxSentItemsConfiguration UserA -SendAsItemsCopiedTo SenderAndFrom

    See: http://support.microsoft.com/kb/2181579


    A second option you have is to add registry key DelegateSentItemsStyle:

    Key: HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Preferences
    Name: DelegateSentItemsStyle
    Type: DWORD
    Value: 1
    (you must have Outlook 2010 SP1)


    A third option that you can use is to add this mailbox as a new Exchange Account in the Outlook profile, instead of adding it as an additional mailbox.

    Martina Miskovic

    Sunday, November 18, 2012 5:17 AM
  • Client side Rules! Have you considered creating an Outlook Rule to move the mail to secondary mailbox's sent items folder?

    This will not work. I tried several times but never got the desired result.

    As Martina Miskovic said, you can add the registry key DelegateSentItemsStyle

    HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Preferences (Outlook 2003)

    HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Preferences (Outlook 2007)

    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Preferences (Outlook 2010)

    Name: DelegateSentItemsStyle
    Type: DWORD
    Value: 1

    But be careful. When the user has several delegated mailboxes connected to his own mailbox some mails possibly will never leave the outbox folder and get stuck.

    If you have Outlook 2010 clients, you can give then full control to the delegated mailbox in the exchange management console. The delegated mailbox should pop up automatically, without any configuration needed on the clientside and not showing the sent item issue.  

    The last option is to work with several profiles as Martina Miskovic wrote.

    Monday, November 19, 2012 6:15 PM

All replies

  • I guess and not sure of any powershell script But there is a simple way of getting it done using Client side Rules! Have you considered creating an Outlook Rule to move the mail to secondary mailbox's sent items folder?


    M.P.K ~ ( Exchange | 2003/2007/2010/E15(2013)) ~~ Please remember to click “Vote As Helpful" if it really helps and "Mark as Answer” if it answers your question, “Unmark as Answer” if a marked post does not actually answer your question. ~~ This Information is provided is "AS IS" and confers NO Rights!!


    • Edited by PK M Sunday, November 18, 2012 6:17 AM
    Saturday, November 17, 2012 10:05 PM
  • Hi, thanks for your answer. I'll give the client rule a go. 

    Cheers

    Saturday, November 17, 2012 10:11 PM
  • Hi,
    You didn't mention the version, SP and Rollup level you have, but if you are on Exchange 2010 SP2 RU4, you can configure sent messages to be stored in both the Senders and the Owners Mailbox using the new cmdlet
    Set-MailboxSentItemsConfiguration.

    Example:
    Set-MailboxSentItemsConfiguration UserA -SendAsItemsCopiedTo SenderAndFrom

    See: http://support.microsoft.com/kb/2181579


    A second option you have is to add registry key DelegateSentItemsStyle:

    Key: HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Preferences
    Name: DelegateSentItemsStyle
    Type: DWORD
    Value: 1
    (you must have Outlook 2010 SP1)


    A third option that you can use is to add this mailbox as a new Exchange Account in the Outlook profile, instead of adding it as an additional mailbox.

    Martina Miskovic

    Sunday, November 18, 2012 5:17 AM
  • Client side Rules! Have you considered creating an Outlook Rule to move the mail to secondary mailbox's sent items folder?

    This will not work. I tried several times but never got the desired result.

    As Martina Miskovic said, you can add the registry key DelegateSentItemsStyle

    HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Preferences (Outlook 2003)

    HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Preferences (Outlook 2007)

    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Preferences (Outlook 2010)

    Name: DelegateSentItemsStyle
    Type: DWORD
    Value: 1

    But be careful. When the user has several delegated mailboxes connected to his own mailbox some mails possibly will never leave the outbox folder and get stuck.

    If you have Outlook 2010 clients, you can give then full control to the delegated mailbox in the exchange management console. The delegated mailbox should pop up automatically, without any configuration needed on the clientside and not showing the sent item issue.  

    The last option is to work with several profiles as Martina Miskovic wrote.

    Monday, November 19, 2012 6:15 PM
  • Another way to regulate that behavior is over "OWA". Under "Sent Items" you can even differentiate between "send as" and "send on behalf of". You even have the possibility to save the Mails in the both Mailboxes.

    Friday, February 1, 2013 12:03 PM