[精讚] [會員登入]
288

[postfix] open /etc/postfix/main.cf: Permission denied 等錯誤

遇到開啟 /etc/postfix/main.cf: Permission denied 等錯誤解決

分享此文連結 //n.sfs.tw/15661

分享連結 [postfix] open /etc/postfix/main.cf: Permission denied 等錯誤@新精讚
(文章歡迎轉載,務必尊重版權註明連結來源)
2022-04-23 20:13:05 最後編修
2022-03-08 14:35:41 By 張○○
 

自動目錄

錯誤 postfix/sendmail: fatal: open /etc/postfix/main.cf: Permission denied

如果這個錯誤存在,大部分情況就無法寄信。

修正

# chmod 755 /etc/postfix

SELINUX

# setsebool httpd_can_sendmail on
# setsebool httpd_can_sendmail on -P

 

錯誤 cannot update mailbox /var/mail/root for user root. error writing message: File too large

postfix/local: D86CF60AA4FC: to=<user@example.com>, orig_to=<root>, relay=local, delay=0.23, delays=0.13/0/0/0.09, dsn=5.2.2, status=bounced (cannot update mailbox /var/mail/root for user root. error writing message: File too large)

主要是信箱容量到達設定上限

查看上限

# postconf -d | grep mailbox_size_limit

mailbox_size_limit = 51200000

修改上限

預設 51.2 MB,改大一點,修改 /etc/postfix/main.cf

加上一行,改為512MB

mailbox_size_limit = 512000000

重啟postfix 生效

清空root信箱, root 也可以改成使用者信箱

# echo '' > /var/mail/root

 

錯誤,google拒絕收信 Our system has detected that this message is 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail, 550-5.7.1 this message has been blocked

postfix/smtp: 4A2E960A9CDB: to=<user@gmail.com>, orig_to=<service@xxx>, relay=gmail-smtp-in.l.google.com[142.251.8.26]:25, delay=1.9, delays=0.8/0/0.32/0.77, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[142.251.8.26] said: 550-5.7.1  Our system has detected that this message is 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail, 550-5.7.1 this message has been blocked. Please visit 550-5.7.1  https://support.google.com/mail/?p=UnsolicitedMessageError 550 5.7.1  for more information. 195si8062422pfz.220 - gsmtp (in reply to end of DATA command))

解決

進到網頁

https://support.google.com/mail/?p=UnsolicitedMessageError
https://support.google.com/mail/answer/9981691?visit_id=637823184872027838-3968779762&rd=1
https://postmaster.google.com/managedomains?pli=1

把你的網域加入,例如我是從 @n.sfs.tw 寄出,則新增此網域並在dns加入txt的記錄後進行驗證即可。

還不行的話DNS 加入SPF記錄也許能解決問題。

參考資料

[1] https://ma.ttias.be/postfix-cannot-update-mailbox-varmail-user-file-large/

 

 

 

END

你可能感興趣的文章

[Centos7] 安裝sphinx+php7 在centos7上安裝sphinx,在PHP7上運作正確

[Centos7] 新的防火牆firewalld Centos7新的防火牆firewalld 和前面的iptables有很大的不同

[Centos8] 利用nmcli 設定ipv4 位址 Centos7之後修改網路設定變得比較麻煩一點,此篇介紹使用nmcli指令的方法

DNS壓力測試工具queryperf 要怎麼知道我安裝的DNS是否能耐受的住網路上的攻擊或大量查詢,這裡有一個免費的工具 queryperf

EXCEL+phpPgAdmin 使用phpPgAdmin 匯出資料 直接使用phpPgAmin下載資料的方法

[CentOS6] 設定 sendmail Centos6上設定sendmail,基本上sendmail會設定多半是為了寄系統信和收垃圾信(喂!!?)

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

[Win7] 燒錄 iso 檔 在Windows7 中內建燒錄程式,可以直接把檔案拉到光碟機裡,再執行燒錄。

世紀帝國征服者新版本--被遺忘的帝國 世紀帝國征服者新版本--被遺忘的帝國 世紀二代的征服者是精典遊戲中的精典,aofe更好玩...

[PHP] 檢查檔案是否是圖檔 使用getimagesize函數檢查檔案是否是圖檔

精讚的版面變化 ▓此文僅作為舊文的記錄▓ 這篇文章為了紀念改版完成而撰寫。 原本的部落格是民國97年的作品,那時還是用舊有的技術來寫,很

海棉寶寶超泡杯演奏的sweet victory 章魚哥和海棉寶寶在超泡杯的演奏歌曲