- Ubuntu Jaunty Server (9.04)
- pure-ftpd 1.0.21-11.4ubuntu1
- mutt 1.5.18-6ubuntu1
I need to receive e-mail notifications when my FTP users upload files.
I use pure-uploadscript to do this. The code below is set to be run from my own (non-super) user:
#! /bin/bash
echo "File $1 (size $UPLOAD_SIZE) uploaded by $UPLOAD_VUSER \
on $(date)" \
| /usr/bin/mutt -s "[FTP] File uploaded: $1" \
user@example.com 2>&1 >> path/logfile \
&& echo "OK $1 $(id)" >> path/logfile \
|| echo "ERR $1 $(id)" >> path/logfile
My script gets called, $(id) displays correct data, but mutt says (as I can see from the log) "Could not send the message.".
When I run the same command from the commandline of my own user, message is sent.
What can I do to debug this?