The mind is not in the body; the body is in the mind... #

Excerpts from Michael Grosso's Some Varieties of Out-of-Body Experience, found in D. Scott Rogo's anthology, Mind Beyond the Body:

/misc | Aug 08, 2022

Microsoft 365: "We are unable to connect right now. Please check your network and try again later." #

(TL;DR: Resolved by enabling Windows Event Log.)

Attempting to open Microsoft Office apps like Word or Excel resulted in a "Sign in to set up Office" window; attempting to sign in produced a "We are unable to connect right now. Please check your network and try again later." error message.

CBBG1000 mentioned encountering the same error when "connecting from Outlook Client to O365 Exchange servers via a VPN connection over Juniper Pulse" and working around it by "restarting the NlaSvc service" (which I assumed referred to "Network Location Awareness"); however, attempting to start the service via the services.msc GUI returned:

Windows could not start the Network Location Awareness service on Local Computer.

Error 1068: The dependency service or group failed to start.

Right clicked "Network Location Awareness" → Properties → Dependencies to discover the following required services:

Checked all five services; Windows Event Log had been disabled. Enabled, started, and tried signing in to Microsoft 365 again - success.

/windows | Aug 03, 2022

Convert mbox-based Local Folders to Maildir in Thunderbird 102 #

The roadmap for Thunderbird 102 (2022) mentioned Maildir support and a decade-old Bugzilla issue about finishing the job:

Maildir is a message storage format that should improve data safety, allow for incremental (delta) backups of messages and allow for antivirus to interact better with messages. Maildir will be vastly improved for 102, but may not be pref'd on by default.

845952 - (maildirblockers) [meta] finish "maildir" message storage

There is still little in the way of official documentation, so I decided to test 3 native methods for converting mbox-based Local Folders to Maildir under macOS 12.4 Monterey and Mozilla Thunderbird 102.

Back up before attempting any of these; Mozilla's Maildir in Thunderbird page still warns:

We suggest you leave Maildir disabled unless you are an advanced user, willing to risk your data, and know how to back up your email before turning on Maildir and how to restore it if you run into problems.

1. Failed: New import wizard (from 2022 for Thunderbird 102)

Thunderbird 102 introduced a new import/export wizard which sounded promising; alas, it did not avail:

  1. Create and open a new Thunderbird profile then close the Account Setup tab

  2. Thunderbird → Settings → General → Indexing → "Message Store Type for new accounts:" → change from "File per folder (mbox)" to "File per message (maildir)"

  3. For good measure: Thunderbird → Settings → General → Config Editor... → set "mail.store_conversion_enabled" to "true".

  4. Tools → Import... → Import from another Thunderbird installation → Continue → select mbox-based Thunderbird profile → Continue → uncheck all but "Mail Messages" → Continue → click "Start Import" then "Finish"

Thunderbird automatically restarted and a new "Thunderbird Import" folder appeared under Local Folders, but it only contained empty subfolders.

2. Failed: mbox to Maildir conversion (from 2018 for Thunderbird 60)

From Thunderbird 60.0 Release Notes:

Thunderbird now allows the conversion of folders from mbox to maildir format and vice versa. This is an experimental feature that needs to be enabled by setting the preference mail.store_conversion_enabled. Note that this functionality does not not work if the option "Allow Windows Search/Spotlight to search messages" is selected.

Let's give it a try:

  1. Thunderbird → Settings → General → Config Editor... → set "mail.store_conversion_enabled" to "true".

  2. Right click Local Folders → Settings → change "Message Store Type:" from "File per folder (mbox)" to "File per message (maildir)" → Continue:


The messages in the account Local Folders will now be converted to the maildir format. Thunderbird will restart after the conversion is complete.


Converting the account Local Folders to maildir...


Conversion failed.

3. Succeeded: Phil Davis' method (from 2015 for Thunderbird 38.0.1)

Found thanks to this archived copy: Conversion de mbox à maildir. Instructions have been abbreviated, amplified, and updated:

  1. Create and open a new Thunderbird profile then close the Account Setup tab

  2. Thunderbird → Settings → General → Indexing → "Message Store Type for new accounts:" → change from "File per folder (mbox)" to "File per message (maildir)"

  3. Thunderbird → Account Settings → Account Actions → Add Mail Account... → set up an email account {this account will use Maildir}

  4. Thunderbird → Settings → General → Indexing → "Message Store Type for new accounts:" → change from "File per message (maildir)" back to "File per folder (mbox)"

  5. Thunderbird → Account Settings → Account Actions → Add Mail Account... → set up a dummy email account by entering a name and email address (e.g., dummy@example.com) → "Configure manually" → INCOMING SERVER: Protocol: POP3 → Hostname: dummy.example.com* → "Advanced Config" → OK {this account will use mbox}

  6. Thunderbird → Settings → General → Indexing → "Message Store Type for new accounts:" → change from "File per folder (mbox)" back to "File per message (maildir)"

  7. Exit Thunderbird

  8. Replace contents of ~/Library/Thunderbird/Profiles/new-profile/Mail/dummy.example.com/ with copy of contents from "~Library/Thunderbird/Profiles/old-mbox-profile/Mail/Local Folders"

  9. Start Thunderbird with the new profile; mail folders from old mbox profile appear under dummy@example.com

  10. Select all mail folders under dummy@example.com and drag to Local Folders, which will copy them into new Maildir-based directories. Compare message counts by enabling View > Layout > Folder Pane Columns.

* Leaving the hostname as ".example.com" creates a hidden folder in ~/Library/Thunderbird/Profiles/new-profile/Mail/, making step 8 slightly confounding.

Related

/misc | Jul 10, 2022

Exporting/archiving email from Mail.app #

Michael Tsai has hosted a long-running discussion on data loss in Mail.app starting in Catalina and continuing unabated through Big Sur and Monterey (I have settled on only moving messages from IMAP servers to local storage via Thunderbird).

Further, Mail's built-in export (and import) methods suffer from various limitations and bugs; the following tests were run under macOS 12.4 and Mail 16.0 (3696.100.31):

1. Mailbox → Export Mailbox...

  1. Creates a single MBOX file containing all messages (actually a slightly nonstandard folder with the mbox file named "mbox" and another file named "table_of_contents").

  2. Pro: Successfully exported all messages.

  3. Con: Attempting to import such MBOX files (containing any significant number of messages) back into Mail generally fails with the following error: Some messages could not be imported. The partially imported mailboxes are located in the mailbox named "Import" in the mailboxes list.

  4. While Mail displayed a count of 4611 messages for the mailbox, 4618 were shown in Claws Mail and Thunderbird after import.

2. Click and drag multiple messages from Mail to Finder

  1. Creates a single EML file per message (converting from Mail's native EMLX format, which stores attachments separately) as opposed to MBOX's monolithic single file format.

  2. Pro: Works on even large numbers of messages (tested on a selection of over 10,000 - see below).

  3. Con: Silently fails to export messages with subject lines 252 characters or longer.

  4. When performed on the aforementioned mailbox (which Mail showed as containing 4611 messages while the exported MBOX file was reported to hold 4618), only 4600 messages were exported. The missing messages all had subject lines over 251 characters in length. This was verified by getting a list of all subjects in the mailbox via AppleScript (which also returned 4618 instead of 4611):

    tell application "Mail" to get the subject of every message of mailbox "foo"
    set subjectList to result
    set AppleScript's text item delimiters to "\n"
    set subject1PerLine to subjectList as string
    get subject1PerLine

    then locating those containing 252 or more characters: grep '.\{252\}' subjects.txt. Sure enough, the difference was exactly 18.

  5. Mail reported 10,663 messages in another mailbox; however, clicking and dragging them to a folder in Finder resulted in 10,672 EML files, indicating once again that Mail has a hard time keeping track of messages.

3. AppleScript

  1. Tom Floeren's 2017 "Export Selected Mail Messages" AppleScript still runs under Monterey, exporting highlighted messages to EML files.

  2. Pro: Truncates subjects/filenames over 180 characters to avoid the con described in 2c.

  3. Con: 31 messages were missing from the export after the script terminated with Script Error: AppleEvent timed out. Happily, this was easily rectified by adding with timeout of 3600 seconds above repeat with i from 1 to count of msgSubjects and end timeout below end repeat; afterwards, all messages exported successfully. (UPDATE: See Michael Tsai's post for another potential issue affecting non-ASCII characters under some circumstances.)

  4. As in 1d and 2d above, 4618 messages were exported from the mailbox which Mail had reported as containing 4611 messages. As a final test, ran this simple AppleScript oneliner to get the number of messages in the mailbox: tell application "Mail" to get the count of messages of mailbox "foo"; the result was 4618.

  5. Updated script:

4. partial-emlx-converter

  1. Open source script that "converts .emlx and .partial.emlx files written by Apple's Mail.app into fully self-contained, 'stand alone' .eml files."

  2. The author, Philipp Katz, relates that "one of my IMAP mailboxes went out of service and I was not able to copy all the messages to a different account with Mail.app, even though all mails and attachments were there (see here for the story). That’s why I created this script."

  3. Pro: Successfully converted all 4618 messages in test mailbox to EML format.

  4. Con: Not native.

/mac | Jun 14, 2022

Virtualizing Linux, macOS, and Windows ARM64 versions on an M1 Mac #

posted to the docs section.

/mac | Jun 11, 2022

Workflow for scanning/digitizing books #

  1. Scan with smartphone or tablet to JPG via vFlat Scan (Android | iOS)
  2. Clean up scans and convert to B&W TIF via ScanTailor Advanced or ScanTailor Universal
  3. OCR and convert to PDF via Adobe Acrobat

/misc | May 20, 2022

Restore macOS Contacts from Time Machine backup #

or any other backup of ~"/Library/Application Support/AddressBook/".

Caution

No consideration is given here to iCloud Contacts sync (though thermo2's 20-step procedure is reproduced below without prejudice). Back up, back up, back up and understand what you are doing. Contacts.app needs to be closed before attempting all methods but the first.

Method 1

Open Contacts.app then "Enter Time Machine" from menu bar icon to restore (H/T). Note that the "Browse Other Backup Disks..." option accessed by Option-clicking the Time Machine menu bar icon really means "Browse Other Backup Disks for the current device". (UPDATE: Michael Tsai reports that this method does not work in Monterey; further, he shared that Time Machine restores in apps other than Finder have not worked for him since around Mojave.)

Method 2

Replace ~"/Library/Application Support/AddressBook/" folder with backup copy of same (tested successfully in High Sierra, Mojave, Catalina, Big Sur, and Monterey).

Method 3

Add .abbu extension to backup copy of ~"/Library/Application Support/AddressBook/" then double click to import (tested successfully in modern macOS versions; similar to above method, but might make importing recovered data simpler for end users).

Method 4

Replace ~"/Library/Application Support/AddressBook/AddressBook-v22.abcddb" with backup copy of same (tested successfully in Lion, but failed in modern macOS versions).

Method 5

  1. Delete contents of ~"/Library/Application Support/AddressBook/".

  2. Paste the Metadata folder containing .abcdp files (found at either ~"/Library/Application Support/AddressBook/Metadata/" or ~"/Library/Application Support/AddressBook/Sources/UUID/Metadata/") from backup copy into ~"/Library/Application Support/AddressBook/".

  3. Launch Contacts.app; it will recreate AddressBook-v22.abcddb from the .abcdp files in Metadata/ (tested successfully in High Sierra and Mojave, even for Metadata folders created under newer versions of macOS (which is fortunate, as the process failed in Catalina, Big Sur, and Monterey; after exporting a Contacts Archive from Mojave, it was successfully restored to Big Sur, though logging off and on was required for the contacts to appear)).

Related

/mac | May 19, 2022

Twitter feed shutting down #

For those who wish to continue receiving updates, please subscribe via RSS.

/misc | Apr 26, 2022

Imaging and recovering data from floppy disks #

DOS

Linux

Windows

Hardware

Related

/misc | Apr 17, 2022

macOS: Find file extensions associated with an app #

Shortcat would not import its license file (named "shortcat-license") through the "Add License" button (where the file appeared as greyed out), via drag and drop into the License window, or via drag and drop onto Shortcat.app.

Resolved by finding which file extension Shortcat was associated with in /Applications/Shortcat.app/Contents/Info.plist → CFBundleTypeExtensions*:

<key>CFBundleTypeExtensions</key>
<array>
    <string>shortcat-license</string>
</array>

Just needed to add any filename and a dot before "shortcat-license", which turned out to be an extension rather than a filename.

* From the CFBundleDocumentTypes documentation:

Key: CFBundleTypeExtensions
Xcode name: "Document Extensions"
Description: This key contains an array of strings. Each string contains a filename extension (minus the leading period) to map to this document type. To open documents with any extension, specify an extension with a single asterisk "*". (In OS X v10.4, this key is ignored if the LSItemContentTypes key is present.) Deprecated in OS X v10.5.

/mac | Mar 25, 2022


Subscribe or visit the archives.