Categories
General Joomla Articles

Enabling Compression on a Apache (Hostmonster) Joomla Website

Enabling Compression on a Apache (Hostmonster) Joomla Website

Edit php.ini so that the following lines read as follws (you only need ot change the first one on a Hostmonster site):

{code lang:ini showtitle:false lines:false hidden:false}output_handler = ob_gzhandler
zlib.output_compression = Off
;zlib.output_compression_level = -1{/code}

Add the following to the htaccess:

{code lang:ini showtitle:false lines:false hidden:false}
<IfModule mod.gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(js|css|html|php)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>

AddEncoding gzip .gz

<Files *.css.gz>
ForceType text/css
Header set Content-Encoding: gzip
</Files>

<Files *.js.gz>
ForceType text/javascript
Header set Content-Encoding: gzip
</Files>{/code}

Confirm compression is working using the following website: http://www.gidnetwork.com/tools/gzip-test.php

Categories
Exchange Server 2010

Exchange 2010 : Mailbox Size Report

Exchange 2010 : Mailbox Size Report

The following script will report on all mailbox sizes, from largest to smallest and generate  CSV file in the directory from which it is executed.

{code lang:php title:”Mailbox Size Report” lines:false hidden:false}$data = @()
foreach($mbx in Get-MailboxDatabase | Get-Mailbox)
{
$dispname = $mbx.displayName
$data += Get-MailboxStatistics $mbx.identity | select @{n=”Username”;e={$mbx.displayName}},@{e={$_.TotalItemSize.Value.ToMB()};n=”TotalItemsSize(MB)”}
}
$data | sort-object “TotalItemsSize(MB)” –Descending | export-csv MailboxSizes.csv{/code}

 

Categories
Exchange Server 2010

Exchange 2010 : Deleted Items Retention Size Report

Exchange 2010 : Deleted Items Retention Size Report

The following script will generate a CSV file that reports on per-user Deleted Items Retention (Dumpster 2.0) sizes.

{code lang:php title:”Mailbox Deleted Items Retention Report” lines:false hidden:false}$data = @()
foreach($mbx in get-mailboxdatabase | get-mailbox)
{
$data += Get-MailboxStatistics $mbx.identity | Select @{n=”DisplayName”;e={$_.DisplayName}},@{e={$_.TotalDeletedItemSize.Value.ToMB()};n=”TotalDeletedItemsSize(MB)”},DeletedItemCount
}
$data | export-csv retention.csv{/code}

Categories
Exchange Server 2010

Exchange 2010 : Deleted Items Folder Size Report

Exchange 2010 : Deleted Items Folder Size Report

The following script can be used to report on user mailbox “Deleted Items” folder sizes (and sub folders). It will create a CSV file in the directory from which the script is executed.

{code lang:php title:”Mailbox Deleted Items Folder Size Report” lines:false hidden:false}$data = @()
foreach($mbx in Get-MailboxDatabase | Get-Mailbox)
{
$dispname = $mbx.displayName
$data += Get-MailboxFolderStatistics $mbx.identity -FolderScope ‘DeletedItems’ | select @{n=”Username”;e={$mbx.displayName}},FolderPath,ItemsInFolder,@{n=”FolderSize(MB)”;e={$_.folderSize.toMB()}}
}
$data | sort-object “FolderSize(MB)” –Descending | export-csv DeletedItemsFolders.csv{/code}

 

Categories
Exchange Server 2010

Exchange 2010 : Create a Message Send Size Limit For A Subset Of Users Within an Exchange Organisation

Exchange 2010 : Create a Message Send Size Limit For A Subset Of Users Within an Exchange Organisation

We recently encountered a requirement to limit a subset of users to a maximum send size without imposing this organisation wide – this was achieved this using a transport rule, the steps are outlined below.

  1. Create a Distribution Group that contains all your Exchange Users that you wish to limit email size for. For this example this group has an email address of [email protected].
  2. Create a new Dsn Error message: New-SystemMessage -DsnCode 5.7.50 -Language En -Internal $True -Text ‘Your message has not been sent as it exceeds the maximum allowed message size of 20MB. Please contact the helpdesk for support on 123 or click here to raise a support ticket <a href=”http://helpdesk/riaseticket.html”>Open Support Ticket</a>.’
  3. Next create a new transport rule (change the [email protected] email address to reflect the group created in step 1) : New-TransportRule “Block Internal Email over 50MB” -FromMemberOf “[email protected]” -attachmentSizeOver 50MB -RejectMessageEnhancedStatusCode “5.7.50” -RejectMessageReasonText “Your message has not been sent as it exceeds the maximum allowed message size.” -SentToScope “InOrganisation”
  4. Verify the priority of any other transport rules configured in your Exchange Organisation.
You can now test this by attempting to send an email over 20MB, it will be rejected as long as you are a member of this distribution group.