• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problems importing the unix mailbox into Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems importing the unix mailbox into Mail.app


  • Subject: Re: Problems importing the unix mailbox into Mail.app
  • From: Tommy Bollman <email@hidden>
  • Date: Mon, 24 May 2010 15:08:33 +0200

Den 24. mai 2010 kl. 13.02 skrev Axel Luttgens:
>
> Le 23 mai 2010 à 21:43:16, Tommy Bollman a écrit :
>
>> Could any body please tell me what I am doing wrong?
>> Script Debuggers dictionary statest that it should take a fileobject as a reference.
>> If i rename the file to somefile.mbox the format menu of Mail.app is greyed out before
>> it gives up alas no result.
>>
>>
>> set mf to path to desktop as text
>> -- set x to a reference to file (mf & "mailfile")
>> set x to a reference to file "Macintosh HD:private:var:mail:mymailfile"
>> try
>>   tell application "Mail"
>>       activate
>>       import Mail mailbox at x
>>   end tell
>> on error e
>>   display dialog e
>> end try
>
> Looks like Mail's "import Mail mailbox" command is restricted to mailboxes created by Mail, with either a post-Panther or a pre-Tiger format.
>
> Since your mymailfile is a unix mbox, it is easy to create a pre-Tiger Mail mailbox; for example, assuming there's no name conflict with current contents of directory /tmp:
>
> 	create directory /tmp/mymailfile.mbox
> 	move (or copy) mymailfile to /tmp/mymailfile.mbox/mbox
>
> It should now be possible to proceed with the import:
>
> 	tell application "Mail" to import Mail mailbox at POSIX file "/tmp/mymailfile.mbox"
>
> HTH,
> Axel _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>

I did as you suggested, but it didn't turn out that well, lots of thanks anyway "søta bror".
I have have  a plan B involving keeping my unix mailbox clean, so I can extraxt message after message into
mail with some do shell scripting, I have made a Notifiy of unix mail already so.
Then I'll basically just extract subject and contents into mail.
I'ts almost faster than sending them via my isp (which has one of those nonconformant SSL/TLs smtp servers (which never get spam :))).

The load factor might be like 14 logs a week or something, and that is something I can live comfortably with.

I'll post you the script when its done.

Best regards



Tommy Bollman
--------------------------------------------------------------------------------------------------
When angry, count four; when very angry, swear.
		-- Mark Twain

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Problems importing the unix mailbox into Mail.app (From: Tommy Bollman <email@hidden>)
 >Re: Problems importing the unix mailbox into Mail.app (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Coping with Date format variations
  • Next by Date: Applescript 201 - speed
  • Previous by thread: Re: Problems importing the unix mailbox into Mail.app
  • Next by thread: Re: Problems importing the unix mailbox into Mail.app
  • Index(es):
    • Date
    • Thread