mail

Install on Ubuntu

Mail on Arch

pop3(110)ポートを使ったメールの受信方法

$ telnet pop.nifty.com 110
Trying 210.131.2.37...
Connected to pop.nifty.com.
Escape character is '^]'.
+OK @nifty pop server at conuserg-09.nifty.com starting. <31455.1474151762@conuserg-09.nifty.com>
user scott
+OK Password required for scott.
pass tiger
+OK ekzemplaro has 2 messages in 8438 octets.
list
+OK 2 visible messages (8438 octets)
1 7174
2 1352
.
retr 2
+OK 1352 octets
Return-Path: aabb@hi-ho.ne.jp
Received: by conbox-005 id 57ddc53b7c2226;
	Sun, 18 Sep 2016 07:35:39 +0900
.
quit
+OK Pop server at conbox-005 signing off.
Connection closed by foreign host.
Dovecot のテスト

$ telnet localhost 110
Trying ::1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.
user scott
+OK
pass tiger
+OK Logged in.
list
+OK 0 messages:
.
quit
+OK Logging out.
Connection closed by foreign host.
Postfix のテスト
$ telnet example.org 25
Trying 192.168.8.29...
Connected to example.org.
Escape character is '^]'.
220 mail.example.org ESMTP Postfix
helo example.org
250 mail.example.org

mail from: scott@example.org
250 2.1.0 Ok

rcpt to: john@aaa.com
250 2.1.5 Ok

data
354 End data with .
Subject: Test mail
From: scott@example.org
Good Afternoon
.

250 2.0.0 Ok: queued as 70ADF262581
quit
221 2.0.0 Bye
Connection closed by foreign host.
メール送信のテスト

$ sendmail scott@hello.org
From: scott@good.com
To: john@hello.org
Subject: Test Mail
Good Evening
Nov/04/2016 18:42
.
メール送信のテスト

$ mail pi
Cc: 
Subject: Test Mail
Good Afternoon
.
Ctrl+Dを押す
msmtp を使ったメールの送信方法

Gmail Oath2 を使うには

# pacman -S python-google-api-python-client


Postfix で外部からメールを送信

IP アドレスを、mynetworks に入れる。

/etc/postfix/main.cf

mynetworks = 168.100.189.0/28, 127.0.0.0/8, 153.140.201.204

Return

May/14/2018 AM 08:15