Mr. Tweak - Windows Network & Admin Tweaks

Windows network, systems, and software Administration Tips & Tricks


0 comments Diagnosing Exchange Delivery Problems with SMTP Status Codes

Seen any “Delivery Status Notification” messages lately? With many companies (especially AOL, GMail, and Yahoo) upgrading mail servers or updating their spam filters frequently we’ve seen a big increase in how many outgoing emails are returned to us. Still, it could be your own SMTP, DNS, or anti-spam settings that are causing the problem. To be sure, check the retrun and ESMTP status codes that are in the top few lines of the returned message.

Here’s and example: PERM_FAILURE: SMTP Error (state 8 ): 554 5.1.0 Sender Denied

In this case it’s easy to see that the message was returned because of an SMTP error. The “Sender Denied” comment on the end means it’s probably because the sending mail server was blacklisted by a spam filter. In most cases it’s not that clear and you need to use the status codes to figure out what happened. The status code in this message is the “554 5.1.0″ part. The format is always *** x.x.x, with the x.x.x part being a return code and the *** being an ESMTP status code. A chart of their meanings is below:

x.x.x, Server Return Codes:
The first value indicates the status of the communication between the sender and recipient server. Possible values are:

  • 1 - Server accepted the command, but no action taken. Confirmation message is required.
  • 2 - Server successfully completed the task.
  • 3 - Server understood the request. More information is required to complete.
  • 4 - Server encountered a temporary failure on that request. The command may complete if it’s repeated.
  • 5 - Server encountered an error.

The second value is an extra level of detail, which indicates the type of error or communication:

  • 0 - Syntax error has occured.
  • 1 - Message is an informational reply.
  • 2 - Message refers to the connection status.
  • 3 - Unspecified, may be used for custom messages.
  • 4 - Unspecified, may be used for custom messages.
  • 5 - Status message refers to the entire mail system or server.

***, ESMTP Status Codes:
In the event of a failure ESMTP codes can indicate even more detail than server return codes. They can indicate status of either the recipient mail server or your local mail server in response to a problem with your mail client. Possible values are:

  • 211 - System status message.
  • 214 - Help message formatted for human reader follows.
  • 220 - SMTP service ready.
  • 221 - Service/connection closing.
  • 250 - Successful request. Action completed.
  • 251 - Recipient is not local to the server, but the server will accept and forward the message.
  • 252 - Recipient can’t be verified, but the server will accept the message and attempt delivery.
  • 354 - Start message input now, end with <crlf>.</crlf>. Indicates the server is ready to accept a message once you’ve given it From: and To: information
  • 421 - Service is not available and connection will be closed.
  • 450 - Requested command failed because the recipient’s mailbox is unavailable.
  • 451 - Command has been aborted due to a server error. Possibly notify your SysAdmin.
  • 452 - Command has been aborted because the server has insufficient system storage.
  • 500 - Server could not recognize the command was due to a syntax error. (usually due to mail client error)
  • 501 - Syntax error was found in command arguments. (usually due to mail client error)
  • 502 - Command was not implemented. (usually due to mail client error)
  • 503 - Server has encounterd a bad command or sequence of commands. (usually due to mail client error)
  • 504 - Command parameter is not implemented. (usually due to mail client error)
  • 550 - Command failed because the user’s mailbox was unavailable (or you did not have permissions to send to this mailbox)
  • 551 - Recipient is not local to the server. Server responds with a fowarding address that should be tried.
  • 552 - Action was aborted because storage allocation was exceeded.
  • 553 - Action was aborted because the mailbox name was invalid.
  • 554 - Transaction failed, without a clear reason.


3 comments Repairing Outlook 2003 PST Files and Size Limits

A question about repairing Outlook .PST files on another forum was followed up with several questions about the file-size limit of Outlook 2003’s new .PST (Unicode) format. More details than you’re likely to need are below:

An Outlook 2003 .PST is capable of going way beyond 2GB in size (details below). These bigger .PST files no longer lock you out at 2GB - they just slow the system down more as they get ever larger. Regardless of file size you should know about the scanpst.exe utility in order to correct any problems with corrupt .PST’s, details below.

If you do experience frequent corruption in a .PST file near 2GB in size it’s likely due to the hard disk (and other PC “things” that cause file access and string-processing latency) being too slow to store all those big message attachments at the same time you’re viewing, writing, and downloading other messages from/to the .PST. The quick solution to cut .PST file size - make a new .PST file, call it “archive2002-5″, load it as an Archive folder in Outlook 2003’s folder view, and drag all those worthless, old messages over from your primary .PST’s set of folders.

