Qmail not sending mail

Hello. I had not been here at this forum for years now, that proves Interworx is so good beacuse the first time I came here was 10 years ago and I have been using Iworx since then. Now I have an issue I had never experienced.
In a clean install recent installation qmail refuses to send any mail, I have checked the obvious but I cannot pinpoint the reason why it will not send any mail, messages just sit on the mail queue but they never get sent, I have tried the “process” button and I have purged several times the queue with no results, tried also installing and reinstalling qmail through yum, restarting smtp, and since I have another iworx box I compare the settings and I cannot find any differences that could make qmail refuse to handle my emails.
Is there any settings I should be aware of, a check list of things I should verify or any other help? Using the “Send A Test Message” form sends the messages to the queue but they do not get delivered either.
Any help will be highly appreciated.

Hi justme

I hope you don’t mind, and I’m sure you’ve check but is the firewall open for outbound email.

Also, have you checked your logs for errors

Is your DNS correct

Do you have IPv6 at all

Can you telnet to your server to check for SMTP good response

What distro are you using and what IW version are you using

Is this a VPS or dedicated

Did you install qmail from IW repository

If the server is not in production, I’d be tempted to do a full clean install

Many thanks

John

Many Thanks for your response John.

is the firewall open for outbound email. => Open, I double checked configuration comparing to another working iworx box (TCP in and out open port 25)

Also, have you checked your logs for errors => I have checked /var/log/smtp . I could not spot anything unusual to my untrained eye apart form a guy trying to break into the server like 20000 times with no luck for him.

Is your DNS correct => I reckon it is, it is the same configuration and zones I was using in my previous box. What exactly should I look for?

Do you have IPv6 at all => Not at all

Can you telnet to your server to check for SMTP good response => I think so, I get a response: 220 i2763 InterWorx-CP SMTP Server ESMTP

What distro are you using and what IW version are you using => centOS 6, IW 5.0.18

Is this a VPS or dedicated => Dedicated

Did you install qmail from IW repository => I got the server with preinstalled iworx on a clean CentOS, so I guess yes. I did try reinstalling qmail from iworx repository (yum reinstall qmail), it changed nothing.

If the server is not in production, I’d be tempted to do a full clean install => Yes, that was my thought, the server is now in production but I could try that, Will I need a clean OS reinstall? or Will it be enough if I rerun the Iworx installer again?

Any ideas and opinions are very welcome.

Hi justme

Many thanks, from your post I can see port 25 is open inbound, can you ssh into server and telnet out to another SMTP server

The log you need to check is send not SMTP. Also, you may want to install BFD and maldect, which should help protect your server and help keep it clean.

Can you ping or dig an outside domain from ssh, if so, if think DNS is correct

IPv6 - if not used I would disable it from network ifeth1 I think from memory, but I’d need to look it up on one of our servers and you add line IPv6=disabled I think, but I’ll post tommorow after checking if alright. Reason for this is if IPv6 is in use, including loop back then qmail used IPv6 before IPv4 and outbound fails.

If you mass transferred siteworx accounts over, then it’s possible that there is a difference in IP in host or other areas perhaps. For qmail, ssh into server and cd ~iworx\bin then run qmail-repair.pex. If it’s ip related issue, then there’s a pex for that but I’d rather wait to see if any reason shown in send log first.

I personally would always do a full distro and IW install as clean minimal myself, but it’s a user preference.

I hope that helps and please update with your send log, or portions of it if you don’t mind

Many thanks

John

Hello John and Thank you again. [I]

can you ssh into server and telnet out to another SMTP server[/I]

As a matter of fact I can’t :

[root@i2763 ~]# ssh -p25 rumple@X07.150.1X8.84
ssh: connect to host X07.150.1X8.84 port 25: Connection timed out

I am able to telnet that server from other different computers.

[I]The log you need to check is send not SMTP.

[/I]Absolutely, there’s a bunch of errors like this, one for each message sent to qmail:

@4000000055e23b4507d06b6c status: local 0/10 remote 1/255
@4000000055e23b5407c22afc delivery 16: deferral: Sorry,I_wasn’t_able_to_establish_an_SMTP_connection.(#4.4.1)/

Can you ping or dig an outside domain from ssh, if so, if think DNS is correct
Yes, I can. No problem in that department.

From this information, I think it might be a dns problem of some sort I cannot figure out.
This is how my etc/hosts file looks, in case it helps:

[B]127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
X6.1X4.2X7.6X i2763

127.0.0.1 localhost

[/B]And this is how my resolv.conf looks:

[B]nameserver 208.67.222.222

[/B]However, in a different iworx box which does work, resolv.conf looks like this: [B]

nameserver 127.0.0.1

[/B]After trying that and restarting services I still keep receiving the same error: “Sorry,I_wasn’t_able_to_establish_an_SMTP_connection.(#4.4.1)”

Any ideas?

Hi justme

Many thanks, and the error is what I thought it might be as shown in your send log - cannot connect

I’m sorry, you cannot test SMTP using ssh, it fails. You would need to install mailx or telnet or similar. I like telnet, so you should be able to yum install telnet, then run telnet commands as you have been.

If telnet is not recognised as a command, you would need to yum install telnet-server, which also installs xnite I think from memory, but you would need to edit telnet then and enable it, but I believe just installing telnet should be fine. If it’s not, please let me know and I’ll post exact details you need to make it work.

As the issue is cannot connect, it usually is either DNS or port block, which if testing using telnet, should give you a good idea, ie does it resolve and can it connect

However, your Ping is good outbound so I’m thinking a port block.

Does your server pass through another firewall, if it does, can you check that it is allowed for outbound port 25. If it’s standalone on firewall, can you stop port 25 outbound from nodeworx and then start port 25 outbound from nodeworx. This should reset the firewall for port 25, or you could just add in from ssh and restart iptables

Then test and post your result

Your resolv.conf, can you set to 8.8.8.8, but any DNS or localhost should work, but this depends upon how you setup your network etc.

I hope that helps

Many thanks

John

Please do not laugh, I have sent a message to my ISP asking them to check on any restrictions on port 25, a very long one explaining the problem and what we have been doing during the weekend, 30 seconds later, here’s their response:

[I]hello,

The Port 25 block has been removed.[/I]

Thank you John, I really appreciate the time you have dedicated to solve this issue which could have been solved quickly by dropping a message to my ISP.

Hi justme

Glad you resolved it and thanks for posting.

If you have not setup BFD already, you may want to as it saves server time/resources, and if you run word press sites, justec posted a good rule which helps stop repeated attempts to login to WP admin

Many thanks

John