User Tools

Site Tools


mail_swaks

Differences

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

Link to this comparison view

Next revision
Previous revision
mail_swaks [2017/05/17 07:31] – created 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 ===
 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
 </sxh> </sxh>
-\\ 
 \\ \\
 === Testing the relay host === === Testing the relay host ===
Line 18: Line 23:
 Change "username" to the username you normally authenticate with to the relay host and you will be prompted for a password once you run the following command: Change "username" to the username you normally authenticate with to the relay host and you will be prompted for a password once you run the following command:
 <sxh bash> <sxh bash>
-swaks --to rackspacesupport@gmail.com --server smtp.sendgrid.net:587 --auth-user username -tls+swaks --to random_email@gmail.com --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.1495006308.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