Showing posts with label Email. Show all posts
Showing posts with label Email. Show all posts

November 10, 2005

Moving from Mac Mail to Outlook Express

These days it's not too difficult to change email clients if need be. Most clients come with powerful import and export tools, allowing for a fairly smooth transition. This week, however, I ran into an exception when trying to move email messages from Mac Mail 2.0 to Outlook Express 6. The experience left me with the impression that these programs are bitter enemies and loathe the idea of interoperating with each other. Here's some instructions on how to make it work (note: you will also need Eudora 6.2+ free edition installed on the PC):

Starting in Mac Mail do the following for each mailbox you wish to transfer (In, Sent, Deleted, etc.):
  1. Select all messages and choose File -> Save As from the main menu. Choose "Raw Message Source" as the format and a name for the group of messages and click the "Save" button. Even though there are no obvious "export" commands from Mac Mail, this will effectively create a file in standard mbox format. However, Outlook Express will not directly import this file type so we'll have to play with it a bit.
  2. Transfer the file you just created to the PC.
  3. Open the directory C:\Documents and Settings\[Account Name]\Application Data\Qualcomm\Eudora (you will need to go to the View tab under the Tools -> Folder Options menu and select "Show Hidden Files and Folders" to be able to view this folder).
  4. If appropriate, rename the file you created in step 1 to match one of the mailboxes in this folder (In, Out, Junk, Trash, etc). Assign this file a .mbx extension.
  5. Copy the file from the previous step into the folder you opened in step 3. (Important! Only do this if you don't mind overwriting the email in your Eudora application).
  6. Open Eudora and view the mailbox you just copied. This will firmly establish your .mbx file as a Eurdora mailbox. Don't worry if the text in your messages doesn't look quite right - this will soon be remedied.
  7. Open Outlook Express. Select File -> Import -> Messages from the main menu. Choose "Eudora Pro or Light" and go through the rest of the wizard. This should properly import all your messages from the selected mailbox into Outlook Express.
A twisted solution? Yes, but it's the only one that I could get to work! If you know of an easier one please post a comment detailing your experience.

September 30, 2005

Evil Robots of Questionable Canned Meats

Like anyone else, I hate spam. It takes up computer resources and wastes time. So I'm happily pleased with the performance of the junk filter integrated with Thunderbird. It seems to do the trick, keeping the unwanted mail in my inbox down to an acceptable level. Dandy.

Lately, however, spam has been biting web developers in a new way. The bots are on the loose. And these aren't your typical run of the mill crawl-the-web-and-collect-email-addresses spam bots. These nasty creatures appear programmed to target forms, intent on finding a way to hi-jack the underlying mail server.

On many forms, especially contact forms, the content from the users submission is used to create the headers of an outgoing email (to, subject, from, etc.). The spam bots now seem to be posting to these forms, attempting to inject additional headers and a message into the existing headers. If unprotected, one of the spammer's injected bcc headers would alert them of their success. Once they know a machine is open to this type of attack they can strike again, loading up the headers with spam recipients and a message of their choosing. Unless you are watching for this, your server can unwittingly deliver these emails, doing the dirty work for the spammer.

In many cases mail servers are already protected against this form of attack, disarming the danger to a mere annoyance. But what if you aren't sure if your mail server is protected? What if the injection attempts are failing, but receiving the fallout from these attempts is cluttering your inbox and driving you nuts?

In PHP, you can protect yourself by making sure your mail headers don't contain the new line character '\n'. Stripping this from your headers before sending your email prevents the spam bots from injecting any additional destructive elements.

<?php
$cleanheader = str_replace('\n', '', $_POST['incomingheader']);
?>


To keep from receiving their failed attempts you might want to revise the code above to try and detect the new line character and kill the script if you suspect foul play.