Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
im trying to install a mail server for mail purposes
the entire process seems alot more complex than i thought but this is something i need.
right now all i think that i have really figured out is the correct BIND DNS entry for a mail server (MX) is... (but i dont know for sure if this is right, i changed the name of the domain because id prefer this post not show up by googling my site name)
mydomain.com. IN MX 10 mail.mydomain.com.
now i also had sendmail installed i coudlnt figure it out and make it work. so now i'd like to install qmail and try it because i heard its easier.
i also beleive in order to foward the mail to be downloadable by mail clients like thunderbird and outlook i need something like procmail?
i would just like someone to explain what i need for this to happen. im very confused.
btw this is for CentOS 4 (if theres specific versions i need for CentOS 4 could you please post them also)
I set up a mail server once with this walkthrough. It's basically step-by-step you can't go wrong.
Once you've done that and you have a better understanding of where everything goes and how it all works it's much easier to set up a different system yourself. After doing that I set up Postfix + courier-imap on two other computer very easily, it's just getting over the initial hump of understanding how everything works together
I haven't used qmail, but I've seen a few referrals to www.qmailrocks.org, so this may help.
Along with what cs-cam said, I use Postfix, and it's really a very simple setup. Postfix (as is Sendmail, and I'd guess qmail) is a mail transfer agent (MTA). It simply receives email (usually on port 25) and delivers it somewhere (typically a user's mailbox or the recipient on the net, but it can do other things too - see following paragraph, or to a fax, another mail server, whatever).
Programs like procmail and maildrop confuse things a bit, but typically thay receive mail from, say, Postfix and deliver it to a mailbox. Postfix/Sendmail can do this to, but procmail/maildrop allow you to apply all sort of delivery rules. For example, I sort mail into various subfolders at the server level rather than setting up rules in Outlook or similar.
However, mail clients like Evolution, Outlook, etc, need a server to read mailboxes and deliver the mail to the client. Various protocols exist, two of the most common are POP3 (which is probably how you would connect to you ISP with a mail client now) and IMAP. With POP you typically download the mail, and the client stores it (think about Outlook using .pst files for example), whereas with IMAP, you leave the mail on the server and simply read it with the client. I prefer the latter, because I can read all my mails from any machine on the network, back up mail easily and use utilities like squirrelmail as a web mail client.
So what you will need is and MTA (you say you have Sendmail already, although from my brief experience with it it's way less intuitive to configure than Postfix) and an IMAP and/or POP server. I use Dovecot, and it serves both POP and IMAP. Both of these programs work pretty much out of the box with only minor config changes (domain names, etc.).
The nice thing about Postfix is that if/when you decide to add spam and virus checking, it's pretty simple. I recall Sendmail being rather more difficult, but then I know a lot more now than I did back then.
One utility to remember is something called fetchmail. If you have a mail account with you ISP, fetchmail can grap it (usung POP3) and put it into your mail system via port 25 for delivery.
On the MX side, I'm no expert, but hopefully whatever name server you are using to serve your domain name should have an option to set up a mailserver record (basically a user friendly way to enter the necessary MX record(s).
If you are interested, have a look at www.postfix.org, there are plenty of howtos for any number of setups, from the most basic, to ldap authentication, virus checking, spam, the works.
Good luck
Last edited by billymayday; 07-24-2006 at 11:06 PM.
just out of curiosty, is there a reason i should choose postfix over qmail? right now i have my eyes set on qmail but it seems the two repliers both use postfix
right now i have dovecot and postfix installed. but not working and i can't figure out why.
i have the user admin on my system and when i try to email him from a different email (like my ISPs email i have) i just get a "returned mail: see transcrift for details" thing sent back to me. and i can't figure out why
In response to your question of why Postfix over Qmail, in my case the answer was simple - Fedora comes packaged with Sendmail and Postfix, so when I wanted to change from Sendmail, it was already there. Not a great reason, but to be honest, I like Postfix. Doesn't mean I wouldn't like Qmail.
I think this is one of those questions like "whish distro". It all depends on who you ask, and at the end of the day, I'm sure all the maor MTA's are very good.
On the issue of Postfix/Dovecot not working, given the ease of setup, I'd suggest it's something fundamental (your idea of DNS may well be correct) that won't be fixed by changing MTA's.
Send the admin an email, and post the output from your maillog. It's generally a very informative file.
Qmail is rock solid. The http://qmailrocks.org mentioned twice above is worth it's weight in gold, particularly for someone new to linux, as it walks you through everything (maildrop, spamassassin, clamav, squirrelmail) step by step, with exact commands to issue to the server. I have nothing against postfix or sendmail, but as a newbie, you'll probably have a much easier time with the qmailrocks way of doing things.
As to the DNS issue, you most certainly have a problem with it. If DNS was working and the mailserver wasn't, you'd get a refused message, or a message that it sat in the queue too long and ddelivery failed. The message you get is:
Quote:
Host unknown (Name server: mail.mydomain.com.: host not found)
That means either -
1) You don't have a MX record for mydomain.com
2) You don't have DNS delegated for mydomain.com
3) You don't own mydomain.com
I've been on the BIND (Berkely Internet Name Daemon, DNS) mailing list for a long time, and something that happens all the time is somebody will post with a problem, and do exactly what you did, which is to hide the domain name. By doing that, you make it difficult for anyone to help you. Giving out the domain name isn't going to cause problems. If I knew that mydomain.com = abcdefg12345.org, then I could tell you exactly what was happening on the DNS side.
So in any case, if you can't get the DNS straight on your own, post the real name and we can track that down in less than 30 seconds. As to the mail, do whatever works for you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.