I have recently setup a mail server on my Ubuntu Desktop 16.10, and I made a script that when a specific user logs in, they will execute the script instead of bash. Here is the script:
#!/bin/bash
while [ true ]
do
echo -n "To: "
read To
echo -n "Subject: "
read Subject
echo -n "Attachments [y/N]: "
read AttachYN
if [[ $AttachYN == "" || $AttachYN == "n" || $AttachYN == "N" ]]
then
mail "$To" -s "$Subject"
exit
elif [[ $AttachYN == "y" || $AttachYN == "Y" ]]
then
echo -n "File path: "
read File
mail "$To" -s "$Subject" -A "$file"
exit
else
echo "Incorrect character, must be y, Y, n, N, or blank for default [n]"
fi
done
Upon execution, it asks for Cc:
input, but I don't want this, as I don't use Cc
.
How do I remove this?
Thanks