Catagorized Notes
Renamed notes to fit categories and be easier to find later: blog, config, howto
This commit is contained in:
85
howto - send mail from cli.md
Normal file
85
howto - send mail from cli.md
Normal file
@@ -0,0 +1,85 @@
|
||||
# HowTo - Send Mail from the Linux Command Line
|
||||
|
||||
Send mail from command line - telnet
|
||||
End the message with a blank line, period and a blank line
|
||||
|
||||
You type:
|
||||
```bash
|
||||
telnet localhost 25
|
||||
```
|
||||
|
||||
```
|
||||
Trying 127.0.0.1...
|
||||
Connected to localhost.
|
||||
Escape character is '^]'.
|
||||
220 www.fvwdhost2.com ESMTP Postfix
|
||||
```
|
||||
|
||||
You type:
|
||||
```bash
|
||||
helo www.fvwdhost2.com
|
||||
```
|
||||
|
||||
```
|
||||
250 www.fvwdhost2.com
|
||||
```
|
||||
|
||||
You type:
|
||||
```bash
|
||||
mail from: root@www.fvwdhost2.com
|
||||
```
|
||||
|
||||
```
|
||||
250 2.1.0 Ok
|
||||
```
|
||||
|
||||
You type:
|
||||
```bash
|
||||
rcpt to: rzack@pantek.com
|
||||
```
|
||||
|
||||
```
|
||||
250 2.1.5 Ok
|
||||
```
|
||||
|
||||
You type:
|
||||
```bash
|
||||
rcpt to: chawley@pantek.com
|
||||
```
|
||||
|
||||
```
|
||||
250 2.1.5 Ok
|
||||
```
|
||||
|
||||
You type:
|
||||
```bash
|
||||
data
|
||||
```
|
||||
|
||||
```
|
||||
354 End data with <CR><LF>.<CR><LF>
|
||||
```
|
||||
|
||||
You type:
|
||||
```bash
|
||||
Subject: This is a test
|
||||
|
||||
|
||||
This is the absolute best way to test mail delivery without worrying about a client or something else being broken.
|
||||
|
||||
.
|
||||
```
|
||||
|
||||
```
|
||||
250 2.0.0 Ok: queued as CF91A620B94
|
||||
```
|
||||
|
||||
You type:
|
||||
```bash
|
||||
quit
|
||||
```
|
||||
|
||||
```
|
||||
221 2.0.0 Bye
|
||||
Connection closed by foreign host.
|
||||
```
|
||||
Reference in New Issue
Block a user