transmission-daemon unable to send Email?

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
mwzhang
Posts: 5
Joined: Mon May 21, 2018 6:57 am

transmission-daemon unable to send Email?

Post by mwzhang »

hi Support and Friends:

i just download and install the Transmission 2.92 (14714) successfully, everything is working perfect except the running script to send Email.

i defined the below:
script-torrent-done-enabled: true,
script-torrent-done-filename: "/bin/sendmail.sh"


in the sendmail.sh, it is very simple. just somthing like below:

echo "ok,Done" | mutt -s "Done!" xxxmail@gmail.com
echo "test ok in" >>/tmp/a.txt


if i run sendmail.sh using Root, it is working fine. and i can receive Email from xxxmail@gmail.com address scuessfully.

i tried to chown sendmail.sh owner to transmission-daemon, but it still doesn't work.
and i found the a.txt can be written in but Email can't be received.

i am not sure where is problem? could you provide some guide?

best regards
mwzhang
Posts: 5
Joined: Mon May 21, 2018 6:57 am

Re: transmission-daemon unable to send Email?

Post by mwzhang »

really! no solution?
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: transmission-daemon unable to send Email?

Post by mike.dld »

Add a few lines to the beginning of your script that may help you figure it out:

Code: Select all

#!/bin/sh
exec >/tmp/script.log 2>&1
set -x
echo "ok,Done" | mutt -s "Done!" xxxmail@gmail.com
echo "test ok in" >>/tmp/a.txt
Then check out the /tmp/script.log file.
mwzhang
Posts: 5
Joined: Mon May 21, 2018 6:57 am

Re: transmission-daemon unable to send Email?

Post by mwzhang »

it is really weird.i already grant 777 access to this transmission-daemon, but it is still showing permission denied.

*************
GPGME:CMS protocol not available
/var/lib/transmission-daemon/sent: Permission denied (errno =13)
entation fault
*************
mwzhang
Posts: 5
Joined: Mon May 21, 2018 6:57 am

Re: transmission-daemon unable to send Email?

Post by mwzhang »

by the way, Mike, really appreciate your reply and your kind help. it is really useful.
mwzhang
Posts: 5
Joined: Mon May 21, 2018 6:57 am

Re: transmission-daemon unable to send Email?

Post by mwzhang »

i just chmod -R 777 transmission-daemon. it seems the error gone.but new error pop up:
********
error sending message,child exited 127 (Exec error)
*********
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: transmission-daemon unable to send Email?

Post by mike.dld »

Exit code 127 usually means that some program file wasn't found while being executed. Add `env` command to your script to see what environment it's being executed in and whether PATH environment variable contains necessary paths so that all the needed programs are accessible to the script (and other processes it executes, like mutt). Passing mutt the `-d` argument (see https://linux.die.net/man/1/mutt for details) might help as well, just keep in mind that ~ (mentioned in the man) will expand to home directory of user that transmission-daemon is running under, which usually isn't your user but a dedicated one. Running e.g. `eval echo "~debian-transmission"` (or whatever that user is if it's not "debian-transmission") will display it.
Post Reply