Regardless, you don't have to mess around with pop. You can create the "| /path/to/script" mail alias in your cPanel (create a forwarder) and have a script handle the email automatically.
2007-04-03 04:33 PM
Paulm
Posts: 5
Starts: 3
Wiki Edits: 0
William,
Thanks for the speedy reply! I'm trying to set up a simple proof of concept, but I think I need some more direction
I set up this forwarder in cpanel: txt@suburbly.com "| /home/suburbl/public_html/mail/process.sh"
process.sh just puts data piped to in into a text file: *** suburbl@luther [~/public_html/mail]# pwd /home/suburbl/public_html/mail suburbl@luther [~/public_html/mail]# ls -lah total 12K drwxr-xr-x 2 suburbl suburbl 4.0K Apr 4 11:20 ./ drwxr-x--- 29 suburbl nobody 4.0K Apr 3 16:56 ../ -rwxr-xr-x 1 suburbl suburbl 56 Apr 3 17:25 process.sh* suburbl@luther [~/public_html/mail]# cat process.sh #!/bin/bash read whatcamein echo $whatcamein > received
suburbl@luther [~/public_html/mail]# echo "foo" | /home/suburbl/public_html/mail/process.sh suburbl@luther [~/public_html/mail]# ls ./ ../ process.sh* received suburbl@luther [~/public_html/mail]# cat received foo ***
I send a mail to txt@suburbly.com, but nothing happens. Advice?
2007-04-04 11:31 AM
Paulm
Posts: 5
Starts: 3
Wiki Edits: 0
I may have spoke too soon!
I tried it again, and this time i got a bounced message. apparently it barfed on line 3 of my script. why? duh, i didn't specify the absolute path to the output file.
set the absolute path, sent a mail, got a text file with the first line of the mail.
sweet. thanks!
2007-04-04 11:59 AM
Hello Guest! In order to post you must be an active client with us, please log in or sign up today!