Linux Mail 放在 /var/mail/username, username 多大, 信佔用的容量就多大, 檔案裡面有多封郵件的話, 要如何做分割?
使用 formail 來切分 Linux Mailbox 郵件
formail 是 mail (re)formatter, 可以將信件分割切開, 下述為一些簡單紀錄.
- 安裝: sudo apt-get install procmail
- 郵件分割語法:
$ cat $MAIL | formail -ds sh -c 'cat > msg.$FILENO'
- 註: $MAIL = /var/mail/username, 為 Bash 系統預設變數.
相關網頁
java - How to split mailbox into single file per message?
相關
Thunderbird 新版都使用 snap 安裝,所以路徑有修改,實體路徑可見此篇:Ubuntu …
在「My_Note-Unix」中
Domain 申請下來後, 其中一件事情就是要架設 Mail server, 然後開啟幾個預設帳號,…
在「News-Technology」中
突然想到來做做擋信. 信箱使用 clamav 來掃毒. 再用 procmail 來擋信. 有點怕從此…
在「OS-Linux_BSD」中