|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Theodore Knab (tjk
annapolislinux.org)Date: Wed Apr 24 2002 - 08:44:52 CDT
Wiese posted a mail about how Postfix could create virtual directories
on his list. This does not appear to be documented in the virtual 8 man page.
I am not sure if it is documented anywhere else, but the virtual man 8 page
should have an entry that states:
DESCRIPTION
The virtual delivery agent is designed for virtual mail hosting
services. Originally based on the Postfix local delivery agent,
this agent looks up recipients with map lookups of their full
recipient address, instead of using hard-coded Unix password file
lookups of the address local part only.
This delivery agent only delivers mail. [ If the mail directory does
not exist and the virtual agent owns the sub-directory, postfix
will create the mail directory. ]
features such as mail forwarding, out-of-office
notifications, etc., must be configured via virtual
maps or via similar lookup mechanisms.
In answering your question:
The only problem is that the virtual agent only creates the basic directory structure.
To be fair to Wiese, I think he had to make this generic so that it
could be used with the different IMAP servers. If they all functioned
the same, he would surely let postfix create all the generic folders,
like Trash, Sentmail, and Drafts. ;-)
To illustrate an example of how Postfix creates a mail directory. Let us
say we have the following directory structure:
drwxr-xr-x 4 root root 4096 Apr 18 12:36 .
drwxr-xr-x 14 root sys 4096 Mar 21 12:28 ..
drwxr-xr-x 2 root root 4096 Apr 3 11:01 lost+found
drwxr-sr-x 12 vmail vmail 4096 Apr 24 06:55 mydomain
imap-mail: cd mydomain
$ ls -la
drwxr-sr-x 12 vmail vmail 4096 Apr 24 06:55 .
drwxr-xr-x 4 root root 4096 Apr 18 12:36 ..
With these settings postfix will create the maildir:
imap-mail:/etc/postfix# id vmail
uid=1001(vmail) gid=1001(vmail) groups=1001(vmail)
from main.cf on imap-server
...
#after snap 200111210
virtual_uid_maps = static:1001
virtual_gid_maps = static:1001
...
I send tester2 a mail.
De-ki-a-ga-ri, Postfix will create this simple directory structure:
imap-mail:/var/imap/mydomain# ls -la
total 48
drwxr-sr-x 12 vmail vmail 4096 Apr 24 06:55 .
drwxr-xr-x 4 root root 4096 Apr 18 12:36 ..
drwx--S--- 3 vmail vmail 4096 Apr 23 18:45 tester2
imap-mail:/var/imap/mydomain/tester2# ls -la
total 12
drwx--S--- 3 vmail vmail 4096 Apr 23 18:45 .
drwxr-sr-x 12 vmail vmail 4096 Apr 24 06:55 ..
drwxr-sr-x 8 vmail vmail 4096 Apr 23 18:45 Maildir
imap-mail:/var/imap/mydomain/tester2/Maildir# ls -la
total 36
drwxr-sr-x 8 vmail vmail 4096 Apr 23 18:45 .
drwxr-sr-x 8 vmail vmail 4096 Apr 23 18:45 ..
drwx------ 2 vmail vmail 4096 Apr 23 18:52 cur
drwx------ 2 vmail vmail 4096 Apr 17 13:59 new
drwx------ 2 vmail vmail 4096 Apr 23 18:52 tmp
If you want Courier IMAP specific folders like Trash and Sentmail, they still need to
be created the manual way.
>is this a feature of Postfix? i haven't found it in the documentation
>anywhere, and this would save some account setup time if it works. i have
>been creating the accounts using a script which calls 'maildirmake' at the
>moment.
> if i could simply rely on postfix to create the maildir, this would
> certainly save some sysadmin time (as well as being more secure).
-
To unsubscribe, send mail to majordomo
postfix.org with content
(not subject): unsubscribe postfix-users
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]