Koozali.org: home of the SME Server

recreated user mailbox unable to received mail

Offline GadoF

  • *
  • 28
  • +0/-0
recreated user mailbox unable to received mail
« on: February 26, 2024, 12:48:28 AM »
hi,

 I have this issue , mailbox was deleted and then recreated it again. However i encounter this issue no email was found on the user mailbox. Checking the logs and found this:
   deferral: Unable_to_switch_to_/home/e-smith/files/users/abc_mailbox:_access_denied._(#4.3.0).

Does anyone encounter this issue ?

Offline Jean-Philippe Pialasse

  • *
  • 2,765
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: recreated user mailbox unable to received mail
« Reply #1 on: February 26, 2024, 02:50:00 AM »
if user deleted and recreated :
- content of /home/e-smith/files/user/username will be deleted then recreated from scratch
- uid and gid it will not be the same

hence if you have restored a backup of the user home folder, you need to do

chown username:username -R /home/e-smith/files/user/username

Offline GadoF

  • *
  • 28
  • +0/-0
Re: recreated user mailbox unable to received mail
« Reply #2 on: February 26, 2024, 03:06:47 AM »
i recreated the user account and did not restore from the backukp and encountered the issue, should I run the command you gave me ?
« Last Edit: February 26, 2024, 03:25:09 AM by GadoF »

Offline Jean-Philippe Pialasse

  • *
  • 2,765
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: recreated user mailbox unable to received mail
« Reply #3 on: February 26, 2024, 04:23:29 AM »
well it would be interesting to first know what says

ll -d /home/e-smith/files/user/username


Offline GadoF

  • *
  • 28
  • +0/-0
Re: recreated user mailbox unable to received mail
« Reply #4 on: February 26, 2024, 05:49:21 AM »
here's the result

drwx------ 5 abc_userfolder abc_userfolder 142 Feb 25 10:23 /home/e-smith/files/users/abc_userfolder

Offline bunkobugsy

  • *
  • 280
  • +4/-0
Re: recreated user mailbox unable to received mail
« Reply #5 on: February 26, 2024, 11:19:00 AM »
for me

drwx--x---+ 4 username           username           141 Feb  4 18:45 username

Offline bunkobugsy

  • *
  • 280
  • +4/-0
Re: recreated user mailbox unable to received mail
« Reply #6 on: February 26, 2024, 07:42:30 PM »
inside that

drwxr-xr-x   2 username username   10 Sep 19  2013 home
drwxrwsr-x+ 18 username username 4096 Feb 26 15:49 Maildir

in Maildir

drwxrwsr-x+ 2 username username  684032 Feb 26 15:49 cur
-rw-rw-r--+ 1 username username       0 Apr 22  2020 dovecot-acl-list

and in cur (mail) files are

-rw-r--r--+ 1 username username     7355 Feb 26 15:36 1708954581.28602

everything should be owned username:username

mailforders seem to be 775 and files 644 or 664

Offline GadoF

  • *
  • 28
  • +0/-0
Re: recreated user mailbox unable to received mail
« Reply #7 on: February 27, 2024, 12:48:15 AM »
yeah same level of rights , but i am just wondering the email i sent to the mailbox was denied or not being delivered.

Offline Jean-Philippe Pialasse

  • *
  • 2,765
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: recreated user mailbox unable to received mail
« Reply #8 on: February 27, 2024, 01:45:35 AM »
what about


ll -a /home/e-smith/files/user/username

and

ll /var/spool/username

Offline GadoF

  • *
  • 28
  • +0/-0
Re: recreated user mailbox unable to received mail
« Reply #9 on: February 27, 2024, 03:51:11 AM »
ll -a /home/e-smith/files/user/username

result :

total 52
drwx------    5 user user   142 Feb 25 10:23 .
drwxr-xr-x. 726 root    root    20480 Feb 27 08:48 ..
drwxr-xr-x    2 user user     6 Jan 31  2013 home
drwxr-xr-x    6 user user   167 Feb 25 10:17 Maildir
-rw-------    1 user user   675 Feb 25 09:50 .mailfilter
-rw-------    1 user user   806 Feb 25 09:50 .procmailrc
-rw-r--r--    1 user user   556 Feb 25 10:18 .qmail
lrwxrwxrwx    1 root    admin       6 Feb 25 09:50 .qmail-default -> .qmail
-rw-r--r--    1 user user   482 Feb 25 09:50 .qmail-junkmail
drwx------    2 user user     6 Jan 31  2013 .ssh

ll /var/spool/mail/username

-rw-rw---- 1 user mail 0 Feb 25 09:50 /var/spool/mail/user
 

Offline bunkobugsy

  • *
  • 280
  • +4/-0
Re: recreated user mailbox unable to received mail
« Reply #10 on: February 27, 2024, 06:02:42 AM »
You could do it by the book again:
-save all emails and files
-delete user
-create it again
-don't mess with emails/folders from console
From a work pc:
-rename every email to *.eml
-drop them into mail folders (inbox/sent/etc) via imap email client
-restore files

Offline bunkobugsy

  • *
  • 280
  • +4/-0
Re: recreated user mailbox unable to received mail
« Reply #11 on: February 27, 2024, 06:10:30 AM »
drwxr-xr-x    6 user user   167 Feb 25 10:17 Maildir

for me

drwxrwsr-x+ 18 username username 4096 Feb 26 15:49 Maildir

would explain " deferral: Unable_to_switch_to_/home/e-smith/files/users/abc_mailbox:_access_denied._(#4.3.0)."

Offline Jean-Philippe Pialasse

  • *
  • 2,765
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: recreated user mailbox unable to received mail
« Reply #12 on: February 27, 2024, 06:17:00 AM »
you have the default values. I see no evident cause.  Have you restarted qmail?

Offline GadoF

  • *
  • 28
  • +0/-0
Re: recreated user mailbox unable to received mail
« Reply #13 on: February 27, 2024, 06:48:59 AM »
I restarted the server multiple times. the mailbox is not able to receive the test mail I am sending.

you have the default values. I see no evident cause.  Have you restarted qmail?

Offline bunkobugsy

  • *
  • 280
  • +4/-0
Re: recreated user mailbox unable to received mail
« Reply #14 on: February 27, 2024, 08:00:48 AM »
Try saving the user from server-manager then running from reboot or shutdown > reconfigure.

Offline GadoF

  • *
  • 28
  • +0/-0
Re: recreated user mailbox unable to received mail
« Reply #15 on: February 28, 2024, 03:05:18 AM »
same result. Cannot receive all mails it is just queueing

Try saving the user from server-manager then running from reboot or shutdown > reconfigure.

Offline GadoF

  • *
  • 28
  • +0/-0
Re: recreated user mailbox unable to received mail
« Reply #16 on: April 03, 2024, 09:48:08 AM »
just to update, i have deleted several users and now when someone email to them instead of the sytem giving a bounce mail error, the email stuck in que. Any help will be appreciated

Offline ReetP

  • *
  • 3,740
  • +5/-0
Re: recreated user mailbox unable to received mail
« Reply #17 on: April 03, 2024, 01:11:35 PM »
just to update, i have deleted several users and now when someone email to them instead of the sytem giving a bounce mail error, the email stuck in que. Any help will be appreciated

You would help yourself by solving one problem at a time instead of compounding it by performing more actions.

Have you read your logs?

What do they say?

Might be better to rewind a bit as well.

Please follow this.

https://forums.koozali.org/index.php/topic,54724.0.html

Lets have a look at your server and see what is going on.

Start at "Documenting things"

Post the output from these:

Was your server an upgrade or clean install?

Have a look in your server manager lower left in Miscellaneous for "Report a bug" and then do "Create configuration report" and post us some of the network details, less things like passwords.

Also:

Code: [Select]
/sbin/e-smith/audittools/newrpms
/sbin/e-smith/audittools/templates

We need to find how you got into this mess in the first place.

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation