Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [TELNET] SMTP
- =============
- ### Connect to the server
- ```
- $ telnet <servername_or_ip> <port>
- ```
- *(Default port : 25)*
- ### Polite people says Hello first
- ```
- > EHLO <servername>
- ```
- ### Authentification
- First encode username and password in B64:
- ```
- $ perl -MMIME::Base64 -e 'print encode_base64("<username>");'
- $ perl -MMIME::Base64 -e 'print encode_base64("password");'
- ```
- Then inside the telnet
- ```
- > AUTH LOGIN
- ```
- The server return:
- ```
- > 334 VXNlcm5hbWU;
- ```
- ***B64 encoded string asking for username***
- Paste the base64 encoded username:
- ```
- > dXNlcm5hbWU=
- ```
- Then the server return:
- ```
- > 334 UGFzc3dvcmQ6;
- ```
- ***B64 encoded string asking for password***
- Paste the B64 encoded password:
- ```
- > cGFzc3dvcmQ=
- ```
- Now the server should return:
- ```
- > 235 Authentication succeeded
- ```
- ### Define Sender
- ```
- > MAIL FROM:<sender@domain.tld>
- ```
- The server should return:
- ```
- > 250 2.1.0 Ok
- ```
- ***Warning : Even if the sender is wrong or not authorized the server always return Ok, because the checking is done with both sender and recipient***
- ### Define Recipient
- ```
- > RCPT TO:<recipient@domain.tld>
- ```
- The server should return:
- ```
- > 250 2.1.0 Ok
- ```
- ### Insert DATA
- ```
- > DATA
- ```
- The server return:
- ```
- > 354 End data with <CR><LF>.<CR><LF>
- ```
- Enter actual mail content:
- ```
- > From: sender@example.com
- > To: recipient@example.com
- > Subject: Test message
- > Reply-to: sender@example.com
- > This is a test message.
- ```
- Then press enter, a dot then enter again:
- ```
- > 250 2.6.0 Queued mail for delivery
- ```
- Disconnect
- ```
- > QUIT
- ```
- The server return :
- ```
- > 221 <servername> ESMTP <serverbannner> closing connection
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement