Koozali.org: home of the SME Server

[SOLVED] qmail "unable to create remote"

Offline maicz

  • *
  • 26
  • +0/-0
[SOLVED] qmail "unable to create remote"
« on: October 17, 2011, 01:37:02 AM »
Hi! I have a fully working SME8b6 serveronly installation, that i use for 4 sites and relatives mails (i mean MX records registered), file server, dns and dhcp server.
Starting yesterday, no mail to external addresses is delivered, and no error message is send to user. Messages stucks in queue.
In fact, I've found that qmail isn't able to queue mails:

@400000004e9b67ab00124d8c new msg 22282633
@400000004e9b67ab001343a4 info msg 22282633: bytes 1163 from <my@address.lol> qp 24195 uid 453
@400000004e9b67ab0014c65c warning: unable to create remote/3/22282633

No updates has been installed since one month, and i really don't have work on this server in this period, so i don't kown what's happend!
I've double check the queue folder permissions, which seems AFAIK correct:

[root@sme ~]# cd /var/qmail/
[root@sme qmail]# ls -ld queue/ queue/remote/
drwxr-x--- 11 qmailq qmail 4096  3 ago 22:48 queue/
drwx------  3 qmails qmail 4096 17 ott 01:16 queue/remote/

I have NOTHING on my /var/qmail/queue/remote folder.
Then tried a signal-event reboot. Nothing happend.

Last info: Local mails are correctly delivered.

Do you have any suggestion?
Thanks so much.
« Last Edit: October 18, 2011, 01:08:22 AM by maicz »

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: qmail "unable to create remote"
« Reply #1 on: October 17, 2011, 01:55:10 AM »
maicz

Quote
Starting yesterday, no mail to external addresses is delivered...... Local mails are correctly delivered.

As you can send receive local mail but not external mail, maybe your ISP has blocked port 25.
Go to
http://www.grc.com
and do a port scan on your external IP/domain name to see what ports are open.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline maicz

  • *
  • 26
  • +0/-0
Re: qmail "unable to create remote"
« Reply #2 on: October 17, 2011, 09:29:22 AM »
Mary,
thanks for your hint.
I've checked and find that all ports are correctly forwarded by ISP, AND by my firewall. So I don't think is a problem of my connection.

A clarification: i'm able to send and receive locally. And i'm able to receive external mail. The problem is that i can't send externally because no queue is create in /var/qmail/queue/remote/*

There is a log where i can check WHY qmail can't copy messages in queue?


Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: qmail "unable to create remote"
« Reply #3 on: October 17, 2011, 03:03:28 PM »
Please report this as a bug in the bug tracker. Problems like this should be diagnosed and fixed, the bug tracker is the proper forum for this. Please report a reference to your bug in this thread for future readers.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: qmail "unable to create remote"
« Reply #4 on: October 17, 2011, 03:14:54 PM »
[root@sme qmail]# ls -ld queue/ queue/remote/
drwxr-x--- 11 qmailq qmail 4096  3 ago 22:48 queue/
drwx------  3 qmails qmail 4096 17 ott 01:16 queue/remote/

I have NOTHING on my /var/qmail/queue/remote folder.

