PDA

View Full Version : 421 Unexpected failure - Email wont send & receive - fresh cutombuild install



basssolo4u
02-13-2009, 01:23 PM
Hello,
I did a fresh install of Custom Build based on a CentOS Linux 5.2 Operating system. I have NO problem creating email accounts through direct admin but cannot send or receive email either using webmail or an email client.

When I try to send via SquirrelMaill I get the following message

Message not sent. Server replied:

Service not available, closing channel
421 Unexpected failure, please try later

There are no entries showing the test emails in a reject log.

If I send using Outlook email client I get the following delivery failure bounceback message through my ISP

----- Transcript of session follows ----- ... while talking to 34e56mail.fubarbox.net.:
>>> DATA
<<< 421 Unexpected failure, please try later <admin@fubarbox.net>... Deferred: 421 Unexpected failure, please try later
Warning: message still undelivered after 4 hours Will keep trying until message is 5 days old

I have read and attempted suggestions from threads with users on this form having similar problems without any change. I have executed the permissions script with no change. In advance I welcome and thank you for any suggestions and insight/direction given.

Basssolo4u -
============================

I did a reboot and when I look at the mainlog in exim i saw

2009-02-13 13:08:41 1LUU4Y-0001VC-3p User 0 set for local_delivery transport is on the never_users list
2009-02-13 13:08:41 1LUU4Y-0001VC-3p == root@my.fubarbox.net R=localuser T=local_delivery defer (-29): User 0 set for local_delivery transport is on the never_users list
2009-02-13 13:08:41 1LUU4Y-0001VC-3p failed to open database lock file /var/spool/exim/db/retry.lockfile: Permission denied (euid=8 egid=12)
2009-02-13 13:08:41 1LY5H7-0000sy-9L Failed to create spool file /var/spool/exim/input//1LY5H7-0000sy-9L-D: Permission denied
2009-02-13 13:08:41 1LUU4Y-0001VC-3p failed to unlink /var/spool/exim/input//1LUU4Y-0001VC-3p-J: Permission denied
2009-02-13 13:09:17 1LY5Hh-0000tF-9Y Failed to create spool file /var/spool/exim/input//1LY5Hh-0000tF-9Y-D: Permission denied
2009-02-13 13:10:20 1LY5Ii-0000tO-7L Failed to create spool file /var/spool/exim/input//1LY5Ii-0000tO-7L-D: Permission denied

nobaloney
02-13-2009, 03:26 PM
(Note to others; basssolo4u has sent me his password information privately and has retained me to work on his server; I'm replying here so as to help others who may have the same problem.)

I found a discrepancy in the ownership of /var/spool/exim/input file and in some of the email files in the spool:

# ls -ald .
drwxr-x--- 2 exim exim 4096 Feb 13 14:53 .
#
and some of the filenames have this ownership:

-rw-r----- 1 exim exim 1132 Feb 3 14:48 1LUU4Y-0001VC-3p-D
On at least one of my servers the owner/group for this directory and these files is mail:mail.

I have no idea if there is a "correct" or why this might have happened. Running the set_permissions.sh script leaves it alone so I corrected it manually:

# chown -R mail:mail /var/spool/exim/input
# chown -R mail:mail /var/spool/exim/db
# chown -R mail:mail /var/spool/exim/msglog
That resolved the Failed to create spool file error and other errors conditional on the ownership of the files and directories in /var/spool/exim.
The User 0 set for local_delivery transport is on the never_users list is normal; for security reasons our exim configuration doesn't send email to root. To resolve the problem I created a forwarder in the /root directory:

# ls -al .forward
-rw-r--r-- 1 root root 28 Feb 13 15:12 .forward
#
the contents of the file is the email address I want root mail to be forwarded to; I used admin at the hostname of the server.

No more errors in the log.

I logged into an email account set up for me on the server and tried sending me an email.

I got it! And the log entries for it look good.

I don't know what happened to the ownership. I hope that basssolo4u will respond with an answer as to whether he played with anything in terms of ownership, before I ask John if he can figure out what might have caused the incorrect ownership.

Jeff

basssolo4u
02-13-2009, 03:34 PM
Hello,
I did not manually alter any settings for ownership or chmod on anything. This was a fresh install.
B -

DirectAdmin Support
02-14-2009, 02:09 AM
Hello,

From time to time, we see installs that have a prevoius exim installs before DA gets there. The "exim" user is a dead giveaway of that. Usually those files in questions are chowned to exim:exim. The setup DA requires is mail:mail, as Jeff has set. This is one reason we recommend having a clean install without any other conflicting packages. Usually in this case, the admin's have no idea exim was already there, as the package system might installed it as a requirement for other packages. DA does it's best to remove things that get in the way before installing, but can't predict all scenarios.

Thanks Jeff.

John

basssolo4u
08-07-2009, 07:15 PM
That resolved the Failed to create spool file error and other errors conditional on the ownership of the files and directories in /var/spool/exim.
The User 0 set for local_delivery transport is on the never_users list is normal; for security reasons our exim configuration doesn't send email to root. To resolve the problem I created a forwarder in the /root directory:

# ls -al .forward
-rw-r--r-- 1 root root 28 Feb 13 15:12 .forward
#
the contents of the file is the email address I want root mail to be forwarded to; I used admin at the hostname of the server.

No more errors in the log.

I logged into an email account set up for me on the server and tried sending me an email.

I got it! And the log entries for it look good.

I don't know what happened to the ownership. I hope that basssolo4u will respond with an answer as to whether he played with anything in terms of ownership, before I ask John if he can figure out what might have caused the incorrect ownership.

Jeff

Hey Jeff,
Thanks for your help on this prior incident. Had to rebuild a machine and ran into the same problem. Followed your command line entries and that corrected the problem. I didn't understand all of what you had gone about doing in this last section so I had not yet implemented this section of your fix. Please elaborate on what this last part does and how to go about doing it.
Best Regards,
Basssolo4u -

nobaloney
08-12-2009, 03:13 PM
I'm not sure what you mean by last part; it's only been six months :).

Do you mean creating the forwarder? I set a forwarder so that root mail gets forwarded to something you really read.

Jeff

thetechnaddict
09-13-2009, 06:07 AM
I've found some sample .forward files on exim's web site:

http://www.cl.cam.ac.uk/local/sys/mail.old/filter.exmp.html

But I can't see anything that describes doing what you have just done - could you please post the contents of the .forward file - or simply one entry that forwards anything sent to user 'root' to the user 'admin'

Many thanks

nobaloney
09-13-2009, 10:14 AM
Doing what who has done? You've managed to confuse me.

Forget all those complex forward file examples.

Create the .forward file:

# touch /root/.forward
Then edit it and simply put in the email address to which you want root email forwarded. For example, if you want root email forwarded to joe@example.com then the entire contents of the .forward file should simply be joe@example.com.

Jeff

thetechnaddict
09-14-2009, 07:53 AM
Sorry to confuse you - I'm ill and tired and clumsy - happily you managed to give the reply to the question I was meaning to ask! Thanks