I have now started again from scratch.
I have an Ubuntu 9.04 32-bit server as Falko's:
up to stage 10.
with a working Pure-ftpd server as per Falkos:
I then installed ssmtp:
sudo apt-get install ssmtp
sudo vi /etc/ssmtp/ssmtp.conf
Then by typing into terminal:
and hitting enter, then
Subject: test email
and then crtl+D it successfully sends a mail via my gmail account.
I edit Pure-ftp conf file:
and make sure option "STANDALONE_OR_INETD" is "STANDALONE"
(because it said to on the man page)
All that above I got from one of the very few sources I could find on the internet and it basically said "then create a script that does something useful and you are done.
This did not eaxctly help me.
echo "$1 uploaded" | ssmtp email@example.com
Subject: New File Uploaded
I found another source that gave a small amount of help:http://blog.derjohn.de/space/start/2006-11-14/1
Step 6: Check if the daemon really run with the new options. (Doesn't say how)
root 18623 0.0 0.0 12120 868 ? Ss 19:39 0:00 pure-ftpd (SERVER) www-data 18671 0.0 0.0 11912 672 ? Ss 19:40 0:00 /usr/sbin/pure-uploadscript -r /usr/local/sbin/uploadhandler.pl -B -u 33 -g 33
Don't know what that means
Step 7: Create a test script. E.g. this one will write the filename to a file called /tmp/pure-was-here<datestamp>.
#!/bin/sh echo "$1" > /tmp/pure-was-here$(date +%Y%m%d%H%M%S)
Step 8: Test the script, log in via ftp and upload a file:
I tried that and uploaded a file but the file in /TEMP/ doesn't get created.
I have read the man page for pure-uploadscript over and over but it doesn't seem to tell me how
to do anything, just what it can
I assume that what I need to do now is:
1). Learn how to create a shell script and then place it somewhere and tell the conf page where it is (UPLOADSCRIPT=)
2). Learn how to get said shell script to use ssmtp to send an email using the available things passed from uploadscript ($1 and others ???)
3). Prey that it works because if it doesn't I have no where to turn.
I feel I am so close now,
Any help that any kind soul could lend me would be greatly appreciated.