Closed Quadrant6630 closed 5 months ago
Still not sure what the issue was, but I solved it by just bypassing the mailsync file and using mbsync directly. The following crontab config is working for me.
❯ crontab -l
* * * * * /opt/homebrew/bin/mbsync -a
* * * * * /opt/homebrew/bin/notmuch new
The solution is to add homebrew to the PATH of crontab by writing to the top of crontab -e:
PATH=/usr/local/bin:/opt/homebrew/bin/
Like this?
❯ crontab -l
PATH=/usr/local/bin:/opt/homebrew/bin/
* * * * * /usr/local/bin/mailsync
This is still not working for me. Perhaps I am misunderstanding?
My output is:
❯ crontab -l
PATH=/usr/local/bin:/usr/bin:/bin:/opt/homebrew/bin/
* * * * * /usr/local/bin/mailsync
Maybe some scripts needed are in usr/bin or bin/ ?
This is working now. Thanks so much!
I've had the same problem and tried to fix that with adding 'PATH' line to cron -e
.
But it doesn't work for me.
I've seen messages from cron and see that:
gpg: public key decryption failed: No such file or directory
gpg: decryption failed: No such file or directory
Skipping account <mail address>-remote, PassCmd exited with status 2
No new mail for <mail address>.
Any ideas how to fix that?
upd: that helped: https://dev.to/zemse/setup-gpg-on-macos-2iib
@Quadrant6630
This is working now. Thanks so much!
pls close the issue if so :)
When mailsync runs via cron, new mail is never downloaded. I can confirm that it is running as I altered the command in crontab generated by the wizard to write to a log. Every minute (as I have it configured), I get the line 'No new mail for email.' in the log. If I run mailsync directly on the command line or use the 'o' command in neomutt, new messages are downloaded successfully.
Because I thought this might be the problem, I removed the passphrase from my gpg key, but the problem persists. I'm on a Mac with Sonoma 14.1.2. "cron" has been granted full disk access.
Any thoughts? Thanks.