Page 1 of 1

Need Quick & Dirty Mail Server Install on Ubuntu

Posted: Sat Sep 06, 2008 1:31 pm
by jack_indigo
I have Ubuntu workstation Hardy Heron 8.04. I was using Hula as my mail server for doing PHP mail testing, but it had a fault in that it would stop working every time I rebooted (and would fail to start without reinstallation!) and also had a fault where Hardy Heron doesn't come with it in its package list.

I just need a quick and dirty mail server that I can fire up with the least amount of valuable brain cells (because they're focused on my PHP code right now) and where I can test sending and then see that the mail was received properly. It doesn't need all the other bells and whistles, and if there's something even at command line I can use to cat out the output to see that the mail arrived, then that can work too.

So, what do you recommend that's super easy?

And no, I don't want to use Gmail. I mean, I may end up hitting this mail server over and over again as I test a contact form, and I don't want to get banned by Google.

Re: Need Quick & Dirty Mail Server Install on Ubuntu

Posted: Sat Sep 06, 2008 5:17 pm
by jack_indigo
This works on Ubuntu 8.04:

From CLI: apt-get mailx
From PHP: mail()
From CLI: cat /var/spool/mail/www-data

There, it's about as simple as it can get.

Re: Need Quick & Dirty Mail Server Install on Ubuntu

Posted: Sat Sep 06, 2008 6:08 pm
by jack_indigo
Instead of cat-ing or tail-ing the /var/mail/www-data file, you can do:

chmod 1777 /var/spool/mail

...and then pick up any mail sent to root@localhost from your PHP programs by using Thunderbird's Unix MoveMail feature. Just set it for your own personal account, such as jack@localhost, and it will automatically grab the mail you send to root@localhost.