Home
Microsoft 365
Linux
Windows
Powershell
Cloud Computing
    Citrix Xendesktop
    Citrix XenApp
Useful links
About
  • Home
  • Microsoft 365
  • Linux
  • Windows
  • Powershell
  • Cloud Computing
    • Citrix Xendesktop
    • Citrix XenApp
  • Useful links
  • About
ajni.IT -
Microsoft 365

Exchange Online and On Prem save Sent Mails through Send As or Send on Behalf in the Shared Mailbox

January 8, 2024 by AJNI No Comments

By default, if you send a mail on behalf of a Shared Mailbox, the sent item will be saved in the user’s primary mailbox and not the shared mailbox. If you want to change it to expected behaviour, i.e. save the items in the Shared Mailbox, execute following command. This works in Exchange Online and Exchange OnPrem.

set-mailbox -MessageCopyForSentAsEnabled $True

set-mailbox -MessageCopyForSendOnBehalfEnabled $True

References:

https://learn.microsoft.com/en-us/exchange/troubleshoot/user-and-shared-mailboxes/sent-mail-is-not-saved

Reading time: 1 min
Windows Server

Exchange On-Prem Remove internal Exchange Server Names and IPs from Message Headers

January 1, 2024 by AJNI No Comments

By default on an on prem Exchange 2013/2016/2019 environment, internal server names are displayed in the message header analyzer, which you would not want to expose externally.

This is how it would look like:

To remove that information, execute this command in the Exchange Powershell. Make sure you have the right Send Connector Name.

Get-SendConnector “Internet” | Remove-ADPermission -User “NT Authority\ANONYMOUS LOGON” -ExtendedRights ms-Exch-Send-Headers-Routing

And now this is how it looks like:

References:

https://practical365.com/remove-internal-exchange-server-names-ip-addresses-message-headers/

Reading time: 1 min
Windows Server

Fresh Exchange 2013, 2016, 2019 OnPrem Zero Day – Steps to mitigate

September 30, 2022 by AJNI 4 Comments

Exchange Zero days are very common these days and there is a freshly baked one today (30th September 2022 as of writing). If you want to know what how the vulnerabilities work, take a look at the reference at the bottom. As a sysadmin I care about securing my systems.

Here are a few steps to mitigate this zero day vulnerability:

In IIS Manager on the Exchange Server, select the Autodiscover virtual directory and open URL Rewrite and add a new rule.

Select Request Blocking

Enter the string

.*autodiscover\.json.*\@.*Powershell.*

Using should be changed to Regular Expression.

Change URL to REQUEST_URI and save the changes.

References:

https://msrc-blog.microsoft.com/2022/09/29/customer-guidance-for-reported-zero-day-vulnerabilities-in-microsoft-exchange-server/

Reading time: 1 min
Windows Server

Truncate Exchange Database Log files without backing up

July 23, 2022 by AJNI No Comments

A good backup tool uses VSS Writers to achieve application consistent backups, which also truncates transaction log files. You can also achieve that without having to do a backup. Here are the few commands:

diskshadow

You can add multiple volumes, if database and log files are located on different disk drives:

add volume D:

add volume E:

begin backup

create

end backup

Reading time: 1 min
Powershell•Windows Server

Exchange On Prem Mails stuck in message queue due to “MESSAGE DEFERRED BY CATEGORIZER AGENT”

January 2, 2022 by AJNI No Comments

On the first day of a new year (for me it was the second day) Microsoft gave us a present to work on that affects Exchange servers. Affected systems could not send or receive mails, messages would get stuck in message queue with the error “Message deferred by categorizer agent”. Here are the two relevant event viewer entries:

The issue here is that the malware filter could not scan the message because of this error (it has to do with date time not fitting into 32 bit integers anymore) and the message would not get sent to the recipient. To temporarily resolve the issue, you can disable antimalware.

Open PowerShell as admin.

& “$env:ExchangeInstallPath\Scripts\Disable-AntimalwareScanning.ps1”

Restart MS Exchange Transport Service

Restart-Service MSExchangeTransport

References:

https://www.itwriting.com/blog/11910-exchange-emails-stuck-in-queue-because-message-deferred-by-categorizer-agent-happy-new-year-admins.html

Reading time: 1 min
Page 1 of 212»

Like what you are reading? Buy me a coffee.

Tip Of the Day

  • Add Alias to Windows Fileserver (Server 2019, 2022, 2025)

    1 month ago

Keep in touch

Oh hi there!
It’s nice to meet you.

Sign up to receive awesome content in your inbox, every month.

Check your inbox or spam folder to confirm your subscription.

Categories

  • AI & Deep Learning (1)
  • Azure (20)
  • Citrix XenApp (21)
  • Citrix Xendesktop (13)
  • Cloud Computing (40)
  • Coding (1)
  • Hyper-V (10)
  • Linux (8)
  • Microsoft 365 (26)
  • Powershell (21)
  • Security (7)
  • VDI (16)
  • Virtualization (21)
  • VMware (12)
  • Windows (21)
  • Windows Client OS (39)
  • Windows Server (92)

Archives

  • May 2025
  • April 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • April 2023
  • March 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • December 2020
  • November 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019

ajni IT © 2019