Fixing .PST corruption: Corrupt .PST files can be repaired using the ScanPST utility. It is usually installed when Outlook is first installed and can be found at one of these locations:

  • C:\Program Files\Common Files\System\Mapi\1033\scanpst.exe
  • C:\Program Files\Common Files\System\MSMAPI\1033\scanpst.exe

To use scanpst.exe, just close Outlook, make sure you have about 2GB of free hard disk space, and then run the scanpst.exe file. It is generally able to rebuild corrupted .PST files without much, if any, data loss. The biggest drawback is that any items it does recover from corrupted areas have to be manually dragged from the “Deleted Items” folder later. Here is Microsoft’s KB article on running scanpst.exe.

Fixing older .PST’s at the 2GB limit: Pre-2003 .PST’s the have hit the 2GB file size limit usually need a second tool, PST2GB, to be completely repaired. Microsoft’s PST2GB download and details on running it are here. BEWARE that this utility “fixes” a 2GB .PST by deleting messages until the file is about 1.98GB - and you do not have control over what messages are deleted.

Size Limit of Outlook 2003 .PST’s: Using a Unicode database, instead of ANSI, allows the 2003 .PST file to reach a size of about 32TB (yes, terabytes!). The problem is that this is a file-based database and not a database server that properly indexes, caches, and allocates memory carefully. The result is that larger files just require more and more system resources to deal with. I am not aware of any utility currently available for dealing with 32TB Unicode .PST’s hitting their maximum file size (or any system that could efficiently use a .PST file that large either).

Scanning SharePoint Team Service .PST’s with scanpst.exe: The error “Internal errors found…” message is because ScanPst always looks for a “Deleted Items” folder, which SharePoint .PST’s don’t have. You can safely ignore the message, Microsoft KB details here.

Article tagged: , , , , , , , , ,



0 comments New Outlook Security Patch, Junk E-Mail Filter Update, and Out of Office Feature Request

Two new updates for Microsoft Outlook and one of them is a pretty important security patch.

The security patch fixes another “remote code execution” hole that allows a special form of file attachment to run itself from inside Outlook. Rather than rehash the technical details I’ll comment that this is a bigger problem than normal because it applies to all versions of Outlook 2000, XP, and 2003 plus it also occurs on Exchange server 5, 5.5, and 2000 SP3. Microsoft calls it MS06-003 - the link contains download details for each version of the security patch.

Of less importance but higher visibility, the Outlook Junk E-Mail filter has been updated again. No major reduction in junk mail or change in Outlook’s behaviors from this update (from Dec. 13th, 2005 - so I am a bit late in installing), but they’re worth installing. Even though I can think of more important things for my staff to work on, it always seems to calm users down a bit to see that IT is getting the “latest junk mail filters” installed.

Microsoft Outlook PM’s: I know that out of office responses are handled server-side, so the Outlook Junk mail filter will never help to keep responses from being sent to junk mail too. We can’t turn off sending out of office resonses off-site either - out clients are the only ones who matter when we’re sending those. Is there any chance you could update the Outlook Junk E-Mail filter so that undeliverable out-of-office responses can be matched to the original incoming message - and sent to Junk E-Mail? (…and to whomever runs the MSDN Blogs - there’s no good heirarchy or directory. Your own search function returns poor (and dated) results. Of course, even Google’s Blogsearch returns results almost entirely on keyword content and not on who is a member of what team or by topic.)

Article tagged: , , , , , , , , , , , ,



14 comments Create Outlook Task Shortcuts & Simplify with Command-Line Switches

As functional as Outlook is, I do get tired of Alt-Tabbing through my open programs just so I can fire off an email about something in another program or project. …create a few duplicates of the Outlook shortcut in the Quick Launch bar and add the Outlook command-line switches shown below and it’s just one click to a new email message, contact, appointment, and even a pre-addressed email in Outlook. Even better, if you have a mouse with extra buttons that are currently (and annoyingly) programmed as an IE back-button or “close current program” - then add these commands instead to create new Outlook emails and pre-addressed emails.

For a new e-mail message: outlook /c ipm.note
For a pre-addressed e-mail message: outlook /c ipm.note /m “address1@email.com, address2@email.com”
For a new note: outlook /c ipm.stickynote
For a new contact: outlook /c ipm.contact
For a new appointment: outlook /c ipm.appointment
For a new post: outlook /c ipm.post

