Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Note: I'm on a debian 6 box.

I am currently using google apps for my smtp and i was thinking maybe i can put a smtp server on my box.

I am wondering if theres any google/simple package i can use? I seen tutorials that were monsters in size and i'm hoping for something more simple. I have a number of sites i'd like to have a few user accounts for each sites. The users do not have access to my box and i dont want users on my box to have smtp access. Is there a package thats simple to install that will let me add in sites and users. I'll be using this server to mail out a list (size unknown). I'd hate for it to bounce and i know i need to modify my records for this.

I was just wondering what the best solution is? I think sticking to google apps/gmail may be fine as i havent had any emails bounce and none of the information i need to hide from google (apps).

I'd still like incoming mail to go through google apps since i really like their search features. But... i guess i cant if i host my own smtp server? i'll also need imap or something for incoming? Is there a package that gives me both so i need to config my users/sites once?

share|improve this question
4  
What you're asking for isn't a simple thing. Being an email server sysadmin "for fun" (i.e. not for a compelling business reason) isn't a great idea. –  Evan Anderson Aug 11 '11 at 4:44
add comment

1 Answer

On debian, you just need to apt-get install postfix (I'm partial to postfix). Sounds like a simple install, you won't need any fancy pants mysql backend for that. For just a few users, this is not so bad a way to do things, but for many users, you'll want to start leveraging those complex installs you likely saw that include postfixadmin or some such vdomain manager, that helps with creating accounts. Unfortunately, it's actually easier if you'd accept having unix accounts for each mailbox. Remember, you can set such email accounts to the nologin shell to prevent ssh logins. Below, I have my quick and easy postfix with unix accounts. If you want a basic setup with virtual users too (users with no unix accounts on the box), follow postfix's own howto, it's really quite basic:

http://www.postfix.org/VIRTUAL_README.html#in_virtual_other

So, apt-get install postfix....

During the install, choose internet site as the type of configuration, and answer all questions accordingly, with special attention to "What other destination to accept mail for" I know it sounds counter-intuitive, but put only localhost here for now.

Now you setup postfix for multiple domains:

Create a file you'll use to tell postfix what local domains are. I'm a BSD guy in actual fact, so I like something like in /usr/local/etc/postfix/vdomains, but you can probably go with /etc/postfix/vdomains, or wherever the remainder of your config files will be. Regardless, it's in this directory you'll create a file that lists each domain:

site1.com
site2.org
blah.net

Next, create another file in the same location, say /usr/local/etc/postfix/vdomains/addresses :

site1.com          DOMAIN
me@site1.com       username
user2@site1.com    username2

site2.org          DOMAIN
you@site2.org      you

etc... (don't forget you can have @site.com to signify a catch-all, and you should have the standard email aliases for postmaster, abuse et al.. see RFC2142

The main points from here relevant to this type of setup is to have the following in main.cf:

mydestination = $myhostname, /path/to/file/with/domains
virtual_maps = hash:/path/to/file/with/addresses

of course there's other standard stuff you should easily be able to find on the intarwebs relative to how to setup postfix, no need to reinvent the wheel here.

Once you're done, run postmap /path/to/file/with/addresses and then postfix reload

share|improve this answer
    
Somewhere in here is the part where you wallow in spam. Lots and lots of spam. –  Evan Anderson Aug 11 '11 at 5:19
    
hmm, your answer doesn't appear to be scary but i do remember some problem with security/encryption (TLS and SASL i think). I'll try this out on my new box when i get it. –  acidzombie24 Aug 11 '11 at 6:52
    
Well, sounded like you were scared off by the added complexity of some comprehensive how-to's out there. @Evan Anderson points out this has zero spam/virus checking, much less any form of encryption. Honestly, if you require all that AND virtual users, you should look at the more complete setup. It's what I always use now anyway - but if you find that a bit much (and this is where he's also right to question whether or not you even want to toy with this as a "fun thing to do") you should just keep using google apps. –  sandroid Aug 11 '11 at 12:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.