There are really 2 ways to get the mailbox database size from Exchange 2003
- The filesystem - looking at the size of the Exchange EDB and Log files
- Exchange itself using the Exchange Console or Powershell (yes you can use Powershell for Exchange 2003)
I have a PowerShell script for Exchange 2003 that will get you the mailbox sizes, but obviously this is a Windows solution, so I'm not sure of any way you could call it remotely from linux.
This is the Powershell script that will get you the size of the EDB adn STM files:
$server = “ATS-Exch301″ # Give Server Name Here
foreach ($DB in get-mailboxdatabase -server $server)
$DBEDBPath = “name=’” + $DB.EdbFilePath.ToString().Replace(”\”,”\\”) + “‘”
$DBSTMPath = $DBEDBPath.replace(”edb”,”stm”)
$DBEDBSize = (get-wmiobject CIM_Datafile -filter $DBEDBPath -ComputerName $Server).filesize
$DBSTMSize = (get-wmiobject CIM_Datafile -filter $DBSTMPath -ComputerName $Server).filesize
$DBEDBSize = $DBEDBSize / 1MB
$DBSTMSize = $DBSTMSize / 1MB
Write-host $DB.identity `t $DBEDBSize `t $DBSTMSize
If you can get that to run with PSExec, you should get what you need.