Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kanedafromparis/bed4cdcfa7bfbc5898ffb5c78e63f4fe to your computer and use it in GitHub Desktop.
Save kanedafromparis/bed4cdcfa7bfbc5898ffb5c78e63f4fe to your computer and use it in GitHub Desktop.
testing sendmail endpoint
ENDPOINT=smtp
SERVICEPORT=25
timeout 1 bash -c 'cat < /dev/null > /dev/tcp/$ENDPOINT/$SERVICEPORT' ; echo $?
/tmp/test.sh > /dev/tcp/$ENDPOINT/$SERVICEPORT
$ cat /tmp/test.sh
#!/bin/bash
echo "EHLO axa.com"
echo "MAIL FROM:toto@yopmail.com"
echo "RCPT TO:toto@yopmail.com"
echo "data"
echo "subject:Test"
echo "This is a test mail"
echo "."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment