LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 06-25-2004, 01:21 PM   #1
doublehelixer
LQ Newbie
 
Registered: Jun 2004
Posts: 9

Rep: Reputation: 0
sendmail and apache on same machine


I am the IT administrator for a small multimedia-oriented company (less than 10 employees). I currently run apache, php4, and mysql on our RH8 linux server and have been very happy with its performance. Primarily we run a secure "extranet" for our clients on this machine so they may access project media files remotely, but overall the server does not see very heavy traffic usually. We have been having some problems lately with slow and unreliable email service provided to us from our ISP, however, and we're interested in bringing this service in-house. My question is this: Are there any serious security or performance concerns involved in running IMAP/sendmail on our apache webserver box? This is an all-SCSI, 1gHz intel machine with 512 MB RAM and a synchronous DSL connection, so I feel like it has the HW resources necessary to fulfill the task, but it seems to me that conventional wisdom dictates having webservers and mailservers run on separate machines. Can anyone explain to me why this is an issue (if it really is)? Much obliged for any insight.
 
Old 06-25-2004, 01:25 PM   #2
czarherr
Member
 
Registered: Sep 2003
Location: Suwon, Korea
Distribution: Slackware 14
Posts: 288

Rep: Reputation: 32
Sendmail doesnt have any serious performance issues, but glaring security problems. I recommend qmail, fast, secure, in fact, 500$ has been offered for some time to anyone who can find a security hole in qmail itself and no one has gotten it. Also, do the routine checks for rootkits, hackers, etc. If the machine is using more resources than usual, something is wrong, check out your logs.
 
Old 06-25-2004, 04:06 PM   #3
doublehelixer
LQ Newbie
 
Registered: Jun 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for the recommendation. I've heard alot of good things about qmail, so I'll definitely check it out. Other than sendmail's shortcomings though, can you think of a compelling reason why having my webserver and mailserver cohabitate would be a bad idea? If I can avoid having to buy & support a whole extra machine it will make me and my boss alot happier!
 
Old 06-25-2004, 04:14 PM   #4
linuxmarc
Member
 
Registered: Jun 2004
Posts: 44

Rep: Reputation: 15
I'd suggest looking at your file system to make sure you've got everything partitioned right. As long as you keep things in order you should be fine.

You'll run into problems if you partitioned wrong and a large amount of spam fills up your file system or something like that.
 
Old 06-25-2004, 06:11 PM   #5
doublehelixer
LQ Newbie
 
Registered: Jun 2004
Posts: 9

Original Poster
Rep: Reputation: 0
I figured I'd need to add more drivespace since it's limited now. I'll be sure to bear that in mind while I divvy it up, thanks. I think I need a bigger tape drive too!

I'm glad to know it's a viable plan, at least. I don't even have the physical space to fit another whole machine, but the box I have does have some room to grow.

Thanks for all the advice. Getting actual help from real humans is a huge part of what I love about linux. Cheers.
 
Old 06-25-2004, 09:03 PM   #6
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Well Sendmail is actually fairly slow (beyond the horrible security problems), compared to Qmail and especially Postfix. The tests we've done with Qmail and Postfix on Linux show that Postfix is significantly faster. Postfix also has very simple configuration and the stock install is very functional, unlike Qmail where you have to install 16 or so patches before it's really suitable for use.

The main problem you're likely to have by combining other services with e-mail is the significant I/O penalty of IMAP. Since IMAP connections are persistent and constantly polling all the on-server folders, you have constant disk I/O, which can cause severe thrashing if you have other things trying to access the disk too (like file downloads via HTTP). I would highly suggest putting the mail spool on it's own physical disk.
 
Old 06-25-2004, 10:09 PM   #7
bughead1
Member
 
Registered: Jul 2002
Posts: 78

Rep: Reputation: 15
There in lies the beauty of pop3. Oh, I know, IMAP has its advantages, but a pop3 mailserver for ten employees can be set up on a 486SX, and if you're comfortable with the protocol, and if pop3 will do what you need, you'd probably never notice any performance hit on that 1 GHz web server.
 
Old 06-26-2004, 01:02 AM   #8
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Yes POP3 is a much more gentle on resources, but it's not CPU usage, it's I/O. You get I/O bound either physically by the disk, or by the bus interface. If you have a server that is bogged down by too many IMAP connections, putting in a faster CPU won't help at all. Putting in a faster disk--or even better, multiple disks (for the spool)--will significantly increase performance.
 
Old 06-26-2004, 12:03 PM   #9
bughead1
Member
 
Registered: Jul 2002
Posts: 78

Rep: Reputation: 15
Quote:
Originally posted by chort
Yes POP3 is a much more gentle on resources, but it's not CPU usage, it's I/O. You get I/O bound either physically by the disk, or by the bus interface. If you have a server that is bogged down by too many IMAP connections, putting in a faster CPU won't help at all. Putting in a faster disk--or even better, multiple disks (for the spool)--will significantly increase performance.

Agreed. My point being that POP3 is gentle on disk I/O as well, so much more so than IMAP that an ancient machine with slow IDE channels can easily handle a relatively large number of users if POP3 instead of IMAP is used.

Depending upon how "tech savvy" the users are (and in a small "multimedia-oriented" company, they may be very competent) there are some ways around the IMAP approach of leaving everything on the server.

If they can live with that, POP3 on that low traffic webserver is unlikely to have any real impact on performance.

Last edited by bughead1; 06-26-2004 at 12:05 PM.
 
Old 06-28-2004, 08:39 AM   #10
doublehelixer
LQ Newbie
 
Registered: Jun 2004
Posts: 9

Original Poster
Rep: Reputation: 0
My main reason for leaning towards IMAP was to simplify backup of email storage, which is at present is a clunky, convoluted process at best, as each workstation now just uses POP to access our ISP's mailservers individually and stores its email locally.

I can definitely give the mail spool it's own disk(s), although if I split this over two or more disks, is that a function of the MTA on a user-by-user basis or would I do this at the filesystem level?

Also, I will need to be running a handful of virtual domains on this machine, so I'm curious if that gives either Qmail or Postfix an edge either way?

As always, much obliged for the input!
 
Old 06-29-2004, 06:57 PM   #11
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
If you use maildir for storage, then it's pretty easy to split up mailboxes over multiple disks. If you use the mbox style, then you'll most likely need software RAID to split it up.
 
Old 06-30-2004, 04:55 PM   #12
doublehelixer
LQ Newbie
 
Registered: Jun 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks chort! I appreciate all the guidance
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail slowing down my machine.... haora Linux - Newbie 4 03-14-2005 10:15 AM
Sendmail - Can I make sendmail think its a different machine? Thorkyl Linux - Networking 7 01-05-2004 06:19 PM
Sendmail - hiding the name of the machine deepeyes Linux - Software 6 07-25-2003 08:01 AM
Sendmail on a cripled machine georgeh Linux - Software 7 04-03-2003 05:13 PM
sendmail relay through another machine? ifm Linux - Software 2 08-01-2002 01:19 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 01:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration