Ubuntu and XAMPP w/ mail server

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Ubuntu and XAMPP w/ mail server

Post by alex.barylski »

I have installed the XAMPP for Linux on Ubuntu Dapper Drake? 6.10)

Everything works awesome, FTP, HTTP, etc...

But I cannot send emails using mail() and I need to test that functionality now...

Can someone tell me what might need tweaking in order to get PHP mail() working - I assume it's my SMTP server not configured properly?
User avatar
dibyendrah
Forum Contributor
Posts: 491
Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:

Post by dibyendrah »

what Mail server are you using ?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

None that I am aware of, whatever comes default with Ubuntu/Debian?

I haven't started one...to the best of my knowledge - so i can't test PHP scripts which use mail() and so on...its what I"m trying to figure out :P
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

You'll need to install a mailserver, "sendmail" is the most common - but some argue not the best.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Jenk wrote:You'll need to install a mailserver, "sendmail" is the most common - but some argue not the best.
hey man, thats fine...but ummm...I dunno how :? :oops: :P

sendmail is fine...as it's only a test server...so long as I can test mailing functionality it's all good :)
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Here's the sendmail website: http://www.sendmail.org/

Though you will be better off using Postfix, as that is the sanctioned default mail server according to this page: https://help.ubuntu.com/6.10/ubuntu/ser ... vices.html

(which also has installation and configuration instructions)
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

Postfix is much better IMO when compared to sendmail. For the main reason of ease of configuration. It uses 'apache-style' configuration directives and inheritance, whereas sendmail... heh well, just look at some example config files and you'll see...

Though, you will need to talk to your isp regarding them blocking your email ports. Most ISP's are blocking all email access other than their own. So, if you want to either receive incoming mail on your box, or send outgoing mail via your own smtp server (as opposed to your isp's) you'll have a tough time with it.
User avatar
dibyendrah
Forum Contributor
Posts: 491
Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:

Post by dibyendrah »

First install the package sendmail by following command if you're using Ubuntu/Debian linux.
Before that, see if you have active repository to fetch the package in

Code: Select all

/etc/apt/sources.list
After that, use

Code: Select all

$apt-get update
then

Code: Select all

#apt-get install sendmail
Then, comes the configuration part which you can read at :
http://www.sendmail.org/doc/sendmail-current/cf/README

Configuration has to be done basically on following files :

Code: Select all

/etc/mail/access
/etc/mail/sendmail.mc
Then m4 macro has to be executed to configure sendmail from following command :

Code: Select all

m4 ${CFDIR}/m4/cf.m4 config.mc > config.cf
Also, virtusertable table must be configured as well. It's tough though interesting.
Manual will be a best handson for you to do this stuff.

Dibyendra
User avatar
dibyendrah
Forum Contributor
Posts: 491
Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:

Post by dibyendrah »

There are other mail severs like exim, POSTFIX qmail and each of them has their own configurations. POSTFIX is similar to sendmail.
Post Reply