I just installed OSQA at qa.iggsandbox.com and everything seems to be working properly, but it won't send emails. I've configured the email settings in the admin dashboard (same settings as we use in our email clients), checked and double-checked them, even tried configuring a Gmail account there instead. The test email button doesn't report an error, but no emails are ever received. django.osqa.log says:

/opt/osqa/forum/utils/mail.py TIME: 2012-01-12 11:48:46,637 MSG: mail.py:create_and_send_mail_messages:89 Email sending has failed: [Errno 111] Connection refused

I've read through the other questions & answers on this board regarding email configuration and haven't turned up any useful information. I have debugging turned on; is there some way I can at least get more information about the problem? Any help would be appreciated here, thanks.

We're running CentOS 5 with Python 2.7, Django 1.3.1, and OSQA Fantasy Island Beta 3.

asked 12 Jan, 11:58

igg_jon's gravatar image

igg_jon
26114
accept rate: 0%

edited 12 Jan, 13:24

We're having the same problem on our server. Has anybody been able to configure this successfully and can share how to?

(23 Jan, 14:47) IA_OSQA

From your Administrator control panel, goto 'Email Settings' and check your settings. If you are using localhost, then make sure your CentOS server is running the SMTP sendmail service and the port 25 is open.

Step 1. Check if Sendmail is Running for which execute the following command :

ps ax | grep sendmail

If you get the output something like this

1846 ? Ss 0:13 sendmail: accepting connections
1850 ? Ss 0:00 sendmail: Queue runner@00:15:00 for /var/spool/clientmqueue
1855 ? Ss 0:00 sendmail: Queue runner@00:15:00 for /var/spool/mqueue

Great Your Copy of Sendmail is Running OR Type the command in the terminal

/etc/init.d/sendmail start

You can see Sendmail Starting

Starting sendmail: [ OK ]

Step 2. Next Step is to check Sendmail Listening IP:port. Listening IP:Port is nothing but the IP address and port number on which sendmail has started and will accept mails other than which connection would be refused. To Check enter the following:

[root@techy ~]# netstat -tnlp | grep sendmail

If You Get the resultant as this

tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 1846/sendmail: acce
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1846/sendmail: acce

Good !!! Your sendmail is ready to accept connection on all the interfaces of your machine. Here “0.0.0.0:587” is Sendmail Mail Submission Port and “0.0.0.0:25” is used to Send mail to External SMTP Source. IF You Need to make sendmail listen on specific port you need to change the sendmail.mc and Build a new Sendmail.cf which we would cover in the Sendmail Configuration Part.

Sendmail.mc : It is the macrotized Version for sendmail configuration
Sendmail.cf : IT is read by Sendmail Deamon to perform task.

BY Default Sendmail Does not allow mails to be relayed to external sources. We need to make sendmail configuration to perform such tasks. In this example we’ll send mail to local user which is “root”

Step 3. Now the Final Steps is to check if Mail are sent properly We’ll use Telnet if you are not familiar with telnet don’t worry just copy the code and it will do the magic for you.

[root@techy ~]# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 techy.bounceme.net ESMTP Sendmail 8.14.3/8.14.3; Tue, 12 Jan 2010 23:29:14 +0530
mail from:support@linuxmaza.com
250 2.1.0 support@linuxmaza.com... Sender ok
rcpt to:root@localhost
250 2.1.5 root@localhost... Recipient ok
data
354 Enter mail, end with "." on a line by itself
subject: My First Test Mail Using Sendmail.

This is First Paragraph.
.
250 2.0.0 o0CHxEYV022243 Message accepted for delivery
quit
221 2.0.0 techy.bounceme.net closing connection

Once You receive the final Message accepted for delivery. Now the sendmail works.

Again check if the OSQA is sending out emails. It should.

link

answered 24 Jan, 22:55

onrequest's gravatar image

onrequest
11
accept rate: 0%

Thanks, this is very helpful. As it turns out, sendmail is not installed at all; our server uses exim instead. Is there any way to have OSQA use exim, or do I need to figure out how to configure sendmail to run alongside exim?

Update: I continued with your directions, substituting exim for sendmail, and I was able to connect to the mail server via telnet and send a message. I used the same connection settings that OSQA has, but OSQA is still unable to send emails. Any further thoughts?

(02 Feb, 13:35) igg_jon
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×98
×10

Asked: 12 Jan, 11:58

Seen: 703 times

Last updated: 02 Feb, 13:42

powered by OSQA