mail_swaks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mail_swaks [2017/05/17 07:33] – luke7858 | mail_swaks [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | === Installing | + | There are 2 main methods for sending/ |
+ | * __Telnet/ | ||
+ | * __swaks__ | ||
+ | \\ | ||
+ | \\ | ||
+ | My favourite is using swaks as its easy to use and quick. You will probably need to install though: | ||
+ | \\ | ||
+ | ==== SWAKS ==== | ||
Swaks can be found in the epel repository. Make sure you have this repo enabled and then run: | Swaks can be found in the epel repository. Make sure you have this repo enabled and then run: | ||
<sxh bash> | <sxh bash> | ||
# yum install swaks -y | # yum install swaks -y | ||
</ | </ | ||
- | \\ | ||
\\ | \\ | ||
=== Testing your local mail server === | === Testing your local mail server === | ||
Line 11: | Line 17: | ||
swaks --to [email protected] --server 127.0.0.1 -from [email protected] | swaks --to [email protected] --server 127.0.0.1 -from [email protected] | ||
</ | </ | ||
- | \\ | ||
\\ | \\ | ||
=== Testing the relay host === | === Testing the relay host === | ||
Line 20: | Line 25: | ||
swaks --to [email protected] --server smtp.sendgrid.net: | swaks --to [email protected] --server smtp.sendgrid.net: | ||
</ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | ==== Telnet ==== | ||
+ | Command: | ||
+ | <sxh bash> | ||
+ | telnet localhost 25 | ||
+ | </ | ||
+ | Response: | ||
+ | <sxh bash> | ||
+ | Trying ::1... | ||
+ | Connected to localhost. | ||
+ | Escape character is ' | ||
+ | 220 cloud-server-03.localdomain ESMTP Postfix | ||
+ | </ | ||
+ | \\ | ||
+ | Command | ||
+ | <sxh bash> | ||
+ | HELO localhost | ||
+ | </ | ||
+ | Response: | ||
+ | <sxh bash> | ||
+ | 250 cloud-server-03.localdomain | ||
+ | </ | ||
+ | \\ | ||
+ | Command | ||
+ | <sxh bash> | ||
+ | mail from: [email protected] | ||
+ | </ | ||
+ | Response: | ||
+ | <sxh bash> | ||
+ | 250 2.1.0 Ok | ||
+ | </ | ||
+ | \\ | ||
+ | Command | ||
+ | <sxh bash> | ||
+ | rcpt to: [email protected] | ||
+ | </ | ||
+ | Response: | ||
+ | <sxh bash> | ||
+ | 250 2.1.5 Ok | ||
+ | data | ||
+ | 354 End data with < | ||
+ | </ | ||
+ | Type some data and then end the email with a `.` on a line by itself. | ||
+ | \\ | ||
+ | Press enter to escape and the type quit | ||
+ |
mail_swaks.1495006407.txt.gz · Last modified: 2024/05/23 07:26 (external edit)