NOTE: The typical Microsoft Office installation creates shortcuts to the various Office programs. So, typing “excel” into the Run dialog will start Excel and so on for Outlook . If your PC does not respond this way, the typical path to the Outlook 2003 executable file is “C:\Program Files\Microsoft Office\Office11\Outlook.exe”.

Also worth noting is how to recreate the Outlook 2003 desktop icon. This needs to be done from the registry so the icon will allow you to edit Outlook accounts and email profiles by right-clicking and selecting Properties.

A full list of Outlook’s command-line switches is below, referenced from the official Office website. If you do run into commands that fail to work, take a look at this article on Outlook 2003 command-line security from the Microsoft KB.
—————–

/a
Creates an item with the specified file as an attachment.

Example:
“C:\Program Files\Microsoft Office\Office11\Outlook.exe” /a “C:\My Documents\labels.doc”

If no item type is specified, IPM.Note is assumed. Cannot be used with message classes that aren’t based on Outlook.

/altvba otmfilename
Opens the VBA program specified in otmfilename, rather than %appdata%\Microsoft\Outlook\VbaProject.OTM.

/autorun macroname
Opens Outlook and immediately runs the macro specified in macroname.

/c messageclass
Creates a new item of the specified message class (Outlook forms or any other valid MAPI form).

Examples:
/c ipm.activity creates a Journal entry
/c ipm.appointment creates an appointment
/c ipm.contact creates a contact
/c ipm.note creates an e-mail message
/c ipm.stickynote creates a note
/c ipm.task creates a task

/checkclient
Prompts for the default manager of e-mail, news, and contacts.

/cleanclientrules
Starts Outlook and deletes client-based rules.

/cleandmrecords
Deletes the logging records saved when a manager or a delegate declines a meeting.

/cleanfinders
Removes Search Folders from the Microsoft Exchange server store.

/cleanfreebusy
Clears and regenerates free/busy information. This switch can only be used when you are able to connect to your Microsoft Exchange server.

/cleanprofile
Removes invalid profile keys and recreates default registry keys where applicable.

/cleanpst
Launches Outlook with a clean Personal Folders file (.pst) (Personal Folders file (.pst): Data file that stores your messages and other items on your computer. You can assign a .pst file to be the default delivery location for e-mail messages. You can use a .pst to organize and back up items for safekeeping.).

/cleanreminders

Clears and regenerates reminders.

/cleanrules
Starts Outlook and deletes client- and server-based rules.

/cleanschedplus
Deletes all Schedule+ data (free/busy, permissions, and .cal file) from the server and enables the free/busy information from the Outlook Calendar to be used and viewed by all Schedule+ 1.0 users.

/cleanserverrules
Starts Outlook and deletes server-based rules.

/cleansniff
Deletes duplicate reminder messages.

/cleansubscriptions
Deletes the subscription messages and properties for subscription features.

/cleanviews
Restores default views. All custom views you created are lost.

/designer
Starts Outlook without figuring out if Outlook should be the default client in the first run.

/embedding
Opens the specified message file (.msg) as an OLE embedding. Also used without command-line parameters for standard OLE co-create.

/explorer
Opens the new window in “explorer” mode (link bar on).

/f msgfilename
Opens the specified message file (.msg) or Microsoft Office saved search (.oss).

/firstrun
Starts Outlook as if it were run for the first time.

/folder
Opens a new window in “folder” mode (Navigation Pane off).

/hol holfilename
Opens the specified .hol file.

/ical icsfilename
Opens the specified .ics file.

/importprf prffilename
Launches Outlook and opens/imports the defined MAPI profile (*.prf). If Outlook is already open, queues the profile to be imported on the next clean launch.

/l olkfilename
Opens the specified .olk file.

/launchtraininghelp assetid
Opens a Help window with the Help topic specified in assetid.

/m emailname
Provides a way for the user to add an e-mail name to the item. Only works in conjunction with the /c command-line parameter.

Example:
Outlook.exe /c ipm.note /m emailname

/nocustomize
Starts Outlook without loading outcmd.dat (customized toolbars) and *.fav file.

/noextensions
Starts Outlook with extensions turned off, but listed in the Add-In Manager.

/nopollmail
Starts Outlook without checking mail at startup.

/nopreview
Starts Outlook with the Reading Pane off.

/p msgfilename
Prints the specified message (.msg). Does not work with HTML.

/profile profilename
Loads the specified profile. If your profile name contains a space, enclose the profile name in quotation marks (”).

/profiles
Opens the Choose Profile dialog box regardless of the Options setting on the Tools menu.

/recycle
Starts Outlook using an existing Outlook window, if one exists. Used in combination with /explorer or /folder.

/resetfoldernames
Resets default folder names (such as Inbox or Sent Items) to default names in the current Office user interface language.

For example, if you first connect to your mailbox Outlook using a Russian user interface, the Russian default folder names cannot be renamed. To change the default folder names to another language such as Japanese or English, you can use this switch to reset the default folder names after changing the user interface language or installing a different language version of Outlook.

/resetfolders
Restores missing folders for the default delivery location.

/resetnavpane
Clears and regenerates the Navigation Pane for the current profile.

/rpcdiag
Opens Outlook and displays the remote procedure call (RPC) connection status dialog.

/s filename
Loads the specified shortcuts file (.fav).

/safe
Starts Outlook without extensions, Reading Pane, or toolbar customization.

/safe:1
Starts Outlook with the Reading Pane off.

/safe:2
Starts Outlook without checking mail at startup.

/safe:3
Starts Outlook with extensions turned off, but listed in the Add-In Manager.

/safe:4
Starts Outlook without loading Outcmd.dat (customized toolbars) and *.fav file.

/select foldername
Starts Outlook and opens the specified folder in a new window. For example, to open Outlook and display the default calendar use: “c:\Program Files\Microsoft Office\Office11\Outlook.exe” /select outlook:calendar

/sniff
Starts Outlook and forces a detection of new meeting requests in the Inbox, and then adds them to the calendar.

/t oftfilename
Opens the specified .oft file.

/v vcffilename
Opens the specified .vcf file.

/vcal vcsfilename
Opens the specified .vcs file.

/x xnkfilename
Opens the specified .xnk file.



0 comments Office 2003 SP2 and Outlook Anti-Phishing Filter

Microsoft released the Office 2003 SP2 today. The service pack contains both new and previous bug and security fixes. Just the sheer volume of previous fixes included in the package should make it a boon for slipstreaming into current MSI’s - but the new patches warrant some testing. Rumor on the web is that SP2 causes few, if any, issues. My first install on a clean XP SP2 system went well, but a well-used, XP SP1 system prompted to have Acrobat Reader 6.x upgraded to v7. Home users should probably apply immediately. Administrators, check and double-check, lest Office SP2 end up breaking Acrobat or even access to corporate document management/hide-and-go-seek software.

The one feature getting the most discussion is the newest Outlook junk-mail filter update. I strongly agree with Ed Bott’s review of the Outlook anti-phishing features. At least get the Outlook filter update - even if skipping Office’s SP2 for now.



0 comments Forcing Recovery of Deleted Items With Outlook PST Repair Tool

The Outlook Inbox Repair tool (aka: ScanPST.exe) is built to scan and correct corruption in Outlook personal folder/.PST files (see MS KB #287947 for basic PST repair instructions). A novel and unsupported use of the ScanPST utility is for recovery of deleted emails.

ScanPST normally recovers emails in the Deleted Items folder, but is designed to ignore email messages already emptied from that folder. Emails emptied from the Deleted Items folder may be ignored, but they are not removed permanently from a PST file until the file is compacted. By manually editing a PST file to create a corruption and then scanning the file any deleted emails that remain will be restored to the Deleted Items folder. Directions are at the Outlook Tips website.

Beware that this is an advanced fix - as if the need for a hex editor wouldn’t clue you in.



0 comments Outlook 2003 Junk Mail Filter Update and Much Better List of New Outlook Updates

After complaining last month that it’s near-impossible to find new Microsoft updates, since a Microsoft.com search returns bad results and the big engines don’t update often enough, I’ve found a better list of Outlook updates. The official Office site lists all Outlook 2003 updates on one page. Of course, it’s going to be difficult to find the page in already busy Favorites or desktop search result lists…

There is a new Outlook Junk mail filter (MS KB #902953, released 8/22/2005) listed at that page, as well all past updates. So, if you’re stuck with a mediocre anti-spam solution and use Outlook, keeping the Junk E-mail filter updated helps scrub out a good proportion of worst-offender junk mail.