Tell me more ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I have set up my pi to be a media server and a seed box. I have the transmission daemon running in the background. I am able to successfully access the transmission web gui from my laptop. Now I am trying to make the daemon send an email automatically on torrent completion. Here is the script I wrote,

#!/bin/bash
/usr/bin/esmtp username@gmail.com <<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

To be honest, I found this online. So I installed esmtp. I configured it and made sure the script send email and it works! However I do not get an email when a torrent is completed.

Things I have already done,

  • I have also changed the group ownership of /usr/bin/esmtp and the script to debian-transmission.
  • Made the script executable
  • Enabled run script after torrent finishes in the settings.json file. Gave it the exact path
  • Checked if running the script manually sends an email.

But this still does not work. Please help.

share|improve this question
Any errors you can provide? – Jivings Oct 17 '12 at 10:18
So what does Transmission's logs say? If esmtp is working and you have the correct paths in settings.json for script-torrent-done-filename and has made sure that script-torrent-done-enabled is set to true, this is probably a permission problem. – Joppe Oct 17 '12 at 10:54
@Joppe Please let me know where I can find the logs for transmission. I did check /var/log/syslog, and noticed that transmission does call the script. But I couldn't anything else out of it. – Nik Oct 17 '12 at 11:13
I think it logs to the syslog. Just for debugging purposes. What about replacing your script with something a little simpler that just touches a file in the /tmp folder? If that works, you can at least be sure that the script is indeed executed by Transmission. – Joppe Oct 17 '12 at 14:28
Transmission-daemon sometimes have a problem with editing the settings.json file.You need to make sure that its not running before editing the file or changes don't take place.Have you verified that the changes are intact in settings.json?COuld be worth looking at. – SteveIrwin Nov 9 '12 at 22:43

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.