User Tools

Site Tools


tips-and-tricks

Send email via telnet

Open relay

telnet x.x.x.x 25
ehlo aaa
mail from: <aaa@aaa.aa>
rcpt to: <bbb@bbb.bb>
data
Subject: yyy

msessage text
.
quit

with auth

  • generate base64 auth string:
# python
python -c 'import base64; print base64.b64encode("\000user@domain.com\000password")'
# bash
echo -n "\000user@domain.com\000password" | base64
#perl
perl -MMIME::Base64 -e 'print encode_base64("\000jms1\@jms1.net\000not.my.real.password”) 
telnet x.x.x.x 25
ehlo aaa
AUTH PLAIN AGptczFAam1zMS5uZXQAbm90Lm15LnJlYWwucGFzc3dvcmQ=
mail from: <aaa@aaa.aa>
rcpt to: <bbb@bbb.bb>
data
Subject: yyy

msessage text
.
quit
tips-and-tricks.txt · Last modified: 2014/07/21 22:44 (external edit)