SquirrelMail is an open source standards-based webmail package written in PHP. When installed, SquirrelMail is ready out of the box. All it needs is an installed web server like Apache, SMTP server like Postfix, and IMAP server like Dovecot.
Here are the installation guides for Postfix and Dovecot.
Starting the Web Server

1. If you did not add Web Server and squirrelmail during installation, you can add it now. Using the Package Manager tool, add the Web Server package in the Servers category. Also add the optional package squirrelmail located in the Mail Server package under the category Servers.
2. Start the httpd service. Learn how to start and stop services here.Testing SquirrelMail



2. In the address box, type in http://localhost/webmail and press Enter. Type in a valid username and password and click Login.
If you encounter any problems, check the log file at /var/log/maillog.
Locating SquirrelMail into the domain root
By default, SquirrelMail is located in the /webmail of your domain. If you prefer to access SquirrelMail from the root of your domain, follow the steps below.


<VirtualHost *:80> DocumentRoot /usr/share/squirrelmail </VirtualHost>
If you are using SSL and you want to force users to use SSL, add the Redirect directive inside the VirtualHost section to redirect browsers to the secured version. See the example below.
redirect permanent / https://mail.acme.local

2. Restart the httpd service. Learn how to restart services here.Related Pages
***
Posted on 4/23/2007 and last updated on 10/11/2008
Filed under CentOS 5 , Red Hat Enterprise Linux 5 , SquirrelMail
ShareThis






