# -ERR can't open message file it's gone [ probably SOLVED]

## mauzer

Hi, I have reinstalled whole system and configured mail system with postfix, courier-authlib, courier-imap, amavis,.... Now I'm getting an error in Outlook 2003:

```

-ERR can't open message file it's gone

```

But if I go directly to the console and use mutt I can see the mails in my maildir.

help please   :Confused: 

----------

## di1bert

I had a similar problem on my Exim / Courier setup. I believe the messages got corrupt some

how (the sizes were all 0) and the only way to sort it out was the remove them

with a manual telnet session...

Sorry I can't help any more than that...

-m

----------

## mauzer

I have deleted the user account and the /home dir of the user. Then recreated the account and maildir. Then logged in with outlook to check if all goes well, and it did.

But then I sent a "test" mail to that account from another account and I got the same error back as described earlier. Looks like that when a mail gets delivered to maildir, something goes wrong.... 

Any suggestions?

----------

## di1bert

Other than sending a test message through and checking the message with telnet before

Outlook there isn't much more I can suggest. It sounds to me like Outlook is

some how corrupting your messages, although why this is happening I don't know.

If you can, put Courier into debug mode and run a couple of tests while watching

/var/log/maillog (or whereever you log those messages to).

-m

----------

## mauzer

This is what I get from logging...

```

Jun  3 15:48:43 linux pop3d: Connection, ip=[::ffff:192.168.0.2]

Jun  3 15:48:43 linux authdaemond: received auth request, service=pop3, authtype=login

Jun  3 15:48:43 linux authdaemond: authmysql: trying this module

Jun  3 15:48:43 linux authdaemond: SQL query: SELECT email, "", clear, uid, gid, homedir, maildir, quota, name, "" FROM users WHERE email = "user@dfreak.org"

Jun  3 15:48:43 linux authdaemond: authmysql: sysusername=<null>, sysuserid=1101, sysgroupid=1101, homedir=/home/user, address=user@dfreak.org, fullname=user, maildir=.maildir, quota=<null>, options=<null>

Jun  3 15:48:43 linux authdaemond: authmysql: clearpasswd=********, passwd=<null>

Jun  3 15:48:43 linux authdaemond: Authenticated: sysusername=<null>, sysuserid=1101, sysgroupid=1101, homedir=/home/user, address=user@dfreak.org, fullname=user, maildir=.maildir, quota=<null>, options=<null>

Jun  3 15:48:43 linux authdaemond: Authenticated: clearpasswd=********, passwd=<null>

Jun  3 15:48:43 linux pop3d: LOGIN, user=user@dfreak.org, ip=[::ffff:192.168.0.2]

Jun  3 15:48:43 linux pop3d: LOGOUT, user=user@dfreak.org, ip=[::ffff:192.168.0.2], top=0, retr=0, time=0

```

----------

## mauzer

Here is what telnet to 110 gave me

```
linux ~ # telnet localhost 110

Trying 127.0.0.1...

Connected to linux.domain.tld.

Escape character is '^]'.

+OK Hello there.

USER user

+OK Password required.

PASS ********

+OK logged in.

LIST

+OK POP3 clients that break here, they violate STD53.

1 0

2 0

3 0

.

RETR 1

-ERR Can't open the message file - it's gone!

quit

+OK Bye-bye.

Connection closed by foreign host.

```

----------

## di1bert

Sorry for the delay, had to get out the house for a bit  :Smile: 

Did you do that manual telnet session before or after logging into the account

with Outlook. Either Outlook is corrupting the messages in the spool directory

or there is something else that's breaking it. I see you're using MySQL for storing

your user details, are you also storing mail there ?

There isn't anything wrong with the authentication side of things so it's going

to be something else, either your MTA (unlikely) or perhaps your

client (Outlook, likely)

-m

----------

## mauzer

Looks like it's fixed   :Laughing: 

I haven't payed attention to uid & gid in mysql for user authentication. Mysql put some default values in there and it didn't work. I changed them with the ones that users actually have in the system and it is working   :Very Happy: 

I just hope that this was the real error  :Wink: 

----------

