Postfix Mailbox Changes |
Server Training - Mail Server | |
Mailbox Locations Changing mailbox locations is easy in Postfix. You may or may not want users to store mail in their home directory. You may or may not like mail stored in one large file. You have your choice with Postfix. Related Postfix Training 8 Week Course for $499.95 ORDER NOW
main.cf The defaults are in blue. Though they are commented out they are active.
# DELIVERY TO MAILBOX # The home_mailbox parameter specifies the optional pathname of a # mailbox file relative to a user's home directory. The default # mailbox file is /var/spool/mail/user or /var/mail/user. Specify # "Maildir/" for qmail-style delivery (the / is required). #home_mailbox = Mailbox #home_mailbox = Maildir/ # The mail_spool_directory parameter specifies the directory where # UNIX-style mailboxes are kept. The default setting depends on the # system type. #mail_spool_directory = /var/mail #mail_spool_directory = /var/spool/mail
Verify Mailbox Location It is important to understand where mail is going. Use this command to find the current location of the mail directory for the user. In this example you see that the user is accepting mail in the default location. This will be very handy for troubleshooting. set | grep -i mail MAIL=/var/spool/mail/mike MAILCHECK=60
MailBox Location: MBOX By default Linux will use MBOX as a method of creating a mailbox for each user. This location is at /var/spool/mail. After creating a few users here is an example: ls -la /var/spool/mail total 24 drwxrwxr-x 3 root mail 4096 Dec 18 00:10 . drwxr-xr-x 11 root root 4096 Dec 12 13:39 .. -rw-rw---- 1 mike mail 5292 Dec 18 00:13 mike -rw-rw---- 1 sue mail 2925 Dec 16 15:51 sue Notice that the two users each have a mailbox which they can pickup mail on the local system. Each user owns the mailbox and mail is the group. This is a Postfix default.
Change Location of Default Mailbox
Change Location of Default Mailbox to MailDir
cur new tmp
Copyright CyberMontana Inc. and BeginLinux.com All rights reserved. Cannot be reproduced without written permission. Box 1262 Trout Creek, MT 59874
|