September 12th, 2007 at 2:33 am
what should i do so that those user using the email like yahoo, google and etc can send email to my localhost mail?
September 14th, 2007 at 3:10 pm
Here’s how they usually do it
1. They get a static internet address from an internet service provider.
2. They purchase a domain name like this one, “linux-mail.info”, from a domain name registrar.
3. They setup a dedicated machine available 24 hours a day 7 days a week to serve as the mail server. This machine is usually called “mail”. The machine name plus the purchased domain name will give you the fully qualified domain name (FQDN). Ex. “mail.linux-mail.info”. This site will help you setup this mail server using the best free and open source software.
4. They add an MX (Mail Exchange) record containing the static internet address and FQDN into the DNS (Domain Name System) database using a tool provided by the domain name registrar.
5. Finally, they register a reverse DNS for the static internet address and FQDN with the internet service provider. This is an anti-spam measure. Otherwise, some sites will not accept mail coming from your server.
That’s it. If this sounds too costly or too complicated and you really need your own email address, I suggest you get an email hosting service. This would be cheaper and will spare you a whole lot of trouble.
October 3rd, 2007 at 8:20 pm
The webmail is not working for me, I get:
Error connecting to IMAP server: localhost.
13 : Permission denied
What’s wrong?
October 6th, 2007 at 4:28 am
You probably did not disable SELinux. Leaving SELinux enabled causes a lot of problems including this one and disabling it does not make your system any less secure.
December 12th, 2007 at 6:05 am
Good reference for build linux as mail server.
I already setup my own family mail server use this manual. There is 1 more problem that i still cannot figure out with my webmail using squirrelmail ? How can the squirrelmail user change their password.
t.Q
December 13th, 2007 at 2:58 pm
Ok, I’ve added a SquirrelMail Change Password Howto.
January 14th, 2008 at 4:06 am
gr8 work u’ve share here .. i got my mail server ran with flying color
thanks for this detail tutorial .. work for me.
btw any chance that u update it to work with user registration. i couldn’t find it anywhere ..
March 17th, 2008 at 3:03 pm
ERROR:
ERROR: Connection dropped by IMAP server.
Query: CAPABILITY
i disabled firewall and SELinux..
Please help.. thnx…
March 17th, 2008 at 5:27 pm
I was able to replicate your problem by removing the write permission to the mailbox specified in mail_location. Please check the file /var/log/maillog, it will describe the exact problem. In my case, it showed
dovecot: chdir(/home/johndoe) failed with uid 500: Permission denied
March 18th, 2008 at 11:12 pm
I tried all of the walkthrough so far (from the “home” portion of this site.) I was able to send mail using telnet, and was able to send to outside addresses, but when I try to send mail to myself using squirrelmail (and only squirrelmail), nothing appears in my inbox. What can I do about this?
Info:
OS: Fedora Core 8
Machine: VMware v.6.0.2 virtual machine
Any insights would be appreciated…
Aaron Thompson
March 18th, 2008 at 11:27 pm
Please try out SquirrelMail again and post the last few lines of /var/log/maillog. The log might give us a clue on what the problem could be.
March 18th, 2008 at 11:44 pm
just somw help if one is running SELinux, that changes need to be made as SELinux blocks access
Need to run this command
setsebool -P httpd_can_network_connect=1
March 19th, 2008 at 1:00 am
Thank you for reminding me of the log. I have found the fix to the problem: the mydomain and myhostname variables were not defined in main.cf of postfix. The server was rejecting a connection to itself because it didn’t know what it was supposed to be accepting.
And for the record, I always disable SELinux, its features are not worth the trouble it causes.
Thanks for the suggestions!
Aaron Thompson
March 19th, 2008 at 10:01 am
my maillog
Mar 19 18:00:23 localhost dovecot: IMAP(lhan): Unknown client workaround: outlout-idle
Mar 19 18:00:23 localhost dovecot: child 6213 (imap) returned error 89
Mar 19 18:00:23 localhost dovecot: imap-login: Login: user=, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
March 19th, 2008 at 11:54 am
outlout-idle should be outlook-idle in dovecot.conf
March 27th, 2008 at 12:41 pm
sir,
give me url to download the webmail server and Mail scanner
March 27th, 2008 at 6:54 pm
The link and instruction for MailScanner is found here. For the webmail server, I suggest you follow the above instructions because it will automatically download all the dependencies.
April 28th, 2008 at 1:10 am
Just need clarification. When setting up an email server, do we still need to run a DNS server (BIND, MyDNSConfig, etc.)? When you purchase a domain to registrars, don’t they give an MX record for you? Thank you so much..
April 28th, 2008 at 10:19 pm
No need, the registrars do provide an MX record.
April 28th, 2008 at 11:55 pm
Do I still need to contact the my registrar and ask for my control panel? Do I still need other informations or knowing my domain is enough. Thanks sir.
April 29th, 2008 at 12:02 am
Your registrar should provide you with a control panel. I have tried out HostMonster and Network Solution and both provided control panels.
April 29th, 2008 at 1:23 am
Our ISP is the one controlling our mx records. I just called a while ago and they said they are the one who will do the configuration. What should i tell them if i have this “mydomain.com” and i want to create another mail server which is named “anothermail.mydomain.com”
April 29th, 2008 at 2:23 am
Tell them exactly that, you want to create another mail server which is at anothermail.mydomain.com and give them the ip address of anothermail.mydomain.com
April 29th, 2008 at 2:52 am
Thanks for everything sir… This site is really great. You’ve provides tons of information that a newbie needs.
I think we should create a forum for this. Linux will become stronger if we will build one..
April 29th, 2008 at 6:58 am
One more thing sir. Is it necessary to syncronize the mx record that my registrar has given me to my actual host name? This is because my ISP has not given me the MX record that I am asking. I still can’t receive emails coming from Yahoo and Gmail. I think it is because of the MX record issue.
April 29th, 2008 at 7:04 am
Yes it should be synchronized. And a reverse DNS (ask your ISP about this) on the host name should be registered. Otherwise, your mail server might be flagged down as a spam server.
April 29th, 2008 at 7:10 am
I still don’t get a reply from my ISP regarding my problem. I can’t wait to sit down without doing anything. I am now installing MyDNSConfig and I am planning to create my own MX record. Is this possible setup?
April 29th, 2008 at 7:15 am
No, because you still have to go to your ISP and ask them relinquish control of your domain. Visit http://www.checkdns.net/quickcheckdomainf.aspx to get information about your domain.
April 29th, 2008 at 7:49 am
Everything works great except to my mail server.
Message:
Error connecting to mail server mail.mydomain.com [202.x.x.x] port 25: Connection Refused.
Some of your MX do not work properly.
April 29th, 2008 at 7:59 am
So that’s the problem. A lot of things may cause this.
1. Is the IP address correct
2. Is the firewall opened for SMTP port 25
3. Is Postfix running
Use the
Test Postfix step but this time, try it from outside your network. If all else fails, you have to resolve this issue with your ISP.
May 5th, 2008 at 9:46 am
Everything is working perfectly.. Thank you so much!
I am managing a small network, I use ISA server 2000. I can access squirrelmail if i use a public ip address. When I test it inside my proxy, the clients behind ISA, http://www.mydomain.com/webmail is no longer accessible.. What could be the problem? Same is through with Mozill Thunderbird, I can access my mail server if i use public ip address but when I access my mail behind ISA, my mail server is no accessible again, this is my second problem..
Thanks…
May 5th, 2008 at 9:54 am
Everything is already working fine.. Thanks a lot.
I am using ISA server, my clients inside my network can’t access http://www.mydomain.com/webmail. Everything is working fine if I use public IP Address.
May 5th, 2008 at 10:04 am
What could be the problem if squirrelmail is not accessible from clients inside ISA server?
May 11th, 2008 at 3:36 am
I need to set up a relay server. I have a fixed IP and currently my mail server is being hosted outside.
My question is, how do I configure my relay mail server to fetch emails from my main mail server? We want to store our mails in our own relay server.
Appreciate the help. Thanks.
May 12th, 2008 at 3:51 pm
This is a job for Fetchmail http://en.wikipedia.org/wiki/Fetchmail
June 27th, 2008 at 9:32 am
the apache server is not restarting and when i type the command:
service httpd restart
the result is
stopping httpd failed
starting httpd failed
and if i try to start the apache from the localhost also dont work
September 16th, 2008 at 10:35 am
ERROR:
ERROR: Connection dropped by IMAP server.
Query: CAPABILITY
i disabled firewall and SELinux..
Please help.. thnx…
September 19th, 2008 at 4:04 pm
deltazero:
The last line of the code:
DocumentRoot /usr/share/squirrelmail
Has an error….
it should be:
That will fix it.
September 19th, 2008 at 4:10 pm
well that didn’t come through.
change the last line of the “VIRTUALHOST” line of code in sqroot.conf to :
/VIRTUALHOST
inside the brackets
September 19th, 2008 at 9:44 pm
Hi Kevin,
You’re right. The screenshot was correct but the text was wrong. I’ve fixed the text, thanks for pointing that out.
September 23rd, 2008 at 1:57 pm
Hi Sukhvinder,
Please check /var/log/maillog, it should give more information regarding the problem.