Error with email notifications - Mantis 1.0.1

Get help from other users here.

Moderators: Developer, Contributor

dsavercool
Posts: 20
Joined: Apr 10, 2006 11:45 am

Error with email notifications - Mantis 1.0.1

Post by dsavercool »

I receive this error when Mantis attempts to send an email notification.

SYSTEM WARNING: fsockopen() [function.fsockopen]: unable to connect to 192.168.1.102:25 (Permission denied)

I had migrated from an old Linux install and Mantis version 19.2 to a newer Linux with Mantis 1.0.1, I can't figure out why I receive the above error.

olas
Posts: 4
Joined: Apr 11, 2006 8:48 am
Location: Harstad, Norway

Post by olas »

Seems like your mail server (192.168.1.102) don't accept yor connection. Maybe you need a username and password for it? If you have, maybe it's the wrong username and password?

dsavercool
Posts: 20
Joined: Apr 10, 2006 11:45 am

User Authentication

Post by dsavercool »

I can't seem to find where to define the name and password.

Narcissus
Developer
Posts: 338
Joined: Feb 17, 2005 4:45 am

Post by Narcissus »

Assuming that the server requires a SMTP username and password, and that it is accepting connections from your Mantis server, you need to set $g_smtp_username and $g_smtp_password in your config_inc.php file.

Hope that helps!

dsavercool
Posts: 20
Joined: Apr 10, 2006 11:45 am

re:

Post by dsavercool »

Narcissus wrote:Assuming that the server requires a SMTP username and password, and that it is accepting connections from your Mantis server, you need to set $g_smtp_username and $g_smtp_password in your config_inc.php file.

Hope that helps!
Attempting to define those in my email variables of the config_inc.php file does something funny. After saving the changes all of the pages come up blank in the browser.

Narcissus
Developer
Posts: 338
Joined: Feb 17, 2005 4:45 am

Post by Narcissus »

If you post your config_inc.php file to me via private message, I can have a quick look for you...

dsavercool
Posts: 20
Joined: Apr 10, 2006 11:45 am

phpmailer and php includes folder

Post by dsavercool »

Okay, after taking a break from this issue I am tackling it again.

It tells me to put the class.phpmailer.php and the class.smtp.php files in my php includes path from my php.ini file. However, my php.ini file includes path line is semi-coloned out. Also I searched my system and there is no include or includes directory anywhere, and attempting to make one and specifying it in my php.ini file causes my server pages not to respond or load.

Also please let me know if you want more information to better assist, this is killing me. Some additional info - php v5

Help!

thraxisp
Developer
Posts: 509
Joined: Feb 13, 2005 10:38 pm
Location: Ottawa, Canada
Contact:

Re: phpmailer and php includes folder

Post by thraxisp »

dsavercool wrote:Okay, after taking a break from this issue I am tackling it again.

It tells me to put the class.phpmailer.php and the class.smtp.php files in my php includes path from my php.ini file. However, my php.ini file includes path line is semi-coloned out. Also I searched my system and there is no include or includes directory anywhere, and attempting to make one and specifying it in my php.ini file causes my server pages not to respond or load.
Our code handles this directly. threr's no need to add this.

I would suspect one of the following:
- the address or port is wrong,
- the address is not accessible (try to ping it),
- you can't make connections outside the web server (possibly if you are running SELinux)
--
Glenn Henshaw Logical Outcome Ltd.
Mantis developer and user w: http://www.logicaloutcome.ca

dsavercool
Posts: 20
Joined: Apr 10, 2006 11:45 am

RE: phpmailer and php includes folder

Post by dsavercool »

I'm able to browse the web on this machine and the mailserver I'm attempting to use is an internal server. I'm running Fedora Core 4 with the prepackaged version of PHP that came with it. The readme file in /core/phpmailer states that you should copy those files into those paths, are you saying it should have done that by itself?

Help!

dsavercool
Posts: 20
Joined: Apr 10, 2006 11:45 am

Another tidbit

Post by dsavercool »

Receive this error when running the email test in the admin folder no matter what mail server I specify (I have a few to try)

SYSTEM WARNING: fsockopen() [function.fsockopen]: unable to connect to 192.168.1.102:25 (Permission denied)

Narcissus
Developer
Posts: 338
Joined: Feb 17, 2005 4:45 am

Post by Narcissus »

From your web server, are you able to telnet to port 25 on the mail server?

At least by doing this, you'll be 99% sure if it's your web server (answer, "yes") or your mail server or network (answer "no")...

dsavercool
Posts: 20
Joined: Apr 10, 2006 11:45 am

Re

Post by dsavercool »

When attempting to run the command "telnet 192.168.1.102" it says connection refused. I'm diving deeper without wearing the correct gear here.

Any ideas?

Narcissus
Developer
Posts: 338
Joined: Feb 17, 2005 4:45 am

Post by Narcissus »

You probably actually have to use:
telnet 192.168.1.102 25

(that's a space between 192.168.1.102 and 25). If you don't specify the port number (25) it defaults to 23.

See if that makes a difference at all...

dsavercool
Posts: 20
Joined: Apr 10, 2006 11:45 am

Re:

Post by dsavercool »

That worked, it said

Connected to 192.168.1.102
Ready to be Spoken to here

And it gave me a cursor


Also I have set SELinux=disabled in my selinux/config file
Last edited by dsavercool on Apr 27, 2006 3:14 pm, edited 1 time in total.

Narcissus
Developer
Posts: 338
Joined: Feb 17, 2005 4:45 am

Post by Narcissus »

OK, so that means that there's no network problems...

The error is coming from PHP itself, as it's being restricted in what it can do (not so much Mantis or PHPMailer).

Just out of curiosity, what distribution are you using? I just read here that Fedora uses SELinux which might need to be disabled.

Other than that, someone else might have a clue...

Post Reply