Free email forwarding / aliasing is a common feature at most mail hosts, but Microsoft appears to have left the process undocumented for their 365 Exchange offering. Here's how:
Head to https://admin.exchange.microsoft.com/#/contacts (click Recipients → Contacts if the link lands on the Exchange admin center Home page)
Click "Add a mail user"
Fill out required fields (Display name, Alias, User ID, Domain, and Password) and enter the desired destination address in the optional "External email address" field
Click Next → Create
H/T: 4IT
/misc | Dec 17, 2022
to your Parallels account via the GUI, try these commands instead:
Sign out:
% prlsrvctl web-portal signout
The user has signed out successfully.
Sign in:
% prlsrvctl web-portal signin "mail@example.com"
Please enter password:
The user has signed in successfully.
Activate license (registered license beforehand at my.parallels.com/home → "Register a License Key"):
% prlsrvctl install-license -k XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX
The license has been successfully installed.
/mac | Nov 24, 2022
Accurate speech recognition has largely been relegated to the cloud, with unfortunate if predictable results:
Apple contractors 'regularly hear confidential details' on Siri recordings
Workers hear drug deals, medical details and people having sex, says whistleblower
This journalist’s Otter.ai scare is a reminder that cloud transcription isn’t completely private
A report recently published by Politico about the automated transcription service Otter.ai serves as a great reminder of how difficult it can be to keep things truly private in the age of cloud-based services. It starts off with a nerve-wracking story — the journalist interviewed Mustafa Aksu, a Uyghur human rights activist who could be a target of surveillance from the Chinese government. But though they took pains to keep their communication confidential, they used Otter to record the call — and a day later, they received a message from Otter asking about the purpose of the conversation with Aksu.
Even Apple's "privacy respecting" macOS has removed offline-only speech recognition since macOS 10.15 Catalina.
Happily, there is an accurate and free (as in speech) option for offline speech to text processing - OpenAI's Whisper (GitHub | Hacker News). According to the blurb, it "approaches human level robustness and accuracy on English speech recognition"; daily testing has borne that claim out.
Installation is a breeze:
pip install git+https://github.com/openai/whisper.git
as is basic usage:
whisper audio.mp3
.
A number of models are available, including the default "small" (which "works well for transcribing English" and weighs 483MB) and "large" at around 3GB.
Sindre Sorhus' free Aiko offers a native macOS/iOS GUI for "the Whisper large v2 model on macOS and the medium or small model on iOS depending on available memory". Both MAS and non-MAS versions available.
/nix | Nov 02, 2022
with filesystem-level headers via Isolyzer. Supports "ISO 9660, High Sierra, Universal Disk Format (UDF), Apple Hierarchical File System (HFS), Apple HFS+, and hybrids of the above file systems, e.g. ISO 9660 + HFS; UDF Bridge (UDF + ISO 9660)". Open source Python / Windows binaries. Detailed documentation.
/misc | Oct 11, 2022
Because Live Text in Preview is so fickle:
TRex 1.6.0: "Copy any text on your screen, stop retyping." Open source Swift.
Shottr 1.6: "Screenshot tool for those who care about pixels." Freeware. Personal favorite.
TextSniper 1.8.0: "Extract text from images and other digital documents in seconds." From $8.
OwlOCR 5.0.7: "Grab any text on the screen, convert images or scans to searchable PDFs, open QR-coded URLs, integrate via CLI, access with Finder Extensions and more." $14.
LensOCR 3.0.2: "LensOCR enhances the screenshot feature from macOS, it allows you to capture, text, objects, QR and Barcodes." $20.
CleanShot X 4.4: "CleanShot X provides over 50 features making it the ultimate screen capturing tool." $29. Saddled with a draconian activation scheme that requires online activation and phoning home periodically to continue functioning (the latter can be mitigated by sending the developer the last 4 characters of your Mac's serial number and then running a custom default write
command you will receive).
/mac | Oct 11, 2022
Suhas Sharma's Horcrux: Closed source. GUI. 8MB DMG. Very convenient (handles Google authentication natively, includes backup browser and built-in scheduler, etc.) when it works (like some others, I have yet to see it complete without crashing or returning "verification errors" while running, though I nurse high hopes for this app becoming the Carbon Copy Cloner of email backups one day). Also supports direct server-to-server migration, similar to Gilles Lamiral's much-loved imapsync (which sadly "can't backup nor restore email messages to or from a local directory").
Rui Carmo's imapbackup: Open source Python. CLI. 22KB ZIP. While macOS 12.3 and higher no longer include Python, it can be installed by running /usr/bin/python3
, which will automatically prompt to install the command line developer tools if they are missing. Previously mentioned in 2019.
Joe Yates' imap-backup: Open source Ruby. CLI. 158KB ZIP. Easy installation* and setup:
gem install imap-backup
†imap-backup setup
imap-backup
imap-backup utils export-to-thunderbird EMAIL-ADDRESS
‡Previously mentioned earlier this year along with a link to this HN discussion on it and related IMAP backup tools.
* For now at least; Apple vows to remove Ruby and Perl too (what's next Apple, ed?!), though both remain as of macOS 12.6
† If you receive
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
avoid the impulse to use sudo, instead specifying GEM_HOME and updating your $PATH in ~/.zshrc (.bash_profile for Bash users):
export GEM_HOME=/Users/username/.gem
export PATH="$GEM_HOME/bin:$PATH"
then reloading .zshrc:
% source ~/.zshrc
‡ Otherwise, messages imported into Mail will show "No Sender" in the From field. This command will put the exported messages into ~/"Library/Thunderbird/Profiles/UID.default-release/Mail/Local Folders/imap-backup.sbd/".
Mail Archiver X: 220MB DMG
Mail Backup X: 111MB DMG
MailSteward: 18MB DMG (Pro version requires MySQL)
/mac | Oct 08, 2022
This method appears to be the winner:
del /f/s/q folder-name > nul && rmdir /s/q folder-name
Tested on a ~10TB directory (containing many hundreds of thousands of files) residing on a SATA-connected 32TB Windows Storage Spaces SSD array. Time to delete: ~10 seconds. On a USB 3.1-connected 32TB RAID 0 HDD array, the process took just over a minute.
Despite a claim to the contrary, I found this robocopy method to be slower:
mkdir "empty" && robocopy "empty" "deletetest" /mir /w:1 /r:10 /mt:32 > nul
(See also Robocopy: Is /MT with more threads faster?)
Speaking of timing commands in Windows, check out this neat batch script by user87453 for approximating *nix's time
command:
@echo off
@setlocal
set start=%time%
:: Runs your command
cmd /c %*
set end=%time%
set options="tokens=1-4 delims=:.,"
for /f %options% %%a in ("%start%") do set start_h=%%a&set /a start_m=100%%b %% 100&set /a start_s=100%%c %% 100&set /a start_ms=100%%d %% 100
for /f %options% %%a in ("%end%") do set end_h=%%a&set /a end_m=100%%b %% 100&set /a end_s=100%%c %% 100&set /a end_ms=100%%d %% 100
set /a hours=%end_h%-%start_h%
set /a mins=%end_m%-%start_m%
set /a secs=%end_s%-%start_s%
set /a ms=%end_ms%-%start_ms%
if %ms% lss 0 set /a secs = %secs% - 1 & set /a ms = 100%ms%
if %secs% lss 0 set /a mins = %mins% - 1 & set /a secs = 60%secs%
if %mins% lss 0 set /a hours = %hours% - 1 & set /a mins = 60%mins%
if %hours% lss 0 set /a hours = 24%hours%
if 1%ms% lss 100 set ms=0%ms%
:: Mission accomplished
set /a totalsecs = %hours%*3600 + %mins%*60 + %secs%
echo command took %hours%:%mins%:%secs%.%ms% (%totalsecs%.%ms%s total)
/windows | Oct 08, 2022
Neither Mail.app nor InternetAccounts.prefPane offer a way to change the From name for iCloud email accounts.
Edits to "Name" at https://appleid.apple.com/account/manage/section/information are reflected at the top of System Preferences but not in Mail.app.
One must instead:
in order to update the name in Mail.app.
/mac | Oct 08, 2022
Proceed at your own risk (and joy).
macOS 12.6 Monterey
Signed out of an iCloud account. Attempting to sign in to another iCloud account (or even the original iCloud account) failed silently and repeatedly, even after rebooting. Creating a new macOS user account and signing in to iCloud therein worked as expected, but the prospect of manually migrating over user data and settings (while not borking the now-functional iCloud sync) was not especially congenial.
The ability to sign in to iCloud under the original macOS user account was restored thanks to nikhilgohil11's suggestion from 2019:
The urtext for this answer appears to be from 2015 by Kurt Lang, who credits Apple support. richard2's 2016 post mentions signing out of iMessage and FaceTime as well as disassociating the Apple ID from your macOS user account (if they were previously linked) beforehand.
Tried defaults delete MobileMeAccounts
and rebooting as suggested in several places to no avail.
Combining defaults delete MobileMeAccounts
with deleting/moving the sqlite databases in ~/Library/Accounts/ like so:
sudo -v ; killall -9 accountsd com.apple.iCloudHelper ; defaults delete MobileMeAccounts ; mkdir ~/Library/Accounts/Backup ; mv ~/Library/Accounts/*.sqlite* ~/Library/Accounts/Backup/ ; killall -9 accountsd com.apple.iCloudHelper ; sudo reboot
went untested; this report did not inspire confidence.
Deleting ~/Library/Preferences/MobileMeAccounts.plist and the contents of ~/Library/Accounts/ sounded infelicitous, given that it "will cause every account you have setup in the Internet Accounts System Preferences pane to be deleted".
Fix Can’t Sign into Apple ID on Mac Ventura, Monterey M1 & Intel
What to Do If You Can’t Sign In to iCloud After Updating Your Mac
Copy entire user profile to new device with different username
macprefs: Backup and Restore your Mac System and App Preferences (e.g. defaults write)
/mac | Oct 08, 2022
by buying an iPhone in China, which offers an "Apps using WLAN & Cellular" setting in iOS 10.13 and up:
You may not know that iOS 10 has a Chinese "special" Internet access feature
iOS Wi-Fi is turned off for some application and cannot turn on?
7 Steps Apple Could Take to Protect Privacy (#2: Let users disable WiFi per app)
"Apps using WLAN & Cellular" in WiFi feature on American iPhones
Extremely disappointing that Apple does not permit this critical privacy and security feature on all iOS devices irrespective of region; its exclusive availability in China is especially surprising given that they usually get the short end of the stick:
Apple moves to store iCloud keys in China, raising human rights fears
After China Objects, Apple Removes App Used by Hong Kong Protestors
Apple accused of giving Chinese government control over local data
iOS 15: China exempt from Apple 'private relay' privacy feature
Apple Limits AirDrop in China After It Was Used to Spread Protest Messages
See also A humble iOS 14 wishlist.
UPDATE: Enabling App Privacy Report in iOS/iPadOS 15.2 and above allows monitoring (but not blocking) app network activity.
/mac | Sep 10, 2022
System Preferences → Trackpad → Scroll & Zoom → enable Rotate.
Open an image in Preview → Tools → Annotate → Text.
After entering desired text and with the text box still selected, use the rotate gesture to turn it as desired.
For more fine-grained control, use Pixelmator (Add text on a path) or Acorn (Path Text | video tutorial).
H/T: blueswirly and Zabobon
While macOS apparently does not natively support rotating text or shapes in Preview by mouse, the Logitech MX Master 3 (among other models) provides a workaround: set the Gesture button (the small button on the thumb rest) to Zoom/Rotate in Logi Options or the newer Logi Options+.
/mac | Sep 08, 2022
by Jean Delaire in the September 1908 issue of The National Review (no, not that one):
Man has ever desired above all things to know whence he comes and whither he goes, as he passes "from eternity to eternity across the narrow bridge of Time"…
What is India's answer to the question regarding man's origin and destiny, as given in her ancient sacred Scriptures? All the vast system of faith known as Hinduism might be expressed in two words: Divine realisation. Man is one with the Deity. Man must realise this oneness with the Deity: this is the cornerstone of Hinduism…
[W]hat we call sin is nothing but ignorance, the folly of the child preceding the wisdom of the grown man. Not limiting, as we do, man's life to three score years and ten, the Hindu believes that souls in incarnation are of different ages, and the sinner is merely a young soul, a child-Ego, that has not yet, through repeated incarnations, learnt all his lessons in the great school of life. Man is the maker of his own destiny. "As the sowing, thus the reaping," declared the Hindu Scriptures long before St. Paul had said: "Whatsoever a man sows that shall he also reap." And this great law of Cause and Effect that acts on the moral and mental, as well as on the material plane, holds man in its grip until knowledge sets him free—knowledge that the self within and the Self of the universe are one. "If a man fails to know (the Supreme Self) ere casting off the body, he will be re-embodied in creation's worlds. … If he knows (the Supreme Self) the mortal is free: To deathlessness he goes" (Katho-panishad), in other words, he enters Nirvana, he "becomes one with Bráhman." Thus knowledge, in its higher aspect of wisdom, is India's method of salvation: To "enter the Supreme Abode," to "attain the Nirvana of Bráhman," man must "see the Self in all things and all things in the Self;" by this knowledge only man is freed from "the Wheel of Births and Deaths.”
That this ideal was not a sterile one, a metaphysical flight that ignored the sins and sorrows of this world—illusive though this world-pageant was deemed—is shown in countless beautiful passages of the Hindu Sacred Books [Ed. note: Jean attributes these quotes to the Mahâbhârata]:
The wise man remembers only the good, never the evil, that has been done unto him: he doeth good without hope of reward. … In this world there is nothing dearer to a creature than its life: hence one should show compassion to the lives of others as one does to one's own life. … One should never do that to another which one regards as injurious to one's own self: this, in brief, is the rule of righteousness. … One should forgive under every injury. … Forgiveness is asceticism, forgiveness is holiness. … Abstention from injury, truthfulness of speech, benevolence, compassion—these are regarded as penances by the wise, and not the emaciation of the body. … Love all creatures, scorning none. Be truthful in speech, humble, with passions under complete control.
/misc | Aug 28, 2022
In Excel, it's very simple to calculate the number of days between two dates by simply subtracting one cell from the other, e.g., entering =(B2-B1)
in B3 below:
Arrival: | 1/1/22 |
Departure: | 2/1/22 |
Days: | 31 |
While Word supports basic formulas in tables (Table Tools → Layout → Data → Formula), date handling is unsupported; the formula above returns "0.0".
You can of course embed or link an Excel worksheet into a Word document, but there are issues with formatting, layout, and performance.
Field codes allow for calculating dates in Word, but aren't for the faint of heart. Paul Edstein/macropod's Microsoft Word Date Calculation Tutorial (mirror) is the definitive guide; here's a taste from the section entitled "Calculate the # Days Difference Between Two Dates":
{=
{SET a{=INT((14-{EndDate \@ M})/12)}}
{SET b{={EndDate \@ yyyy}+4800-a}}
{SET c{={EndDate \@ M}+12*a-3}}
{SET d{EndDate \@ d}}
{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045}
-
{SET a{=INT((14-{StartDate \@ M})/12)}}
{SET b{={StartDate \@ yyyy}+4800-a}}
{SET c{={StartDate \@ M}+12*a-3}}
{SET d{StartDate \@ d}}
{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045}
\# ,0}
More on fields:
VBA's DateDiff function offers a more straightforward approach: simply insert two Date Picker Content Controls and one Rich Text Content Control (Developer → Controls), then add the following VBA code:
Sub CalculateDaysBetweenDates()
Dim days As Integer, date1 As Date, date2 As Date
date1 = ActiveDocument.ContentControls(1).Range
date2 = ActiveDocument.ContentControls(2).Range
days = DateDiff("d", date1, date2)
ActiveDocument.ContentControls(3).Range = days
End Sub
Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
' Update days when focus leaves Content Control box
Call CalculateDaysBetweenDates
End Sub
If there are additional fields or formulae in the table, add ActiveDocument.Fields.Update
under Call CalculateDaysBetweenDates
to update them as well.
Rather than referring to the Content Controls numerically based on their location in the document, you can specify their UIDs instead:
Click the desired Content Control to reveal the 3 dot tab to the left, then click on the tab.
Run this VBA code to display the CC's UID:
Sub GetUniqueID()
MsgBox Selection.ContentControls(1).ID
End Sub
Replace the numeric CC reference in the CalculateDaysBetweenDates subroutine with the corresponding UID, e.g., ActiveDocument.ContentControls(1).Range
→ ActiveDocument.ContentControls("1247527479").Range
/windows | Aug 28, 2022
"Prima facie, it looks as though the parapsychologist is here studying a phenomenon in which a human subject, normally in some sense 'in' his body, appears in some paranormal fashion to get 'out.' There is no reason to dispute the correctness of this view at a certain level of observation. In my opinion, however, when we look more closely, we arrive at a very different picture of what is happening. At least one advantage of this revised picture is that it renders the phenomenon of OBE simpler and consequently more intelligible. The difference is this: the subject, instead of paranormally getting 'out' of the body, is already, in substance, 'out.' If so, it is not a matter of being in or out, or of two mutually exclusive and discrete states, but rather, of varying degrees of being 'out,' where at one end of the continuum we observe the dramatic phenomenon parapsychologists call the OBE; at the opposite end we observe something quite different, the subject wholly enmeshed and entangled in his bodily existence to such a degree that he experiences himself as identified with the events and vicissitudes of his bodily organism."
"...the subject always was out-of-the-body and ... the paranormal OBE represents one type of empirically dramatic and self-certifying instance of becoming fully conscious of the fact."
"The model I am proposing goes far beyond epiphenomenalism. It would be closer to hypophenomenalism. Ducasse (1961) introduced this term, though not the conception it is intended to express. 'Thus, the soul is not in the body, but the body is in, and dependent upon, the soul, which both precedes and survives it, and whose force gives form and organization to the matter of which the body is composed' (p. 81). So, instead of thinking of consciousness as in some sense located 'in' the body and sometimes managing in some paranormal fashion to get 'out,' it may be more in accord with the truth to think of the body as located 'in' the field of consciousness."
/misc | Aug 08, 2022
(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
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.
Thunderbird 102 introduced a new import/export wizard which sounded promising; alas, it did not avail:
Create and open a new Thunderbird profile then close the Account Setup tab
Thunderbird → Settings → General → Indexing → "Message Store Type for new accounts:" → change from "File per folder (mbox)" to "File per message (maildir)"
For good measure: Thunderbird → Settings → General → Config Editor... → set "mail.store_conversion_enabled" to "true".
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.
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:
Thunderbird → Settings → General → Config Editor... → set "mail.store_conversion_enabled" to "true".
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.
Found thanks to this archived copy: Conversion de mbox à maildir. Instructions have been abbreviated, amplified, and updated:
Create and open a new Thunderbird profile then close the Account Setup tab
Thunderbird → Settings → General → Indexing → "Message Store Type for new accounts:" → change from "File per folder (mbox)" to "File per message (maildir)"
Thunderbird → Account Settings → Account Actions → Add Mail Account... → set up an email account {this account will use Maildir}
Thunderbird → Settings → General → Indexing → "Message Store Type for new accounts:" → change from "File per message (maildir)" back to "File per folder (mbox)"
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}
Thunderbird → Settings → General → Indexing → "Message Store Type for new accounts:" → change from "File per folder (mbox)" back to "File per message (maildir)"
Exit Thunderbird
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"
Start Thunderbird with the new profile; mail folders from old mbox profile appear under dummy@example.com
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.
To disable default grouping of messages by thread, change mailnews.default_view_flags from 1 (threaded) to 0 (unthreaded)
/misc | Jul 10, 2022
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):
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").
Pro: Successfully exported all messages.
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.
While Mail displayed a count of 4611 messages for the mailbox, 4618 were shown in Claws Mail and Thunderbird after import.
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.
Pro: Works on even large numbers of messages (tested on a selection of over 10,000 - see below).
Con: Silently fails to export messages with subject lines 252 characters or longer.
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.
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.
Tom Floeren's 2017 "Export Selected Mail Messages" AppleScript still runs under Monterey, exporting highlighted messages to EML files.
Pro: Truncates subjects/filenames over 180 characters to avoid the con described in 2c.
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.)
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.
Open source script that "converts .emlx and .partial.emlx files written by Apple's Mail.app into fully self-contained, 'stand alone' .eml files."
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."
Pro: Successfully converted all 4618 messages in test mailbox to EML format.
Con: Not native.
Mail Exporter Pro, mentioned back in 2017, offers fast, robust exporting to a number of destination formats, including Entourage/Outlook, PST, Apple Mail Mailbox (Archive), Thunderbird/Postbox, MBOX, and EML.
Import EML files into Mail.app (tested in version 16 under macOS 14 Sonoma):
/mac | Jun 14, 2022
/mac | Jun 11, 2022
/misc | May 20, 2022
or any other backup of ~"/Library/Application Support/AddressBook/".
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.
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.)
Replace ~"/Library/Application Support/AddressBook/" folder with backup copy of same (tested successfully in High Sierra, Mojave, Catalina, Big Sur, and Monterey).
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).
Replace ~"/Library/Application Support/AddressBook/AddressBook-v22.abcddb" with backup copy of same. Tested successfully in Lion but failed in modern macOS versions (worked in Catalina and higher as long as ~"/Library/Application Support/AddressBook/" was otherwise empty).
Delete contents of ~"/Library/Application Support/AddressBook/".
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/".
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)).
Address Book File Locations (2009)
contact_reaper.py: "A small program that grabs the information of every contact on a user's mac" (pulls from .abcdp files in ~"/Library/Application Support/AddressBook/Sources/UUID/Metadata/") 💾
SQLite:
thermo2's iCloud workaround (linked from Time Machine - Frequently Asked Questions: 15c. Viewing or Restoring Contacts / Address Book: "If you're using iCloud, the procedure ... will not 'stick' since the cloud contains the 'master' copy, as soon as you connect to it, anything you restored from your backups will be replaced with the contents from the cloud. For a workaround, see this discussion post."):
/mac | May 19, 2022
/misc | Apr 26, 2022
VGA-COPY/386 6.25: "World-renowned utility for copying and formatting floppy disks."
ImageDisk 1.18 "is a program to read entire diskette images into files (type .IMD), and to recreate a copy of the diskette from that image. A detailed analysis is performed on the diskette, and information about the formatting is recorded in the image file. This allows ImageDisk to work with virtually any soft-sectored diskette format that is compatible with the PC's type 765 floppy diskette controller and drives."
DiskImg: "Read/write complete (physical/logical) disk to/from file."
SpinRite: "Everything SpinRite does for hard disk drives also works on floppy diskettes of any size and density."
cat:
cat /dev/fd0 > floppy.img
dd:
dd if=/dev/fd0 of=floppy.img conv=notrunc
From the manual:
-c sectors
Number of sectors to copy at a time.…The number of sectors per track (18 or 9) is a good value for floppies." [emphasis added]-d
Use direct disc access…to read from infile, bypassing the kernel cache.…Sector size must be correctly set for this to work.…"1.44MB floppy: ddrescue -b 512 -c 18 -d /dev/fd0 floppy.img floppy.map
DOS floppy imaging/recovering examples from Archive Team (source)
dumpfloppy "is a suite of tools for reading floppy disks in arbitrary formats supported by the PC floppy controller, and for working with the resulting image files. For image files, it uses the IMD format defined by Dave Dunfield's ImageDisk. You can capture an image with dumpfloppy and then write it back with ImageDisk, or use the dumpfloppy tools to examine or extract an ImageDisk file."
No compiling instructions included; found them in BitCurator's bootstrap.sh: aclocal --force && autoconf -f && automake --add-missing && ./configure && make
(apt install automake
if missing. Also encountered "make: Warning: File 'Makefile.am' has modification time 63026 s in the future" error; resolved thusly: find -type f -exec touch {} + && make clean && make
)
Old fork: "Dumpfloppy dumps floppy disk images to files. Unlike ddrescue, dd_rescue or safecopy, it allows storing multiple CRC-failed reads to get the best possible data from failing floppy disks. Original by Adam Sampson."
safecopy "is a data recovery tool which tries to extract as much data as possible from a problematic (i.e. damaged sectors) source - like floppy drives, hard disk partitions, CDs, tape devices, ..., where other tools like dd would fail due to I/O errors."
BadCopy Pro 4.10: "BadCopy Pro is the leading data recovery software for flash drive, USB drive, CD, DVD, memory card, floppy disk and other removable disks. BadCopy Pro can effectively recover and rescue corrupted or lost data from damaged, unreadable, formatted or defective disks. It works with Microsoft Windows 98/2000/XP/Vista/7/8/10."
Roadkil's Unstoppable Copier 5.2: "Recovers files from disks with physical damage. Allows you to copy files from disks with problems such as bad sectors, scratches or that just give errors when reading data. The program will attempt to recover every readable piece of a file and put the pieces together. Using this method most types of files can be made useable even if some parts of the file were not recoverable in the end."
WinImage 10.0: "WinImage is a fully-fledged disk-imaging suite for easy creation, reading and editing of many image formats and filesystems, including DMF, VHD, FAT, ISO, NTFS and Linux. The disk image is an exact copy of a physical disk (floppy, CD-ROM, hard disk, USB, VHD disk, etc.) or a partition that preserves the original structure. With WinImage in place, you can recreate the disk image on the hard drive or other media, view its content, extract image-based files, add new files and directories, change the format, and defragment the image. All this and more is delivered in one intuitive user interface that enables imaging right out of the box."
WinDiskImg: "Read/write complete (physical/logical) disk to/from file."
Roadkil's Disk Image: "Creates and writes disk images files to hard and floppy disks."
Greaseweazle: "Tools for accessing a floppy drive at the raw flux level"
KryoFlux "is a USB-based device designed specifically for the reliability and precision needed to acquire reliable low-level reads suitable for software preservation."
Archive Team's Rescuing Floppy Disks offers a comprehensive hardware guide.
Floppy Disk Useful Storage Space: "1.44MB Floppy - 80 tracks x 18 sectors x 2 sides x 512 bytes per sector = 1,474,560 bytes"
Maximum recovery of data from old floppy discs with padded bad sectors and multiple passes
Recovering "lost" treasure-filled floppy discs with an oscilloscope
Preserving a floppy disk with a logic analyzer and a serial cable
From Adafruit Floppy's FAQ:
Did you know there are USB Floppy Drives for $10 on Amazon?
Yes, we are aware. These are recycled laptop floppy drives with a controller chip that presents a mass storage interface to the sectors on disk. They are great for basic access to 1.44MB IBM PC MFM-formatted diskettes. They will not work for GCR formatted diskettes (we know because we tried) and may not work with non-FAT formatted diskettes (we don't have any but the controller chip is very specialized and may freak out). USB floppy drive controllers will not get you flux-level readings, and can't cope with damaged diskettes to read sector data that does not pass CRC to perform data recovery. They are also, of course, no good with 5.25" floppy diskettes.
Why do you need a flux level reading of disks???
Flux level readings are essential for data recovery, restoration, archiving of damaged or copy-protected floppies.
/misc | Apr 17, 2022
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
with the free and open source MIST - macOS Installer Super Tool:
% mist list ┌──────────────────┐ │ INPUT VALIDATION │ └──────────────────┘ ├─ Kind will be 'installer'... ├─ Include betas in search results will be 'false'... ├─ Output type will be 'ascii'... ┌────────┐ │ SEARCH │ └────────┘ ├─ Searching for macOS Installer versions... └─ Found 23 macOS Installer(s) available for download Identifier │ Name │ Version │ Build │ Size │ Date ───────────┼───────────────────┼─────────┼─────────┼──────────┼─────────── 071-08758 │ macOS Monterey │ 12.3 │ 21E230 │ 12.23 GB │ 2022-03-14 002-66265 │ macOS Monterey │ 12.2.1 │ 21D62 │ 12.16 GB │ 2022-02-17 002-57041 │ macOS Monterey │ 12.2 │ 21D49 │ 12.16 GB │ 2022-01-26 002-42435 │ macOS Monterey │ 12.1 │ 21C52 │ 12.16 GB │ 2022-01-14 002-23774 │ macOS Monterey │ 12.0.1 │ 21A559 │ 12.13 GB │ 2021-12-01 002-77154 │ macOS Big Sur │ 11.6.5 │ 20G527 │ 12.42 GB │ 2022-03-14 002-65695 │ macOS Big Sur │ 11.6.4 │ 20G417 │ 12.45 GB │ 2022-02-17 002-57023 │ macOS Big Sur │ 11.6.3 │ 20G415 │ 12.44 GB │ 2022-01-26 002-42341 │ macOS Big Sur │ 11.6.2 │ 20G314 │ 12.44 GB │ 2022-01-14 002-23589 │ macOS Big Sur │ 11.6.1 │ 20G224 │ 12.43 GB │ 2021-12-01 071-78704 │ macOS Big Sur │ 11.5.2 │ 20G95 │ 12.45 GB │ 2021-08-18 001-68446 │ macOS Catalina │ 10.15.7 │ 19H15 │ 08.75 GB │ 2020-11-11 001-57224 │ macOS Catalina │ 10.15.7 │ 19H4 │ 08.75 GB │ 2020-10-27 001-51042 │ macOS Catalina │ 10.15.7 │ 19H2 │ 08.75 GB │ 2020-09-24 001-36801 │ macOS Catalina │ 10.15.6 │ 19G2021 │ 08.75 GB │ 2020-08-12 001-36735 │ macOS Catalina │ 10.15.6 │ 19G2006 │ 08.75 GB │ 2020-08-06 001-15219 │ macOS Catalina │ 10.15.5 │ 19F2200 │ 08.74 GB │ 2020-06-15 001-04366 │ macOS Catalina │ 10.15.4 │ 19E2269 │ 08.75 GB │ 2020-05-04 061-86291 │ macOS Catalina │ 10.15.3 │ 19D2064 │ 08.69 GB │ 2020-03-23 061-26589 │ macOS Mojave │ 10.14.6 │ 18G103 │ 06.52 GB │ 2019-10-14 061-26578 │ macOS Mojave │ 10.14.5 │ 18F2059 │ 06.52 GB │ 2019-10-14 041-88800 │ macOS Mojave │ 10.14.4 │ 18E2034 │ 06.53 GB │ 2019-10-23 041-91758 │ macOS High Sierra │ 10.13.6 │ 17G66 │ 05.71 GB │ 2019-10-19
/mac | Mar 24, 2022
An 8TB USB HDD formatted as exFAT in Windows 10 (using the default settings) would not mount in macOS 12.
Disk Utility showed the exFAT partition greyed out. Right clicking it and selecting "Mount" returned:
Could not mount “8TB”. (com.apple.DiskManagement.disenter error 49223.)
Terminal fared no better:
% sudo mount -t exfat /dev/disk2s2 ~/mnt
mount_exfat: /dev/disk2s2 on /Users/user/mnt: Invalid argument
mount: /Users/user/mnt failed with 71
Seagate's Disk Utility Errors and Questions for macOS 10.11 and higher explains:
Error Message - com.apple.DiskManagement.disenter error 49223
This error message has been seen with drives formatted ExFAT. When using a drive between macOS and Windows, drives should always be formatted on macOS because not all Windows allocation unit sizes (block sizes) are supported by macOS. An unsupported allocation unit size will keep the drive from mounting. This error will be displayed when trying to mount the drive manually with Disk Utility. If you are using this drive between macOS and Windows then back up any important data on the drive and reformat the drive ExFAT on macOS.
Rather than reformatting, exFAT for FUSE (which supports clusters up to 32 MB) was used to successfully mount the partition in macOS (see Installing exFAT for FUSE on Apple silicon):
% sudo /usr/local/sbin/mount.exfat-fuse /dev/disk2s2 ~/mnt
Finding only incomplete or incorrect guidance online, I decided to test every allocation unit size displayed in the Windows format GUI:
2048 bytes
4096 bytes
8192 bytes
16 kilobytes
32 kilobytes
64 kilobytes
128 kilobytes
256 kilobytes
512 kilobytes
1024 kilobytes
2048 kilobytes
4096 kilobytes
8192 kilobytes
16384 kilobytes
32768 kilobytes
(as well as the two smaller options, 512 and 1024 bytes, offered in the CLI), prepping partitions via the command prompt, e.g., C:\>format Z: /fs:exfat /v:test /q /a:128k
.
macOS was able to natively mount exFAT partitions with cluster sizes from 512 bytes to 1024 KB, but not from 2048 KB through 32768 KB.
Retrieve cluster size:
Windows:
PS C:\> Get-Volume Z | Format-List AllocationUnitSize
...
AllocationUnitSize : 32768
macOS:
% diskutil disk2s2 | grep Allocation
...
Allocation Block Size: 32768 Bytes
What Is the Best Allocation Unit Size for exFAT & How to Reset It:
[I]f the size of the files you want to store on the drive is large, then a large cluster size is recommended, which will increase the data read-write speed. If you plan to store lots of small files, it is advisable to set a small cluster size, which can improve the disk space utilization.
Microsoft: Default cluster size for NTFS, FAT, and exFAT (Only covers Windows XP–7, and sizes do not match those assigned by Windows 10; for example, an 8TB exFAT partition was assigned 2048 KB clusters rather than the stated 128 KB.)
/mac | Mar 04, 2022
imap-backup: "Backup GMail (or other IMAP) accounts to disk." Saves to mbox. Actively maintained. Ruby. HN discussion.
NodemailerApp: "App includes local SMTP and POP3 servers, a sendmail replacement, catchall email domain service, AMP4Email renderer and it imports emails from EML files, EMLX files, large MBOX files from Gmail takeout, Maildir folders and Postfix queue files for inspection and preview. Ever wanted to view the actual HTML source of a nicely designed email instead of some garbled rfc822 text? Just open the HTML tab of an email to see it." [emphasis added] Electron.
Postsack: "A high level visual overview of swaths of email." Think GrandPerspective for email.
UPDATES:
/misc | Jan 10, 2022
The mainstream media continues to gaslight the public with stories like this one from AP News on January 4, 2022 titled Why are so many vaccinated people getting COVID-19 lately?:
"People might mistakenly think the COVID-19 vaccines will completely block infection, but the shots are mainly designed to prevent severe illness, says Louis Mansky, a virus researcher at the University of Minnesota."
Whatever could've given people such a mistaken impression?
President Joe Biden, July 21, 2021:
"[Y]ou're not going to get COVID if you have these vaccinations." 📺
CDC Director Dr. Rochelle Walensky, March 29, 2021 (UPDATE: Walensky Knew Vaccines Didn't Stop Infections in January 2021):
"[O]ur data from the CDC today suggests, um, you know, that vaccinated people do not carry the virus, don't get sick, and that it's not just in the clinical trials but it's also in real world data." 📺
Rachel Maddow, March 29, 2021:
"Now we know that the vaccines work well enough that the virus stops with every vaccinated person." 📺
Dr. Anthony Fauci, May 17, 2021:
"The risk is extremely low of getting infected, of getting sick, or of transmitting it to anybody else, full stop." 📺
"It's official: Vaccinated people don't transmit COVID-19" 📺
Pfizer CEO Albert Bourla, Jun 8, 2021:
"[W]idespread vaccination is a critical tool to help stop transmission." 📺
"The Pfizer-BioNTech COVID-19 vaccine has not been approved or licensed by the U.S. FDA but has been authorized for emergency use to prevent COVID-19 in individuals 16+." [emphasis added] 📺
UPDATE: Setting aside these unequivocal yet fallacious statements from leading public figures, if the COVID vaccine was indeed "mainly designed to prevent severe illness" rather than to prevent infection or transmission, then why was it mandated in the first place? How can the unvaccinated pose a risk to the vaccinated if the vaccine was "safe and effective"? In short, what was all this about?
[Covid Retrospective, Vol. 1] Media: The Unvaccinated Are Scum
Noam Chomsky says the unvaccinated should just remove themselves from society: 'How can we get food to them?' asks Chomsky. 'Well, that's actually their problem'
Howard Stern says hospitals shouldn’t admit unvaccinated patients. ‘Go home and die’
KISS’s Gene Simmons To Anti-Vaxxers, Unvaccinated ‘You Are An Enemy’
Keith Olbermann: "We have to stop coddling the morons who will not get the shot. We start by calling them what they are. They are all snowflakes, and cowards, and idiots, and losers, and most importantly, they are afraid." 📺
Sean Penn Talks COVID-19 Anti-Vaxxers, Plus: Working with Daughter Dylan on ‘Flag Day’: "At this point it seems criminal to me... If someone choose not to be vaccinated, that they should choose to stay home, not go to work, not have a job..."
French President Emmanuel Macron Says Someone Who Refuses COVID Vaccine Is 'Not a Citizen'
Macron says he stands by remarks pledging to 'piss off' France's unvaccinated
Trudeau calls the unvaccinated racist and misogynistic extremists: "This leads us, as a leader and as a country, to make a choice: Do we tolerate these people?"
COVID-19: Democratic Voters Support Harsh Measures Against Unvaccinated
Happily, the dawn of a new, saner day may be approaching:
Mark Zuckerberg on Lex Fridman Podcast #383: "Um, just take some of the stuff around COVID earlier on in the pandemic where there were real health implications, but there hadn't been time to fully vet a bunch of the scientific assumptions. And, you know, unfortunately I think a lot of the kind of establishment on that kind of waffled on a bunch of facts and asked for a bunch of things to be censored that in retrospect ended up being, you know, more debatable or true. And that stuff is really tough, right? Really undermines trust in... in that." 📺
/misc | Jan 04, 2022
export SSLKEYLOGFILE=~/Desktop/sklf && open /Applications/Firefox.app
sudo tcpdump -i en0 -s 0 tcp port https -w ~/Desktop/capture.pcap
pbpaste
/mac | Jan 03, 2022