If that is so (you haven't showed us), then you (or someone) has deleted the 23 numbered sub-directories which should be there. Running 'rpm -V qmail' will tell you that those directories are missing. Did you try to clear the remote queue using 'rm -rf'?

If that is the case, the easiest was to re-create those directories is to re-install the qmail rpm.

sv stop /service/qmail
rpm -Uhv --force http://www.mirrorservice.org/sites/mirror.contribs.org/smeserver/releases/7.5.1/smeos/i386/SME/RPMS/qmail-1.03-17.el4.sme.i386.rpm
sv start /service/qmail

Offline maicz

  • *
  • 26
  • +0/-0
Re: qmail "unable to create remote"
« Reply #5 on: October 17, 2011, 04:57:55 PM »
Charlie,
you are totally right.

Code: [Select]
[root@sme~]# ls -l /var/qmail/queue/remote/
totale 0

Code: [Select]
[root@sme~]# rpm -V qmail
missing     /var/qmail/queue/remote/0
missing     /var/qmail/queue/remote/1
missing     /var/qmail/queue/remote/10
missing     /var/qmail/queue/remote/11
missing     /var/qmail/queue/remote/12
missing     /var/qmail/queue/remote/13
missing     /var/qmail/queue/remote/14
missing     /var/qmail/queue/remote/15
missing     /var/qmail/queue/remote/16
missing     /var/qmail/queue/remote/17
missing     /var/qmail/queue/remote/18
missing     /var/qmail/queue/remote/19
missing     /var/qmail/queue/remote/2
missing     /var/qmail/queue/remote/20
missing     /var/qmail/queue/remote/21
missing     /var/qmail/queue/remote/22
missing     /var/qmail/queue/remote/3
missing     /var/qmail/queue/remote/4
missing     /var/qmail/queue/remote/5
missing     /var/qmail/queue/remote/6
missing     /var/qmail/queue/remote/7
missing     /var/qmail/queue/remote/8
missing     /var/qmail/queue/remote/9

But I don't know why and especially HOW, this occurs: I had some queue problems some time ago, but i have a Contrib for that (Qmhandle mail queue manager), so i don't need to run any shell command.

I'll try to reinstall qmail as your suggest this night.
Only one question: your rpm link point at one SMe 7.5.1 package, but mine is SME 8.0 b6. Is this correct?

Thanks for your prompt.

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: qmail "unable to create remote"
« Reply #6 on: October 17, 2011, 05:07:45 PM »
I think you can do in this way:

Code: [Select]
sv stop /service/qmail
rpm -e --nodeps qmail
yum install qmail
signal-event email-update
sv start /service/qmail

edit: added the signal-event step

should work, not tested
« Last Edit: October 17, 2011, 05:19:56 PM by Stefano »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: qmail "unable to create remote"
« Reply #7 on: October 17, 2011, 09:49:53 PM »
But I don't know why and especially HOW, this occurs: I had some queue problems some time ago, but i have a Contrib for that (Qmhandle mail queue manager), so i don't need to run any shell command.

File system corruption could lose those directories, but I'd consider that unlikely. It also doesn't seem like the thing that a malicious intruder would do to your system. So, a mystery. Someone running 'rm -rf' still seems most likely to me.

Offline maicz

  • *
  • 26
  • +0/-0
Re: qmail "unable to create remote"
« Reply #8 on: October 18, 2011, 12:56:39 AM »
Ok, mystery solved. You guys saved my server.
followed Stefano's commands. Just works. all folders have been restored. (Grazie!)
Then, messages were finally correctly queued.

But still mails were not delivered.

Code: [Select]
2011-10-17 23:06:32.447074500 info msg 22544406: bytes 1162 from <my@mail.asd> qp 7938 uid 453
2011-10-17 23:06:32.555822500 starting delivery 1: msg 22544406 to remote remote@mail.lol
2011-10-17 23:06:32.555846500 status: local 0/10 remote 1/20
2011-10-17 23:06:37.827103500 delivery 1: deferral: Connected_to_127.0.0.1_but_greeting_failed./Remote_host_said:_451_Could_not_auth_to_mail_server/
2011-10-17 23:06:37.840227500 status: local 0/10 remote 0/20

This is EXACTLY the issue i had months ago: one day i've found tons of mails in remote queue with this error. I fixed in some way SMTP auth with remote server and delete qmail queue (maybe i've remove "@domain.com" from username to auth). Having the appropriate Contrib, I don't remember to have done an "rm -rf" for this, but can't find different explanation.
Bad boy.
 
Now, i've follow yours suggestion here Charlie:
http://bugs.contribs.org/show_bug.cgi?id=4544#c17
Well done. Works like a charm!

I know, i should be ashamed, but would track this issue for future users.
Remains unclear why the server has continued to send for a while, from a few months ago until three days ago. I assure that server have sent mail in recent weeks. I think my ISP isn't very "clean"...

Thank you so much.