User Tools

Site Tools


mail_swaks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mail_swaks [2017/05/17 07:33] luke7858mail_swaks [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 1: Line 1:
-=== Installing SWAKS ===+There are 2 main methods for sending/testing outgoing mail: 
 +  * __Telnet/nc__ 
 +  * __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
 </sxh> </sxh>
-\\ 
 \\ \\
 === 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]
 </sxh> </sxh>
-\\ 
 \\ \\
 === Testing the relay host === === Testing the relay host ===
Line 20: Line 25:
 swaks --to [email protected] --server smtp.sendgrid.net:587 --auth-user username -tls swaks --to [email protected] --server smtp.sendgrid.net:587 --auth-user username -tls
 </sxh> </sxh>
 +\\
 +\\
 +==== Telnet ====
 +Command:
 +<sxh bash>
 +telnet localhost 25
 +</sxh>
 +Response:
 +<sxh bash>
 +Trying ::1...
 +Connected to localhost.
 +Escape character is '^]'.
 +220 cloud-server-03.localdomain ESMTP Postfix
 +</sxh>
 +\\
 +Command
 +<sxh bash>
 +HELO localhost
 +</sxh>
 +Response:
 +<sxh bash>
 +250 cloud-server-03.localdomain
 +</sxh>
 +\\
 +Command
 +<sxh bash>
 +mail from: [email protected]
 +</sxh>
 +Response:
 +<sxh bash>
 +250 2.1.0 Ok
 +</sxh>
 +\\
 +Command
 +<sxh bash>
 +rcpt to: [email protected]
 +</sxh>
 +Response:
 +<sxh bash>
 +250 2.1.5 Ok
 +data
 +354 End data with <CR><LF>.<CR><LF>
 +</sxh>
 +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)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki