Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » A Linux problem

This thread is locked; no one can reply to it. rss feed Print
A Linux problem
Johan Halmén
Member #1,550
September 2001

We have this program at school, which keeps track of everything. Schedules, pupils, teachers, courses etc. It has a web interface and a desktop client program interface. The web interface is run on one Linux server, the actual database program is run on another Linux server. The latter one does all the heavy stuff, the web interface only, well, the web interface. So when certain action in the web interface causes e-mail notifications to be sent, the other program does the SMTP stuff. Then we have the e-mail server on yet another server machine.

The database program fails to send e-mail. It seems to fail to make a connection to the e-mail server, as if the firewall would block it. But when I send e-mail from the terminal of the Linux in concern, using telnet and HELO, the e-mail goes through the firewall. I fail to locate where the problem is. I'm responsible for the database program installation, but not for the Linux server. The database provider blames on the connections to the SMTP server. The guys responsible for the Linux server (and its connections to the TCP/IP world) blame on the settings in the database program.

After succeeding in sending e-mail from the Linux terminal, I begin to suspect the database program. Could I have missed something?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

bamccaig
Member #7,536
July 2006
avatar

  1. By "database program" are you referring to a DBMS or are you referring to a custom data layer service program?

  2. How is the email configuration stored, and what program is attempting to connect to the SMTP server?

  3. What is the terminal command that you are testing with and how does it relate to the "real thing"?

Derezo
Member #1,666
April 2001
avatar

There is usually a setting in the web server, such as php.ini, that directs the mail to the sendmail program or whichever SMTP service you're using. You may want to investigate that area [edit: by that area, I mean of your dbms software :)].

"He who controls the stuffing controls the Universe"

Gideon Weems
Member #3,925
October 2003

bamccaig said:

What is the terminal command that you are testing with and how does it relate to the "real thing"?

This is what I want to know, too. Without this information, I can only say to look at the usual suspects: running which msmtp (or whatever you're using) on both systems; permissions issues; opening up htop and switching to tree view, just to see what processes are spawned, whether any hang; et cetera.

Johan Halmén
Member #1,550
September 2001

bamccaig said:

By "database program" are you referring to a DBMS or are you referring to a custom data layer service program?

I guess it's more of a custom thing, especially when e-mail is concerned. Desktop computers in our intranet run client programs (Windows), which contact to this main program, which runs on a Linux server. I have no idea of how the actual datafiles are organized, but that is probably not relevant. The main program provides data and whatnot to the client programs that turn it into a Windows interface. The main program also has a data connection to the web interface server program.

Quote:

How is the email configuration stored, and what program is attempting to connect to the SMTP server?

The main program, which runs as a process on the Linux server, is the one connecting to the SMTP server. The firewall of the Linux server is open, enabling sending e-mail from the command line (telnet, HELO). The settings inside the main program have right IP and port for the SMTP, right sender and receiver data etc. Still the main program reports a "Connection failure".

Quote:

What is the terminal command that you are testing with and how does it relate to the "real thing"?

I start telnet in the Linux terminal. telnet has its own command line interface. Here: http://www.debianhelp.co.uk/mail.htm

The "real thing", the main program, asks for usual stuff in the settings. SMTP IP and port, sender and receiver e-mail addresses etc. That's all I know.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Derezo
Member #1,666
April 2001
avatar

Unless it's also connecting via telnet, which is a little unlikely, you'll need to install and configure an SMTP service like Postfix.

"He who controls the stuffing controls the Universe"

bamccaig
Member #7,536
July 2006
avatar

No need for a service. You could try a client like msmtp as a second verification that things are working, but that should be functionally equivalent to a telnet session. Won't hurt though. If that fails that's a good hint. Other things I can think of:

  • Perhaps the software thinks it should connect using a secure (SSL|TLS) connection whereas the server doesn't support it [on that port].

  • Perhaps there is an extra layer of security on the system, such as SELinux, and the process has the wrong context for the work that it's trying to do.

???

Johan Halmén
Member #1,550
September 2001

Bam, that makes a lot of sense. Too bad I'm not the one responsible for all that. But I shall discuss that with the right guys.

Everything we tested today implies that the db program is faulty. The mail server receives something, probably just the quitting handshaking. But most of a complete e-mail package simply doesn't come through.

<edit />

Problem solved.

bamccaig said:

Perhaps the software thinks it should connect using a secure (SSL|TLS) connection whereas the server doesn't support it [on that port].

It was this. But with a twist. Instance A in one register had a setting not to use SSL. Instance B in same register had a setting for using SSL. I had everything set up for using instance A. But instance A had one particular status off (kind of an archive flag on), which made the program look for any other instance in the register, and it found instance B and used those settings. I complained to the software provider that a program simply cannot do things like that.

Not only that. Everything had to be restarted to make the settings active. That is, I set up the settings inside the client program. Then I have to quit the program and restart the server program for the settings to become active. It's impossible to read the settings inside the client program, if they don't tell the actual status. Restarting the server will interrupt at its worst one hundred users on the web interface and maybe 20 users on the client programs. Not anything you do regularily.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Go to: