Koozali.org: home of the SME Server

Email not sending internally???

gobdob

Email not sending internally???
« on: September 16, 2004, 06:26:44 AM »
Hello,

I have recently setup E-Smith for a small network.  Currently the server doesn't have access to the internet, but I have setup webmail for all the users in the LAN.  They were able to send email to each other, but all of a sudden it doesn't work!

The emails gets queued and doesn't get sent.  I have installed qmhandle to see the queue better and I have tried forcing a resend of the queue using qmhandle but it still doesn't work.

I have cleared the queue completely and tried resending just one email, but it immediately goes into the queue?  Does anyone know what went wrong?

Your help is greatly appreciated!

flee

Offline smeghead

  • *
  • 563
  • +0/-0
Email not sending internally???
« Reply #1 on: September 16, 2004, 07:23:24 AM »
.. go to this site:

http://www.qcc.ca/~charlesc/software/queue_repair/index.html

and get a copy of the queue_repair script.

It does a good test of the mail setup and can repair many probs that may occur if you wish.

HTH
..................

gobdob

Email not sending internally???
« Reply #2 on: September 16, 2004, 04:50:46 PM »
Thanks Smeghead,

I'll definitely give this a try.  I'm kinda baffled why all of a sudden it started doing this.  I think it could be tied into a power outage I had that knocked the SME server down.  However, I've never had this problem before...

By default, does SME come installed with Python b/c the queue_repair script requires it.

I'll keep you posted...

flee

Offline smeghead

  • *
  • 563
  • +0/-0
Email not sending internally???
« Reply #3 on: September 16, 2004, 05:46:17 PM »
yep, python already there.

Just d/l the script & run ./queue_repair.py, review the results and then rerun with appropriate switches to fix any probs found.

HTH
..................

Paolu

Email not sending internally???
« Reply #4 on: September 17, 2004, 12:02:24 AM »
I also have the problem with the queue, but I have a problem using the script.  The documentation says that you should quit qmail first, my problem is that I don’t know how to do that.

Any help is really appreciated.

/Jakob Zimmermann

Offline raem

  • *
  • 3,972
  • +4/-0
Email not sending internally???
« Reply #5 on: September 17, 2004, 01:58:20 PM »
/etc/init.d/qmail stop
/etc/init.d/qmail start
/etc/init.d/qmail status
...

gobdob

Email not sending internally???
« Reply #6 on: September 19, 2004, 12:27:46 AM »
Thanks for your help Smeghead.

I tried the queue-repair, but it wasn't the problem.  After looking more closely at the qmail logs, this was the problem and solution:

http://forums.contribs.org/index.php?topic=22434.0

--------

I was altering the permissions of the home drives on the system and didn't realize that would have caused the problem.

--------

After viewing the qmail logs, there was some weird messages and I'm not sure what they mean.  I don't think there's any wrong with the mail server now (ie. All users seem to be able to send/receive internally now)

Here's part of the log file:
-------
.
.
.
@40000000414cac1015a2bc04 status: local 2/10 remote 0/20
@40000000414cac1015a2bfec delivery 639: success: forward:_qp_6005/did_0+0+1/
@40000000414cac1015a2c3d4 status: local 1/10 remote 0/20
@40000000414cac1015a2c7bc end msg 3653718
@40000000414cac1017852fd4 delivery 640: success: did_1+0+0/
@40000000414cac1017853b8c status: local 0/10 remote 0/20
@40000000414cac1017853f74 end msg 3653719
@40000000414cac6916f7dc24 warning: trouble opening local/8/3653719; will try again later
@40000000414cace516f7c0cc warning: trouble opening local/8/3653719; will try again later
@40000000414cad6116f7c0cc warning: trouble opening local/8/3653719; will try again later
@40000000414caddd16f7ebc4 warning: trouble opening local/8/3653719; will try again later
@40000000414cae5916f7d83c warning: trouble opening local/8/3653719; will try again later
@40000000414caed516f7cc84 warning: trouble opening local/8/3653719; will try again later
@40000000414caf5116f7c0cc warning: trouble opening local/8/3653719; will try again later
@40000000414cafcd16f7e3f4 warning: trouble opening local/8/3653719; will try again later
@40000000414cb04916f7e00c warning: trouble opening local/8/3653719; will try again later
@40000000414cb0c516f7bce4 warning: trouble opening local/8/3653719; will try again later
@40000000414cb14116f7c4b4 warning: trouble opening local/8/3653719; will try again later
@40000000414cb1bd16f7e00c warning: trouble opening local/8/3653719; will try again later
------

Your help is greatly appreciated!

flee

Offline smeghead

  • *
  • 563
  • +0/-0
Email not sending internally???
« Reply #7 on: September 19, 2004, 02:40:27 PM »
ahh, just goes to show that with more info about what had been done previously (messing with perms) then problem diagnosis is that much simpler; its a shame we can't all be this wise with foresight instead of hindsight :-)

BTW - if your messing with perms be careful as some get reset on cetain system events; if the changes need to be permanent then check to see if it can be done with a custom template mod.
..................

gobdob

Email not sending internally???
« Reply #8 on: September 20, 2004, 06:16:43 AM »
Quote from: "smeghead"
ahh, just goes to show that with more info about what had been done previously (messing with perms) then problem diagnosis is that much simpler; its a shame we can't all be this wise with foresight instead of hindsight :-)

BTW - if your messing with perms be careful as some get reset on cetain system events; if the changes need to be permanent then check to see if it can be done with a custom template mod.


Thanks for the advice!  I didn't know that me messin' with the perms could cause such a ruckuss!  Glad it all worked out at the end though!  Learned a few things in the process.

Question, regarding the weird message I got:

Quote

@40000000414cac6916f7dc24 warning: trouble opening local/8/3653719; will try again later
@40000000414cace516f7c0cc warning: trouble opening local/8/3653719; will try again later
@40000000414cad6116f7c0cc warning: trouble opening local/8/3653719; will try again later
@40000000414caddd16f7ebc4 warning: trouble opening local/8/3653719; will try again later
@40000000414cae5916f7d83c warning: trouble opening local/8/3653719; will try again later
@40000000414caed516f7cc84 warning: trouble opening local/8/3653719; will try again later
@40000000414caf5116f7c0cc warning: trouble opening local/8/3653719; will try again later
@40000000414cafcd16f7e3f4 warning: trouble opening local/8/3653719; will try again later
@40000000414cb04916f7e00c warning: trouble opening local/8/3653719; will try again later
@40000000414cb0c516f7bce4 warning: trouble opening local/8/3653719; will try again later
@40000000414cb14116f7c4b4 warning: trouble opening local/8/3653719; will try again later
@40000000414cb1bd16f7e00c warning: trouble opening local/8/3653719; will try again later


Do you know what this means?

flee

Offline smeghead

  • *
  • 563
  • +0/-0
Email not sending internally???
« Reply #9 on: September 20, 2004, 07:00:31 AM »
Quote
@40000000414cac6916f7dc24 warning: trouble opening local/8/3653719; will try again later
@40000000414cace516f7c0cc warning: trouble opening local/8/3653719; will try again later
@40000000414cad6116f7c0cc warning: trouble opening local/8/3653719; will try again later
@40000000414caddd16f7ebc4 warning: trouble opening local/8/3653719; will try again later
@40000000414cae5916f7d83c warning: trouble opening local/8/3653719; will try again later
@40000000414caed516f7cc84 warning: trouble opening local/8/3653719; will try again later
@40000000414caf5116f7c0cc warning: trouble opening local/8/3653719; will try again later
@40000000414cafcd16f7e3f4 warning: trouble opening local/8/3653719; will try again later
@40000000414cb04916f7e00c warning: trouble opening local/8/3653719; will try again later
@40000000414cb0c516f7bce4 warning: trouble opening local/8/3653719; will try again later
@40000000414cb14116f7c4b4 warning: trouble opening local/8/3653719; will try again later
@40000000414cb1bd16f7e00c warning: trouble opening local/8/3653719; will try again later


Ok, when mail is received it is processed by qmail to decide if it belongs here and if so to whom.  Part of this process involves passing the mail through the qmail spooler.  The info above refers to these spool folders and the message files inside them.

Qmail uses inherited file permissions (Set User ID bit) to get permission (via the qmail-queue program) to write the messages to the users mail folder. If it looks up the wrong perm for a user (cos ya changed it) then it can't process the mail for this user; if you look at /var/qmail/bin/qmail-queue you will notice an 's' in its perms.

This is a somewhat crude and basic explanation of what happens (as I know only the basics of how the mail system works) but is generally correct, there are far more knowledgeable qmail bods out there that are welcome to correct me if I am wrong :-)


(I should write this stuff up in some kinda FAQ as I seem to post about this stuff all the time)
..................

gobdob

Email not sending internally???
« Reply #10 on: September 20, 2004, 05:49:42 PM »
Quote

Qmail uses inherited file permissions (Set User ID bit) to get permission (via the qmail-queue program) to write the messages to the users mail folder. If it looks up the wrong perm for a user (cos ya changed it) then it can't process the mail for this user; if you look at /var/qmail/bin/qmail-queue you will notice an 's' in its perms.


Like I said, I didn't realize that changing the perms would mess with a user's email.  I think I'll have to change each user's Maildir directory back to it's original settings.

Based on another individual's response:
Quote

Qmail is touchie about permissions on the Maildir directory and the
.qmail file. The maildir including it's subdirectories should be set to
700. The .qmail file should be set to 400.


This is what I have changed regarding the Maildir directory and the .qmail file.  Is this correct or are they additional permissions I have to reset in order to resolve this issue?

The Maildir and it's contents has been set to 700 as its permissions.  Just to be sure, the user and group ownership should be the user itself?

I have changed the permissions of the .qmail file back to 400.  What should the user/group ownership of this file be?

I also have a symbolic link file called .qmail-default in the user's directory.  What should the permissions and user/group ownership of this file be?

Thanks again for your help!

flee