Wednesday, 24 October 2012

Date strangeness in Apple Mail on Mac OS X Lion

When importing messages from gmail to a folder on a local mail server  I noticed that Apple's Mail program was showing a whole bunch of older messages with the date 23/10/2007.  I looked at the text file for the earliest message and saw that the "Date" field was correct (16/05/2004) but that the latest "Received:" header was 23/10/2007.  (I was not surprised by this discrepancy because the mail had been moved in 2007 to gmail.)

In the standard view in Mail you can sort on "Date" but there is no way I have found of specifying what "Date" means.

Fix:

  1. Go to Mail->Preferences->Viewing and tick the box "Use classic layout".
  2. The layout will change to classic where you can select the columns that are displayed.
  3. If "Date Sent" is not there, right click on one of the column headers and select "Date Sent".
  4. Click on the "Date Sent" header to order on that column.
  5. If you now go back to the new standard view by unticking "Use classic layout" the field is called "Date" again but is the date sent and the correct dates appear.

Let's hope that Apple don't get rid of classic layout!

Friday, 19 October 2012

greylist.pl in Mac OS X Lion Server

The code here has a problem but it so happens it has no effect on its operation.

It uses two databases, greylist.db and whitelist.db.

The intention seems to be that key/value pairs representing SMTP clients are initially stored in greylist.db then promoted to whitelist.db (that's the gist, anyway).  Due to a coding error in the open_whitelist_db subroutine %db_hash gets tied to whitelist.db when it has already been tied to greylist.db by a previous call to open_database, in smtpd_access_policy.

Since different keys were to be stored in the two databases anyway this does not affect the operation of the process, so having two databases was unnecessary.

I haven't check the code shipped with Mountain Lion (I can't upgrade this server to Mountain Lion as Apple have deemed its hardware to be too old).

Compiling mplayer on Mac OS X Lion

To compile mplayer on Mac OS X Lion 10.7.5 I did the following:
  • Download lame from SourceForge.
    • cd
    • tar xvf Downloads/lame-3.99.5.tar
    • cd lame-3.99.5
    • ./configure
    • make
    • sudo make install

  • Downloaded yasm.
    • cd
    • tar xvf Downloads/yasm-1.2.0.tar
    • cd yasm-1.2.0
    • ./configure
    • make
    • sudo make install
  • Downloaded the mplayer  "source snapshot".
    • cd
    • tar xjvf Downloads/mplayer-export-snapshot.tar.bz2
    • cd mplayer-export-2012-10-17
    • ./configure --cc=clang
    • make
    • sudo make install
  • To compile ffmpeg:
    • cd
    • cd mplayer-export-2012-10-17/ffmpeg
    • ./configure --enable-libmp3lame
    • make
    • sudo make install

    This was originally to obtain mencoder but I had more success with ffmpeg for encoding mp3 format files.