EMail server setup: FC6+Postfix+Dovecot+Squirrelmail
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
EMail server setup: FC6+Postfix+Dovecot+Squirrelmail
I'm setting up a server for a small home network to bring mail and web hosting in house, but have gotten stuck part of the way. I have dovecot and postfix installed and running. I have already set up a local DNS server and it seems to be working okay:
If I send mail from the command line as root, it shows up in root's mailbox just fine:
# echo "test of a test" | mail -s "a test" root
# cat /root/Mailbox
From email@example.com Sat Jul 28 14:47:54 2007
Received: by mail.mydomain.org (Postfix, from userid 0)
id 2490CC404F5; Sat, 28 Jul 2007 14:47:54 -0600 (MDT)
Subject: a test
Date: Sat, 28 Jul 2007 14:47:54 -0600 (MDT)
From: firstname.lastname@example.org (root)
test of a test
When I log into the squirrelmail though, the INBOX is empty. This seems wrong. This same behavior also occurs for a non-root account (email@example.com).
When I send mail from the command line from a non-root account, all seems okay and the message is received fine (note that otherdomain.com is completely external to mydomain.org):
Notice that the sender address has "localhost" embedded in it address. In fact, the 3rd line above (for "postfix/pickup") refers to richard@localhost.
This led me to check on my host designations. I'm still new at networking details, so I may have made some mistakes here. Note that this server is my firewall and gateway for the rest of the network and so has two NICS: ethOUT (IP=yyy.yyy.110.54) and ethLOCAL (IP=192.168.xxx.115). As part of my testing, I lowered the firewall briefly to verify that it wasn't a factor. Finally, hosting of mydomain.org is actually currently elsewhere as I'm trying to set up to bring it in before I switch the public dns records: nonetheless, given the symptoms so far, I doubt that would be a contributing issue.
# uname -a
Linux poppa.mydomain.org 2.6.20-1.2962.fc6 #1 SMP Tue Jun 19 18:24:12 EDT 2007 i686 i686 i386 GNU/Linux
# uname -n
# hostname -a
So my questions:
1) why isn't Squirrelmail seeing the email in the user mailboxes?
2) why does sending through Squirrelmail embed localhost in the sender address?
Some ancillary questions:
3) is there anything that looks out of whack on my hostname setup?
4) if I don't do a # setsebool httpd_can_network_connect = 1, squirrelmail fails. I can make this permanent, but is that the right thing to do or is there a preferred way to more directly target Squirrelmail as an allowed script engine?
Sorry for all the quoted detail, but I'm at loss as to what is the likely culprit. Thanks for reading this far....
I have tried to set up KMail to read from both the root and non-root accounts through both imap and pop3. The imap won't connect, so that seems related to some security setting, but the pop3 connects but comes back empty. The pop3 behavior leads me to believe that there is a mismatch between where postfix sends the email and where dovecot expects to find it.
I don't know where to look for this discrepancy and it isn't obvious from the configuration files. If I can resolve the pop3 issue, it might simplify the imap issue.
Any advice? Is there a way to confirm my hypothesis on the mailbox mismatch?
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
You will have to set up someone in your sendmail's access file to send root's mail to. It won't allow "root" to log in and retrieve mail from that account. If you look in etc/mail for the access file, enter in someone (a valid user) to recieve root's mail, it should work just fine. Try that and repost.
It might have been obscured with all my description, but the issue with squirrelmail happens even with non-root accounts. The mailbox for a non-root account, firstname.lastname@example.org, accessed via POP3 comes up empty even though mail is sitting in /home/richard/Mailbox.
You will have to set up someone in your sendmail's access file to send root's mail to.
I'm running Postfix instead of sendmail. I found /etc/postfix/access but that doesn't seem to be what you're suggesting.
My server is now online and receiving mail from the Internet fine. Incidentally, I'm only the using DNS setup internally, my domain name provider is handling my public DNS records, so that part of my setup in my original post is not really relevant.