Page 1 of 1

Email notification

Posted: Fri Oct 01, 2010 3:57 pm
by disconnector
Hi all,

I'm running Transmission 2.0.4 on a MyBook device. Except for one issue it's working great!

I'm trying to have it send me email notification upon completion of a torrent. I've set the following in my settings.json:

"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/root/.config/transmission-daemon/torrent_done.sh",

When a torrent finishes I can see the following in /var/log/messages:

Oct 1 11:45:31 MyBookWorld daemon.info transmission-daemon[1319]: <Torrent name> Calling script "/root/.config/transmission-daemon/torrent_done.sh" (torrent.c:1695)

But I never receive the email. If I run the script manually it works fine. The script is marked executable and is chmod 777 just in case :)

Here is the script below:

#!/bin/bash
esmtp <my email address> <<EOF
Subject: "$TR_TORRENT_NAME" finished.
This is an automatic message from your friendly transmission-daemon
($TR_APP_VERSION), your files are in $TR_TORRENT_DIR .
Have a nice day!
EOF

Help?

Re: Email notification

Posted: Fri Oct 01, 2010 8:29 pm
by gunzip
maybe try replacing the line

esmtp <my email address> <<EOF

in your script with the absolute path to the executable

/full/path/to/esmtp <my email address> <<EOF

from a terminal enter which esmtp to find it.

it's also possible that the user running transmission on your setup doesn't have permission to use esmtp, so it never executes.