Skip to content
Snippets Groups Projects
Commit 91d066ec authored by Florent Thiery's avatar Florent Thiery
Browse files

add configured relay in output

parent 29a5afb1
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
# envoyer un mail contenant un truc random # envoyer un mail contenant un truc random
RAND="$RANDOM" RAND="$RANDOM"
EMAIL="noreply+$RAND@ubicast.eu" EMAIL="noreply+$RAND@ubicast.eu"
echo "Sending email to $EMAIL" RELAY=`grep relayhost /etc/postfix/main.cf`
echo "Sending email to $EMAIL using $RELAY"
echo "This is a test email" | mail -s "Test email from `cat /etc/hostname`" $EMAIL echo "This is a test email" | mail -s "Test email from `cat /etc/hostname`" $EMAIL
sleep 10 sleep 10
grep $EMAIL /var/log/mail.log | grep bounced > /dev/null grep $EMAIL /var/log/mail.log | grep bounced > /dev/null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment