跳到主要內容

如何在Ubuntu安裝和設定只寄不收( Send Only ) 的郵件伺服器


如何在Ubuntu安裝和設定只寄不收( Send Only ) 的郵件伺服器

指令: sudo apt install mailutils
步驟1


步驟2


步驟3


步驟4  System Mail Name:您申請的網域名稱


步驟5 完成安裝



寄信的方式:
$ echo [信件內容] | mail -s [信件主旨] [收件人郵址] -aFrom:[寄件人郵址]
  
例:
  $ echo "
您好嗎 ?" | mail -s "這是一封測試信" test@gmail.com -aFrom:test@test.com
 
-aFrom: 選項是用來指定寄件人的郵件位址,可以任意的指定,如果沒指定的話,就會用寄信的這位使用者帳號加上這台電腦的主機名稱來當做寄件人的網址 !

另外,
如果你在安裝之後,有疑慮的時候,也可以透過下面這行指令
sudo dpkg-reconfigure -plow postfix
重啟 Postfix 的設定畫面,重新進行設定。
不過,設定的項目會變多,但只要在General Type of mail configuration: 設定的畫面項目選
Internet Site,其他後面就都用預設值就可以了。


Postfix 的設定畫面參考如下
 sudo dpkg-reconfigure -plow postfix

1.











2.Internet Site 


3.輸入您申請的網域名稱


4.






留言

這個網誌中的熱門文章

基隆望幽谷

基隆望幽谷, 就在八斗子 忘憂谷 , 穿過像宮崎駿風之谷般的山谷, 迎接而來的是藍海、山谷與島嶼, 走在山谷的步道上,你可以遠望基隆嶼與海洋。   https://www.pexels.com/zh-tw/photo/10093017/     https://www.pexels.com/zh-tw/photo/10093006/     https://www.pexels.com/zh-tw/photo/10092822/     https://www.pexels.com/zh-tw/photo/10093057/  
志良辭官 為官權勢利名之, 反覆風雲嘆不如, 媒體今昔竟大異。 是非曲直有誰知? 2010/03/10 09:07 2010/3/8衛生署署長楊 志良因健保費調漲費率與吳敦義不合而辭官

如何設定spring Boot的 SSL憑證

在安裝 spring Boot 的工作目錄裡 1. 上傳 .p12 格式的憑證到 spring Boot 的工作目錄裡的 keystore 目錄 2. 找到   application.properties 設定檔 加入底下設定 # Server Port server.port=443 # The format used for the keystore. It could be set to JKS in case it is a JKS file server.ssl.key-store-type=PKCS12 # The path to the keystore containing the certificate server.ssl.key-store=keystore/twcassl.p12 # The password used to generate the certificate server.ssl.key-store-password=[here is yourpassword] # The alias mapped to the certificate server.ssl.key-alias=twcassl 參考文件 1.      https://www.baeldung.com/spring-boot-https-self-signed-certificate 2.      https://docs.spring.io/spring-boot/docs/1.2.3.RELEASE/reference/html/howto-embedded-servlet-containers.html