0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Maildir形式で運用する2つの方法

Last updated at Posted at 2014-08-06

届いたメールを /var/mail/username ではなく /home/username/Maildir/ に保存したい。
今までコピペでやってきたがようやく理解してきた。

環境: ubuntu14.04.1

方法1 : procmailを使わない

/etc/postfix/main.cf
- #mailbox_command = procmail -a "$EXTENSION"
+ mailbox_command =
+ home_mailbox = Maildir/

方法2 : procmailを使う

/etc/postfix/main.cf
  mailbox_command = procmail -a "$EXTENSION"
+ home_mailbox = Maildir/
/etc/procmailrc
MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR

動作テスト

動作テスト
mkdir -p $HOME/Maildir/new
mkdir -p $HOME/Maildir/cur
mkdir -p $HOME/Maildir/tmp

sudo service postfix restart

date | mail `whoami`
find $HOME/Maildir
mutt -f $HOME/Maildir
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?