LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-02-2011, 07:12 AM   #1
hydraMax
Member
 
Registered: Jul 2010
Location: Skynet
Distribution: Debian + Emacs
Posts: 467
Blog Entries: 60

Rep: Reputation: 51
postfix: virtual mailbox domains


I'm setting up a new postfix installation. This go around, I am purposefully trying to utilize virtual mailbox domains, because I don't want any of the mail users to have actual UNIX accounts on the system. I think most everything in the Virtual README makes good sense, but I was hoping for clarification on a few points:

1. What uid/gid should I use for virtual_uid_maps and virtual_guid_maps? It looks like the system already has a mail:mail account/group (8:8). Can I just use that, or do I need to create another account/group? (say, vmail:vmail)

2. Likewise, what should be the user:group and the permissions of mailbox base directory which I presumably must create? (/var/mail/vhosts) These are the permissions of /var/mail:

Code:
# ls -lh /var/mail -d
drwxrwsrwt 2 root mail 4.0K 2011-05-18 08:05 /var/mail
3. I want all the system mail (stuff for root, localhost, etc.) not to get dropped in a UNIX account, but to be dropped in one of my virtual mailboxes (my personal e-mail account for the domain). Do I specify that in /etc/aliases, or in the virtual mapping file?
 
Old 12-03-2011, 12:19 AM   #2
hydraMax
Member
 
Registered: Jul 2010
Location: Skynet
Distribution: Debian + Emacs
Posts: 467

Original Poster
Blog Entries: 60

Rep: Reputation: 51
Sigh... evidently, of all the thousands of system admins at LQ, I am the first one to create virtual mailboxes with postfix.

Fortunately I was able to figure it out on my own, or partly so.

1. I found a postfix tutorial for Gentoo: http://www.gentoo.org/doc/en/virt-mail-howto.xml. It indicated that a vmail user should be created with

Code:
useradd -d /home/vmail -s /bin/false -m vmail
2. This isn't actually necessary because postfix will create the directories for you. Or, at least, it did for me. I had set virtual_mailbox_base = /var/mail/vhosts, and the /var/mail directory was already created by the system. The virtual mailbox directories won't be created immediately, but as soon as mail arrives for a domain, it creates the appropriate directories and assigns them to vmail:vmail with appropriate permissions.

3. This worked out a little differently then I expected, because the myorigin variable was set to $mydomain, so sendmail appends the domain name to mail normally directed towards root. So, I just added another entry to my vmailbox map pointing from root@<mydomainname> to my personal account. And this seems to work fine, at least according to my sendmail tests.

Last edited by hydraMax; 12-03-2011 at 12:20 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] virtual mailbox: separate domains, non-unix accounts Sum1 Linux - Server 3 05-03-2014 08:16 AM
Postfix Virtual Mailbox Domains vs DNS ? cviniciusm Linux - Server 1 09-26-2010 09:43 AM
virtual mailbox with postfix shafey Linux - Networking 0 07-19-2006 02:16 AM
Courier-imap and Postfix Virtual Mailbox Domains ahSyd Slackware 0 05-26-2006 07:04 AM
postfix virtual mailbox namit Debian 1 12-16-2005 02:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration