[問題] 指令模式下利用SMTP 寄信
請問一下,在不架 mail server 的情況下,有辦法夠過外部smpt來寄信嗎?
也就是說,透過gmail或者學校的smpt來寄信。就如同利用Outlook來寄信般,
不過希望是指令模式,也就是可以透過shell script來寄信。
google 了一下,似乎可以利用postfix。以下是我參考的網站:
http://0rz.tw/ydfim
http://0rz.tw/SuyXE
連結1的第六點,由於不知道要做什麼,所以我略過這步。
設定完後,postfix reload。接著,mail -s 'test' mymail@gmail.com
但什麼事都沒發生。信並沒有寄出去,也沒有任何錯誤訊息。
我目前猜想是因為我用的smtp有ssl加密,所以需要額外的設定。
請問一下,有其他更容易的方法,可以在命令模式下透過smtp寄信嗎?
謝謝!
Dec 2 23:21:50 silver postfix/smtp[19259]: fatal: Invalid TLS level "
may # http://www.postfix.org/TLS_README.html#client_tls_may"
Dec 2 23:21:51 silver postfix/master[19249]: warning: process
/usr/libexec/postfix/smtp pid 19259 exit status 1
Dec 2 23:21:51 silver postfix/master[19249]: warning:
/usr/libexec/postfix/smtp: bad command startup -- throttling
Dec 2 23:22:51 silver postfix/smtp[19260]: warning:
smtp_sasl_auth_enable is true, but SASL support is not compiled in
Dec 2 23:22:51 silver postfix/smtp[19260]: fatal:
Invalid TLS level "may # http://www.postfix.org/TLS_README.html#client_tls_may"
Dec 2 23:22:52 silver postfix/master[19249]: warning:
process /usr/libexec/postfix/smtp pid 19260 exit status 1
Dec 2 23:22:52 silver postfix/master[19249]: warning:
/usr/libexec/postfix/smtp: bad command startup -- throttling
Dec 2 23:23:52 silver postfix/smtp[19264]: warning:
smtp_sasl_auth_enable is true, but SASL support is not compiled in
Dec 2 23:23:52 silver postfix/smtp[19264]: fatal:
Invalid TLS level "may # http://www.postfix.org/TLS_README.html#client_tls_may"
Dec 2 23:23:53 silver postfix/master[19249]:
warning: process /usr/libexec/postfix/smtp pid 19264 exit status 1
Dec 2 23:23:53 silver postfix/master[19249]: warning:
/usr/libexec/postfix/smtp: bad command startup -- throttling
以上是maillog的內容,我實在看不個所以然來。
另外,其實我希望的只是在sever上的程式跑完時,能夠寄個訊息的文字訊息
到信箱。而不需要再開圖形介面的軟體來寄信。這樣難度會很高嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.187.168
→
12/02 23:04, , 1F
12/02 23:04, 1F
→
12/02 23:05, , 2F
12/02 23:05, 2F
※ 編輯: findans 來自: 140.112.187.168 (12/02 23:30)
→
12/03 00:09, , 3F
12/03 00:09, 3F
→
12/03 00:10, , 4F
12/03 00:10, 4F
→
12/03 00:11, , 5F
12/03 00:11, 5F
推
12/03 01:21, , 6F
12/03 01:21, 6F
→
12/03 01:21, , 7F
12/03 01:21, 7F
→
12/03 11:55, , 8F
12/03 11:55, 8F
→
12/03 11:56, , 9F
12/03 11:56, 9F
→
12/03 11:56, , 10F
12/03 11:56, 10F
→
12/03 11:59, , 11F
12/03 11:59, 11F
→
12/03 12:00, , 12F
12/03 12:00, 12F
→
12/05 23:03, , 13F
12/05 23:03, 13F