Author Topic: I have moved vmail folder in another disk now cant receive emails.  (Read 10586 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
I have moved vmail folder to another disk and deleted the var/vmail old folder now i can only send emails but can't receive emails on my MailServer.

[Fri Nov 13 09:30:28.031088 2020] [proxy:error] [pid 4495:tid 140144111712000] [client 46.99.20.52:40254] AH00898: Error reading from remote server returned by /webmail/, referer: https://"TEST".de/webmail/?_task=mail&_mbox=INBOX

Nov 16 14:23:35 imap(info@mydomain.com): Warning: autocreate plugin is deprecated, use mailbox { auto } setting instead
Nov 16 14:23:35 imap(info@mydomain.com): Error: Initializing mail storage from mail_location setting failed: mkdir(/var/vmail/mydomain.com/info) failed: Permission denied (euid=101(vmail) egid=12(mail) missing +w perm: /var, dir owned by 0:0 mode=0755)
Nov 16 14:24:28 imap(f.faka@mydomain.de): Warning: autocreate plugin is deprecated, use mailbox { auto } setting instead
Nov 16 14:24:28 imap(f.faka@mydomain.de): Error: Initializing mail storage from mail_location setting failed: mkdir(/var/vmail/mydomain.de/f.faka) failed: Permission denied (euid=101(vmail) egid=12(mail) missing +w perm: /var, dir owned by 0:0 mode=0755)

After deleting the old vmail folder.


How should i map now because now i have vmail folder on /home2/vmail ?

Re: I have moved vmail folder in another disk now cant receive emails.
« Reply #1 on: November 16, 2020, 02:18:15 PM »
Why create another thread on same subject.
YOU decided to move the vmail directory, so YOU should be able to read and act upon the error message.
Take responsibility for your actions.  ::)

Offline
*
Re: I have moved vmail folder in another disk now cant receive emails.
« Reply #2 on: November 16, 2020, 02:28:22 PM »
FOA
I have removed the other TOPIC, and second, I am a newbie in Centos and in Servers too, I was able to move the folder from this :
https://wiki.centos-webpanel.com/move-varvmail-to-another-partition tutorial and I know how to fix to normal but only if I move back home2/vmail folder to var/vmail but there is no space in the other disc.

Second:
If you can help me do it if you cant don't reply here sir.

best regards :D

Re: I have moved vmail folder in another disk now cant receive emails.
« Reply #3 on: November 16, 2020, 03:23:24 PM »
Confirm:
Quote
Step 4: create a symlink from the new location to old location
ln -s /home/vmail /var/vmail
Code: [Select]
ls -l /home
ls -l /var
This should verify your given error message:
Quote
Error: Initializing mail storage from mail_location setting failed: mkdir(/var/vmail/mydomain.com/info) failed: Permission denied (euid=101(vmail) egid=12(mail) missing +w perm: /var, dir owned by 0:0 mode=0755)

Looks to me like you haven't assigned permissions to your newly created vmail directory.
Code: [Select]
chown -R vmail:mail /var/vmail
At your own peril.

Offline
*
Re: I have moved vmail folder in another disk now cant receive emails.
« Reply #4 on: November 17, 2020, 10:16:32 AM »
Hi, cynique

Well after I made these symlink connections, and this comand chown now the emails are working fine.

Code: [Select]
chown -R vmail:mail /var/vmail
One last question now the new emails that will come will be saved where? In the folder home2/vmail ?

Re: I have moved vmail folder in another disk now cant receive emails.
« Reply #5 on: November 17, 2020, 12:59:21 PM »
One last question now the new emails that will come will be saved where? In the folder home2/vmail ?
Blimey! Are you a millennial or younger? (rhetorical.)
Try some test emails - see for yourself.  ::)

BTW, the developers have already been told that /var/vmail is a stupid place to store emails - they should be contained within each user's home directory. That way quotas are appropriate and user/system backups are made easier, amongst other benefits.

Next you'll be running out of space in /var due to mysql databases and/or logs. Trained sysadmins know that it's a good idea to put /var on a separate partition, when dealing with servers. LVM also helps.

Here's an example from one of my test VPSes:
Code: [Select]
/dev/mapper/system-root    7.8G  5.5G  1.9G  75% /
/dev/vda1                  488M  271M  182M  60% /boot
/dev/mapper/system-home     40G  2.0G   36G   6% /home
/dev/mapper/system-backup  5.0G  2.5G  2.5G  51% /backup
/dev/mapper/system-var     2.9G  1.4G  1.5G  50% /var
/dev/mapper/system-tmp     2.0G  4.5M  2.0G   1% /tmp
« Last Edit: November 17, 2020, 01:07:07 PM by cynique »

Offline
*
Re: I have moved vmail folder in another disk now cant receive emails.
« Reply #6 on: November 17, 2020, 01:19:13 PM »
Hahaha,
I will try some emails,

Thank you for your help cynique :)
btw these are my dev folders, I have creat home2 only for the mails to be stored there.

Code: [Select]
/dev/sda1        79G   57G   19G  75% /home
/dev/sdb1        50G   19G   29G  40% /home2


best regards to you

Re: I have moved vmail folder in another disk now cant receive emails.
« Reply #7 on: November 17, 2020, 06:04:25 PM »
Thanks.
 :)

Offline
*
Re: I have moved vmail folder in another disk now cant receive emails.
« Reply #8 on: November 18, 2020, 12:00:37 AM »
btw these are my dev folders, I have creat home2 only for the mails to be stored there.

Code: [Select]
/dev/sda1        79G   57G   19G  75% /home
/dev/sdb1        50G   19G   29G  40% /home2

Don't forget to set up disc quota on the new disc or the mail won't be inside the users allocated storage quota 👍