Fedora Linux Support Community & Resources Center
  #1  
Old 14th November 2011, 12:16 PM
Red Swift Offline
Registered User
 
Join Date: Jun 2011
Location: 3rd rock from sun
Posts: 12
linuxfedorafirefox
unix accounts with postfix's virtual hosts

Morning all! Can someone describe to me the use of user accounts with Postfix daemon when configured for virtual domain hosting?

Where do incoming emails go for each domain?
Do I have to have a user account strategy to store emails in their home directory?
<sigh>How will this user account work with Dovecot, sasl, ssl, etc?</sigh>

Would appreciate any pointers outside of the regular tutorials I've seen.
Reply With Quote
  #2  
Old 14th November 2011, 12:57 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 5,523
linuxopera
Re: unix accounts with postfix's virtual hosts

There's some older tutorials at freebsddiary.org that did the virtualhosts thing pretty well, IMHO, despite being from 2002 and of course, having a bit to do with installing on BSD rather than Linux. (For example, in FreeBSD, most things are in /usr/local, so where he says /usr/local/etc in Fedora it would be /etc.

There's a few good postfix tutorials, including ssl with dovecot on the CentOS wiki

http://wiki.centos.org/HowTos

Look for the section on email.

I'm not sure if any of these actually cover your situation, so, no guarantees on this one.
Reply With Quote
  #3  
Old 14th November 2011, 05:33 PM
Red Swift Offline
Registered User
 
Join Date: Jun 2011
Location: 3rd rock from sun
Posts: 12
linuxfedorafirefox
Re: unix accounts with postfix's virtual hosts

Nice smr54! The sites do have some good details and it's material I am familar with, thanks!
http://wiki.centos.org/HowTos/postfix
http://www.freebsddiary.org/

But how is your experience with user accounts and virtual domains? I would like to use as few user accounts on my Fedora system as possible. Yet this doesn't seem to be a feasible direction.

Do you know what to expect when I have system accounts and pop3/imap login accounts?
Reply With Quote
  #4  
Old 14th November 2011, 06:38 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 5,523
linuxopera
Re: unix accounts with postfix's virtual hosts

To be honest, I haven't done postfix with virtual domains in years, so I'm afraid I don't remember. Seems to me i have an ancient article of my own somewhere---ah, http://home.roadrunner.com/~computer...u/postfix.html
but a quick glance indicates that it doesn't cover that--I'm pretty sure, that back when I set it up, we didn't use the machine accounts.
Reply With Quote
  #5  
Old 14th November 2011, 07:33 PM
Doug G Offline
Registered User
 
Join Date: Jul 2005
Posts: 640
windows_7firefox
Re: unix accounts with postfix's virtual hosts

Check out ispconfig3 and how it configures postfix/dovecot on fedora. It sets up virtual domains and users using mysql. Incoming mail ends up in /var/vmail/<domain>/ in Maildir format. It works well, I use ispconfig3 for my own mail.
__________________
======
Doug G
======
Reply With Quote
  #6  
Old 14th November 2011, 07:58 PM
William Haller Online
Registered User
 
Join Date: Jul 2005
Age: 54
Posts: 1,084
linuxfedorakonqueror
Re: unix accounts with postfix's virtual hosts

I just set up a server with postfix, dovecot, SA, milter-greylist, and clamav. The only tricky part was figuring out a way to handle user aliases with procmail enabled. The trick I ended up using there was creating symbolic links from the alias to the real mailbox. There may be a better way, but that ended up working. This was on CentOS 6, but should be similar on Fedora since they are closer in sync now. We pull all information from a directory server with a script instead of using MySQL, but I'm sure that approach would work fine as well.

You only need one account for a vmail user/group using this approach. Just set up the right path to the home directory in their vmailbox so each user gets their own.

vhosts
--------
the domain name on one line

vmailbox
----------
user_real_name@domain domain/user_real_name/mail/
user_alias@domain domain/user_real_name/mail/


valias
-------
All the required mailing lists for the domain
list@domain user1@domain,user2@domain,user3@domain


vmailbox_uid
root@domain his_uid
@domain vmail's uid

same with the vmailbox_gid file

set up a network table with local networks, a black and white map, a mapping table for the local users (root@domain) to point to whoever gets the mail for that account, and you're set - in our case we pull all authentication from the directory server, including SASL auth for relay security, and map dovecot against the same thing. That way we just update the directory server with new account information and group updates and everything else authenticates against that. The other steps come from the online tutorials nicely but maybe this will save you a few steps.

