mail_swaks
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| mail_swaks [2017/05/17 07:31] – created 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 === | ||
| The following command tests your local mail configuration (postfix). This includes the relay that may be configured with it. | The following command tests your local mail configuration (postfix). This includes the relay that may be configured with it. | ||
| <sxh bash> | <sxh bash> | ||
| - | swaks --to rackspacesupport@gmail.com --server 127.0.0.1 -from rack@example.com | + | swaks --to random_email@gmail.com --server 127.0.0.1 -from luke@example.com |
| </ | </ | ||
| - | \\ | ||
| \\ | \\ | ||
| === Testing the relay host === | === Testing the relay host === | ||
| Line 18: | Line 23: | ||
| Change " | Change " | ||
| <sxh bash> | <sxh bash> | ||
| - | swaks --to rackspacesupport@gmail.com --server smtp.sendgrid.net: | + | swaks --to random_email@gmail.com --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.1495006308.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
