• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 571
  • Last Modified:

Installing a new email server

I have RHEL5.4 server
I want to install a new mail server which has:
   1) Support for both smtp, and webmail.
   2) Can limit the number of messages per user.
   3) Can monitor the mail content for spaming and parental control
   And of course a free one.
   Any advice please?
3 Solutions
Use sendmail.  It comes with RHEL release.  The other native MTA is postfix which also comes with RHEL.
For webmail you can use Squirrel mail with it
For spam etc, there are numerous was, spam assassin is one.

All of this is free.
I'd recommend againt using sendmail.
Postfix/qmail I think are more modular and easier to manage/configure.

Ashraf-HassanAuthor Commented:
I have installed the postfix 2.3.3 from redhat site, but how shall I configure it?
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

How are you planing on managing the server?
webmin is one option?
Are you planing on using virtualdomain?
Are you looking at using an LDAP directory to manage the users as well as their email addresses, etc.
How many domains do you have for which this mail server will be used? How many users per domain are you looking to have?
/etc/postfix is the location for the configuration files.
Depending on the number of users, domains, mailboxes there are different ways to deal with it.  The postfix.org link has install/configuration instruction.
Mysql backend?


spamassassin, and other tools are options to deal with anti-spam mechanism ...
Ashraf-HassanAuthor Commented:
Well for my web server, I would like to :
    1- Manage it with with webadmin, and mysql dab.
    2- I have 5 domains each has 20 users.
    3- No I am not using the LDAP, but mysqpl DB.
So what do you advise?
Please see the links for linuxmail.info which provide a step by step guide including the various options.
Postfix admin is the tool referenced to manage he virtual users with mysql as the user/email database.
Ashraf-HassanAuthor Commented:
I have installed the postfix, and configured mysql as well installing the squirrelmail, and the mysql configuration, and when runing configtest.php, I get the following error:
Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:25 (Connection refused) in /squirrelmail/src/configtest.php on line 386

ERROR: Error connecting to SMTP server "localhost:25".Server error: (111) Connection refused

Any Help please?
Did you configure and start postfix?
is postfix running?
/etc/init.d/postfix status
/sbin/service postfix status?
lsof -i:25

Ashraf-HassanAuthor Commented:
It seems that postfix is running, but I can not find any log for it, I did the checks you asked and they are:
1- I have rebooted the server to make sure that everything is ok.
2- I checked all the mail agents running
# service postfix status
master is stopped
# service sendmail status
sendmail is stopped
3- I checked the that nothing is listening on port 25:
# netstat -a|grep smtp
4- I started the postfix
# service postfix start
Starting postfix:                                          [  OK  ]

# service postfix status
master (pid 3983) is running...
5- I checked now that there is something is listening on port 25:
# netstat -a|grep smtp
unix  2      [ ACC ]     STREAM     LISTENING     14694  private/smtp
unix  2      [ ACC ]     STREAM     LISTENING     14754  private/bsmtp
# lsof -i:25
6- I ran the squirrelmail configtest, but I got the same error:
Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:25 (Connection refused) in /squirrelmail/src/configtest.php on line 386

ERROR: Error connecting to SMTP server "localhost:25".Server error: (111) Connection refused
7- I tried from postfixadmin to send an email to an outside email server, but it failed

Any Help?
tail /var/log/maillog
You may have something else that is preventing postfix from binding to the port.

Squirelmail is an interface to access data, it is not a mail server configuration tools.

You need to configure sendmail or postfix, but pick one to be installed on the system (uninstall sendmail).
If you keep both, you have to make sure that /usr/sbin/sendmail points to the one that you want i.e. /usr/sbin/sendmail.org or /usr/sbin/sendmail.postfix.
ls -l /etc/alternatives/mta

get the process id for the running postfix:
lsof -p <process ID>
see what ports it is bound to.

this is where the port was/is altered

Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
Check out Zimbra

Zimbra Collaboration Server is the most capable open source email and collaboration suite available today. Far outstripping what is possible with simple open source mail servers, Zimbra provides organizations major productivity boosts with global address lists, shared calendars and document management on the web or offline with Zimbra Desktop. Support for standard protocols enables use of virtually any desktop client or device for added end user flexibility.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Tackle projects and never again get stuck behind a technical roadblock.
Join Now