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
transmission-daemon unable to send Email?
Re: transmission-daemon unable to send Email?
really! no solution?
Re: transmission-daemon unable to send Email?
Add a few lines to the beginning of your script that may help you figure it out:
Then check out the /tmp/script.log file.
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
Re: transmission-daemon unable to send Email?
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
*************
*************
GPGME:CMS protocol not available
/var/lib/transmission-daemon/sent: Permission denied (errno =13)
entation fault
*************
Re: transmission-daemon unable to send Email?
by the way, Mike, really appreciate your reply and your kind help. it is really useful.
Re: transmission-daemon unable to send Email?
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)
*********
********
error sending message,child exited 127 (Exec error)
*********
Re: transmission-daemon unable to send Email?
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.