README.md (2748B)
1 This is a set of shell scripts to make it easy to schedule reminders to be sent 2 to yourself about a specific email at a specific time. 3 4 ## Requirements 5 6 You should have in your PATH the commands get_email_header and 7 prepare_email_forward from https://a3nm.net/git/mybin. 8 9 Reminder emails will be sent with "sendmail -t" -- you should ensure that this 10 will actually send emails correctly, e.g., using msmtp-mta. 11 12 ## Setup 13 14 To get started, write in the "email" file the email address that should receive 15 the reminders (it will also be used as a from address for the reminders): 16 17 echo "your_email_address@example.com" > email 18 19 Then initialize the DB: 20 21 ./init.sh 22 23 Schedule the following in your crontab, e.g., daily, to catch any missing 24 reminders: 25 26 /path/to/remailback/poll.sh 27 28 ## Usage 29 30 To configure a reminder about a message, do: 31 32 cat ~/Mailstore/cur/messagefile | ./add.sh 2 weeks, check that order arrived 33 34 This invocation will schedule a reminder about the message to be sent in 2 weeks 35 (give or take 5 minutes). Details about the reminder are stored in the 36 remailback folder and in its DB. An at job with atd is scheduled to send the 37 message (but it will be sent by the cron job above even if at fails). 38 39 When the time is elapsed, remailback will send a reminder about the email: this 40 is an email which is In-Reply-To the original message, includes the original 41 message as an attachment, has a similar subject to the original message, and 42 includes your note (e.g., "check that order arrived" above). 43 44 If sendmail fails, poll.sh will abort, so the reminder will not be marked as 45 sent and will be periodically retried by the crontab. 46 47 If you want to check which reminders exist about a message, issue: 48 49 cat ~/Mailstore/cur/messagefile | ./show.sh 50 51 If you want to delete all reminders about a message, issue: 52 53 cat ~/Mailstore/cur/messagefile | ./delete.sh 54 55 ## Using within mutt 56 57 See: https://a3nm.net/git/myconfig/file/mutt/remailback.html 58 59 ## Reference 60 61 ### Commands 62 63 - init.sh: initialize the DB 64 - add.sh: add a reminder for a message 65 - delete.sh: delete all reminders for a message 66 - show.sh: show all reminders for a message 67 - poll.sh: poll for due reminders and send them 68 69 ### Working files and folders 70 71 - remailback.sqlite: sqlite3 database 72 - lock.flock: lock (to prevent concurrent writes on the DB) 73 74 - scheduled/: copy of email with scheduled reminders 75 - sent/: copy of email for which a reminder was sent 76 - deleted/: copy of email for which a reminder was deleted 77 78 At any time, the contents of these three directories should exactly reflect what 79 is in the sqlite database. 80 81 - scheduled_reminders/: copy of reminders which were scheduled (just before they 82 were sent) 83 - sent_reminders/: copy of reminders which were sent 84