Everything went smoothly here except for the procmail part - I ended up setting the mailboxes in that via $HOME/$DOMAIN/$USER/mail/ passing the information in via master.cf and at the end included the user procmailrc file for final processing. We have control over the contents of these but we use them for automated vacation processing messages so needed procmail to work. We also filter on some common SA outputs and redirect mail automatically to junk folders for some input mails via procmail.

Last edited by William Haller; 14th November 2011 at 08:00 PM. Reason: typo
Reply With Quote
  #7  
Old 15th November 2011, 01:06 AM
Red Swift Offline
Registered User
 
Join Date: Jun 2011
Location: 3rd rock from sun
Posts: 12
linuxfedorafirefox
Re: unix accounts with postfix's virtual hosts

Excellent posts everyone!
I can descrease the workload by refering to IspConfig; was not aware of this package.

Still, I will have a number of local accounts, at least one for each virtual domain, hmm. And using a different mda (e.g procmail) is fine with Postfix? Ok, I hope to discover why that is, as I would be comfortable using the internal mda to Postfix. Does high traffic volume require a change or is it the features of Procmail?

So Dovecot, when authenticating, won't be using system user accounts. That is a measure of relief, once I finish with experimenting using local files and move to database mappings with no additional uid/gid to manage.
Reply With Quote
  #8  
Old 15th November 2011, 02:02 AM
William Haller Online
Registered User
 
Join Date: Jul 2005
Age: 54
Posts: 1,084
linuxfedorakonqueror
Re: unix accounts with postfix's virtual hosts

I'd stick with the usual virtual mda - it works fine without any tweaking. If you need the functionality of procmail for automatic sorting of messages (we did) then it gets more complicated. Stick with the normal virtual delivery agent if possible. It is much faster for delivery as I understand it because procmail needs to configure the agent to just handle one message at a time.

Postfix will also reverse map a local user to appear to be coming from a virtual domain - see the smtp_generic_maps parameter.
Reply With Quote
  #9  
Old 15th November 2011, 07:18 PM
Doug G Offline
Registered User
 
Join Date: Jul 2005
Posts: 640
linuxfirefox
Re: unix accounts with postfix's virtual hosts

ispconfig3 only uses a single unix account for all email domains and users. Perhaps you looked at the older but still released ispconfig2 package. I have quite a few email domains and users on a single ispconfig3 fedora server, email runs entirely under a single vmail linux user account.
__________________
======
Doug G
======
Reply With Quote
  #10  
Old 16th November 2011, 12:07 PM
Red Swift Offline
Registered User
 
Join Date: Jun 2011
Location: 3rd rock from sun
Posts: 12
linuxfedorafirefox
Re: unix accounts with postfix's virtual hosts

Yes, that does appear to be the most desirable course. Especially after a poking and proding Postfix with different users and groupings; I have no more experiments for user setups.

No, I haven't looked at Ispconfig2 specifically, but I will before moving on to the latest version.

<shuffleDance>Ok! Great discussion and thanks for the suggestions</shuffleDance>
Reply With Quote
  #11  
Old 16th November 2011, 11:16 PM
Doug G Offline
Registered User
 
Join Date: Jul 2005
Posts: 640
windows_7firefox
Re: unix accounts with postfix's virtual hosts

Quote:
No, I haven't looked at Ispconfig2 specifically, but I will before moving on to the latest version.
Just to be clear, I don't think you want ispconfig2. ispc2 requires a unix user account for each mailbox. ispc3 uses virtual users for mailboxes.

The folks that created ispconfig3 have nice tutorials called "the perfect server ...' for different ispc and linux setups. Look for the perfect server tutorial for ispconfig3 on fedora 15 and you can see what yum packages they used for the ispc3 email configuration.
__________________
======
Doug G
======
Reply With Quote
Reply

Tags
accounts, hosts, postfix, unix, virtual

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Hosts under SSL voler Using Fedora 0 15th November 2008 09:41 AM
Sendmail: Virtual Hosts & Virtual Users ridetehpenguin Servers & Networking 7 2nd June 2008 07:57 PM
[Postfix] UNIX accounts DanceTrend Servers & Networking 0 28th December 2005 01:12 PM
virtual hosts ashiers Servers & Networking 23 17th November 2005 05:35 PM
SSI on virtual hosts sciguy125 Servers & Networking 0 8th September 2004 02:47 AM


Current GMT-time: 02:08 (Tuesday, 21-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Menomonee Falls - Barrancabermeja - Columbine