metinex
03-10-2006, 07:49 AM
I have a script running on my server for Qmail of Plesk. I provide it for your use too.
What the script below does is that it sents an
alert message to another address of email account holder. It is very useful
for the people they check their personal accounts daily, but not their
business accounts. Regular forwarding is no good in case they reply from
their personal account for business purposes.
Si it just sends a message with subject and sender email name so that they can go to email account to read the full content using Horde webmail.
#!/bin/sh
# WARNING: This file was auto-generated. Do not edit!
domain=`echo "$RECIPIENT" | awk -F@ '{print $2}' |cat`
account=`echo "$RECIPIENT" | awk -F- '{print $2 $3 $4 $5 $6}' |cat`
content=`cat`
subject=` echo "$content" | head -n 50 | grep Subject: | head -n 1 | cat`
( echo "$subject"
echo To: ${1+"$@"}
echo From: auto@"$domain"
echo ''
echo "This is an automated notification message that you received a new
message from $SENDER in your $account email account. The subject of that
email is:"
echo "$subject"
echo ''
echo 'Please login to your account using the link below to read the full
content of the email:'
echo $RECIPIENT | awk -F@ '{print "http://webmail." $2}'
echo ''
echo ''
echo 'This is an auto generated message. Make a reply to this email with a
subject "CANCEL" to stop this email.'
echo ''
echo ''
echo ''
echo ''
Put this script in a file like /var/qmail/bin/sendAlert
Then add the following line into your qmail files;
| sendAlert youremail@domain.com
What the script below does is that it sents an
alert message to another address of email account holder. It is very useful
for the people they check their personal accounts daily, but not their
business accounts. Regular forwarding is no good in case they reply from
their personal account for business purposes.
Si it just sends a message with subject and sender email name so that they can go to email account to read the full content using Horde webmail.
#!/bin/sh
# WARNING: This file was auto-generated. Do not edit!
domain=`echo "$RECIPIENT" | awk -F@ '{print $2}' |cat`
account=`echo "$RECIPIENT" | awk -F- '{print $2 $3 $4 $5 $6}' |cat`
content=`cat`
subject=` echo "$content" | head -n 50 | grep Subject: | head -n 1 | cat`
( echo "$subject"
echo To: ${1+"$@"}
echo From: auto@"$domain"
echo ''
echo "This is an automated notification message that you received a new
message from $SENDER in your $account email account. The subject of that
email is:"
echo "$subject"
echo ''
echo 'Please login to your account using the link below to read the full
content of the email:'
echo $RECIPIENT | awk -F@ '{print "http://webmail." $2}'
echo ''
echo ''
echo 'This is an auto generated message. Make a reply to this email with a
subject "CANCEL" to stop this email.'
echo ''
echo ''
echo ''
echo ''
Put this script in a file like /var/qmail/bin/sendAlert
Then add the following line into your qmail files;
| sendAlert youremail@domain.com