more work on magimail

This commit is contained in:
Andrew Pamment 2018-02-06 18:22:11 +10:00
parent 622b4804f4
commit c52e16a9f1

View File

@ -67,3 +67,39 @@ TODO.
AREA "HPY_GEN" 637:1/999.0 JAM "/path/to/MagickaBBS/msgs/hpy_gen" AREA "HPY_GEN" 637:1/999.0 JAM "/path/to/MagickaBBS/msgs/hpy_gen"
EXPORT %637:1/100.0 EXPORT %637:1/100.0
GROUP A GROUP A
## Example magitoss.sh
#!/bin/sh
cd /path/to/MagickaBBS/ftn
../utils/magimail/bin/magimail toss
## Example magiscan.sh
#!/bin/sh
cd /path/to/MagickaBBS/ftn
../utils/magimail/bin/magimail scan
## Watching for New Mail
When new mail is created on your bbs, a semaphore file is touched. So, you need to run a script that watches for changed semaphores and runs `magiscan.sh`.
On Linux and FreeBSD this can be accomplished with inotifytools. On other platforms, an alternative called [FSWatch](https://github.com/emcrisostomo/fswatch) is available.
## Example watchmail.sh (inotifytools)
#!/bin/sh
cd /path/to/MagickaBBS
touch mail.out
while inotifywait -e close_write mail.out; do ./ftn/magiscan.sh;done
## Example watchmail.sh (fswatch)
#!/bin/sh
touch /path/to/MagickaBBS/mail.out
/usr/local/bin/fswatch -o /path/to/MagickaBBS/mail.out | xargs -n1 -I{} /path/to/MagickaBBS/ftn/magiscan.sh