# qmail inject fatal error

## ghost_recon

After following the steps here.

```

Code Listing 2.5: Test delivery service

# ssh vapier@localhost

# maildirmake .maildir

# qmail-inject root << EOF

test root e-mail!

EOF
```

I get this.

```

qmail-inject: fatal: qq trouble creating files in queue (#4.3.0)

```

What I did was removed the software and a folder name qmail located in /var

Everything was running fine till I did this. The reason I removed the software and folder in the first place was because. I was trying to setup vpopmail, and had a problem receiving mail after I installed it.

So my mistake was removing the folder after removing the above software.

Now when I tried to reinstall qmail i receive the above error.

Anyone have an idea how to fix my mess up. 

Thanks

----------

## ghost_recon

Ive been searching on google. I see alot of others have the same problem. But I still cannot find a answer. I still need someones help. 

Thanks

----------

## ghost_recon

I still havent found any good answers yet. I thought Id check here again. Thanks

----------

## Maup

Has to be a permission or owner issue.

the /var/qmail/queue directory has the following permissions on my server:

```

rwx r-x r-x   qmailq    qmail     4096   Mar 22 21:48   queue

```

So try restoring those permissions and owner stuff and check it out  :Smile: 

EDIT: Please include some logfiles when possible... That will clear things up a bit...  :Smile: 

greetz 

Maurits

----------

## ghost_recon

This is in my qmail-send log file. 

The other log file dircetories are empty.

```

@4000000040b0732f1a5aa2ac alert: cannot start: unable to switch to queue directory

```

----------

## Maup

Have you checked the permissions and owner - group tags ?

the log seems to confirm my idea...

greetz 

Maurits

----------

## ghost_recon

The folder /var/qmail is owned by user: root group: qmail

user rwx

group rx

other rx

----------

## Maup

Sorry,

but I think I wasn't completely clear in asking:

Could you include the permission settings of your /var/qmail/queue/ directory ? (maybe even all directories in /var/qmail ? )

permission settings of /var/qmail seem ok to me.

greetz

Maup

----------

## ghost_recon

I dont have /var/qmail/queue 

I do have

alias

bin

boot

control

rc

supervise

users

----------

## Maup

Check !

Problem solved  :Smile:  (I hope)

```
mkdir /var/qmail/queue

chown qmailq:qmail /var/qmail/queue

chmod 750 /var/qmail/queue

```

And try again...

greetz Maurits

----------

## ghost_recon

I tried that and still not working.

----------

## ghost_recon

I have it working now. 

Here is what I did. I tried to emerge in on my laptop and I saw that this other file was needed, queue-fix so I checked to see if that file was emerged on my server. Guess what it wasnt. So I emerged it, and everything is back and working. 

Thanks for all the help.

----------

## ryker

Had the same problem and running

```
queue-fix /var/qmail/queue
```

fixed the problem.

Thanks guys.

----------

## CompWiz

Thanks..... worked for me too.

----------

## uglyman

worked for me too.. I was trying to start over on the qmail install after having goofed up my hostname settings. I deleted that dir just like described above. btw that fix program is in /var/qmail/bin so it isn't prolly in your path just use an absolute path name like /var/qmail/bin/blahblah

----------

## Double Click

Niece!

Had the same problem - after emerging queue-fix and running the command everything fine with the missing queue directory. Thanks guys !  :Very Happy: 

Now to the other problems ....  :Mad: 

----------

## binaural

this forum is tha shiznit

----------

## Randy R

Thanks

----------

## djfoobarmatt

Stop svscan before running queue-fix

and thanks for your help kidz!

----------

