View Single Post
  #7  
Old 24th November 2009, 03:07
almeister9 almeister9 is offline
Member
 
Join Date: Sep 2008
Posts: 36
Thanks: 6
Thanked 3 Times in 3 Posts
Default A little further

I have made a little more progress.
I have changed /etc/default/pure-ftpd-common to read
UPLOADUID=2001
UPLOADGID=2001
This is the userID of pureftpd.
I then made a script called /usr/sbin/upload2.sh which has the following code:
Code:
#!/bin/sh
echo "$1" > /tmp/pure-was-here$(date +%Y%m%d%H%M%S)
I then did this
Code:
chmod +x upload2.sh
and restarted Pureftpd.
I then uploaded a file to the ftp server and went to /tmp and the file was there!! YAY!
So I made a txt file called /usr/sbin/msg1.txt which contains:
Code:
To: recipient@address
From: Originating@address
Subject: Test from FTP Server

This is a test
then created a script called /usr/sbin/upload1.sh which contains:
Code:
ssmtp recipient@address.com < msg1.txt
and I ran
Code:
chmod +x upload1.sh
then restarted PureFTPd.

This however does not work.
If I move to the containing folder
cd /usr/sbin
and type ./upload1.sh
The email IS sent.

I feel I am very close now but it is still not working.
Reply With Quote