Connecting Joomla to an SMTP can be difficult with a fresh install on a new server. Detailed are many steps which may or may not impact your particular environment but are all worth trying to resolve any issues you may be having.
These steps are detailing a Joomla 1.5.17 install onto a dedicated Centos 6.3 linux web server connecting to a Microsoft Exchange Server to send SMTP email.
You may have to use sudo or sudo -u root depending on how your server is setup to execute many of these commands.
Is sendmail installed? Is it the latest version?
- Get sendmail installed
Check what version of Sendmail is installed on your box
rpm –qa sendmail
Update to the most recent version.
sudo yum install sendmail
You may also need this to create your cf file
sudo yum install sendmail-cf
- Get sendmail running
You may have to shut down postfix because you can’t have sendmail and postfix running at the same time
sudo /etc/rc.d/init.d/postfix stop
Or
sudo service postfix stop
Next you should make sure that the sendmail service is running
sudo service sendmail restart
Then check it’s status
sudo service sendmail status
You want to see something like this:
sendmail (pid 15687) is running…
sm-client (pid 15696) is running…
Make sure sendmail starts up if your restart your box
sudo chkconfig sendmail on
Are your Configuration Settings Correct?
- /etc/mail/sendmail.mc
Replace this line in sendmail.mc
DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1 Name=MTA’)dnl
with
DAEMON_OPTIONS(`Port=smtp, Name=MTA’)dnl
You may have to define this host as well:
define(`SMART_HOST', `yourSMTPserverDomain')dnl
Save the file and restart sendmail again
Can Httpd send emails?
Check your email settings here:
getsebool -a | grep mail
if httpd_can_sendmail is off then you will have to run this command to turn it on. It will take a minute so just wait.
sudo -u root setsebool -P httpd_can_sendmail on
Restart sendmail again and make sure it’s running.
- Try sending a test email:
/usr/sbin/sendmail youremail@gmail.com
-> Press Enter
Type: ”Subject: test”
-> Press Enter
Type ‘.’
-> Then press enter again
Setup you Server in the Joomla back end Admin Console
Site -> Global Configuration -> Server
- Try sending a test email through the Joomla back end admin console:
Then you can send a test email using: Tools -> Mass Mail.
Other problems?
Having trouble finding files?
Use this command to find files:
find / -name 'filename'
If you have any other problems check the mail logs:
sudo tail -f /var/log/maillog




