[精讚] [會員登入]
284

[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

你可能感興趣的文章

[Centos8] 安裝及設定docker docker 是一個應用程式的容器,相對於vm是作業系統的容器。此篇整理基本安裝及設定。

[Centos8] 校時ntpdate? 以前常用的ntpdate,在centos8竟然不見了?

[Rocky9] codeignitor4+ nginx+ php8.1-fpm + docker compose 這次的目標是把服務裝在docker,裡面放入 nginx 和 php8.1-fpm的 docker container, 並採用codeignitor4。

Linux ext3 系統下刪除檔案救回全記錄 今天一個不小心,下了 rm 的指令,從此奮戰一個下午,終於把檔案救回來,以下是全記錄...

SELinux 常用指令和檔案 在Redhat系列中,Centos5以後加入了selinux,他並沒有這麼可怕,不必每次看到Selinux ,就想把他

[Centos7] selinux 修改網頁連線的埠號 想把網頁改到非標準的80埠,在selinux上要如何修改?

我有話要說

>>

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

訪客留言

[無留言]

隨機好文

沒有非誰做不可的事,也沒有不可被取代的人 沒有非誰做不可的事,也沒有不可被取代的人

安裝SPHINX支援中文 新版本的 sphinx 和舊版不同,網路上很多範例和教學是不能用的。此文是安裝和設定方法分享

TFTP Server 安裝及使用 讓設備的網路設定檔或是韌體經由TFTP拷備出來,操作的方法

[AS3] 我做的唯一一個Flash As3遊戲UFO INVADSION [AS3] 我做的唯一一個Flash As3遊戲,是第一個也是最後一個,後來就沒再寫as3,不過as3還滿好玩的。

正則表達式:Email名稱防止連續輸入點(.)及下底線(_) Email的名稱中要允許特殊符號,但又不允許連續出現的正則表達式