-
Notifications
You must be signed in to change notification settings - Fork 96
Msmtp
See an example with msmtp in a complete setup in Complete gmail configuration#Configuring-msmtp.
Using plain msmtp has one drawback: sup waits for msmtp to complete sending the mail before returning to work.
msmtpq and msmtpQ are two scripts supplied with the source code of msmtp that solve this problem. th q/Q stands for queue, they are bash scripts implementing a mail send queue.
After putting them on a directory on your path and making them executable (chmod +x), change the send line in your config.yaml to msmtpQ --account=account_name -t and msmtpQ will queue the mail for you.
msmtpq is the send script, invoced as msmtpq -r to flush all mail. I'm using in in conjunction with incron and a short wrapper script:
incrontab:
/home/me/.msmtp.queue IN_CLOSE_WRITE /path/to/msmtp_wrapper.sh
and msmtp_wrapper.sh: #!/bin/bash
ls ${1%msmtp}mail 2>&1 > /dev/null && /home/ruthard/bin/msmtpq -r
- Securely Store Password - never store password clear text.
- Archlinux's wiki page for msmtp