david/scripts-archive
david
/
scripts-archive
Archived
1
0
Fork 0
This repository has been archived on 2022-04-16. You can view files and clone it, but cannot push or open issues or pull requests.
scripts-archive/telnet_mail.sh

58 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
###############################
# #
# mbots mail routine #
# #
###############################
# ***** config section *****
#don't touch as long as you're not me. feel me?
version=".1"
author="david@socialnerds.org"
smtpserver="smtp.aec.at"
recipients="person@domain.tld person2@domain.tld"
from="releasechecker@aec.at"
subject="ubuntu precise pangolin is out. download it. seed it."
line=$1
#if [ -f $line ]; then
# line=$(cat $line)
#fi
# ***** start of script *****
#telnet connection
{
sleep 1
echo "HELO $HOSTNAME"
sleep 1
echo "MAIL FROM: $from"
sleep 1
for address in $recipients; do
echo "RCPT TO: $address"
sleep 1
done
echo "DATA"
sleep 1
for address in $recipients; do
echo "To: $address"
done
echo "From: Release CheckeR <$from>"
echo "Subject: $subject"
sleep 1
echo "$line"
sleep 1
echo "."
sleep 1
echo "QUIT"
} | telnet $smtpserver 25
# ***** end of script *****
#live long and prosper
exit 0