Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ISPConfig 3
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 549
    • Issues 549
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISPConfig
  • ISPConfig 3
  • Issues
  • #302
Closed
Open
Created Jan 04, 2009 by David Hamann@marinus

Change mailbox name

There seems to be an error in the mv command of the vmail directory when changing the name of a mailbox:

Steps to reproduce:

  1. Create a mailbox mbox1@domain.tld a maildir direcotry /var/vmail/domain.tld/mbox1 is created - so far so good

  2. Update mailbox to mbox2@domain.tld the directory mbox1 is not renamed to mbox2 but is moved into directory mbox2 i.e. the directory structure is: /var/mail/domain.tld/mbox2/mbox1/

if the command in line 119 is changed to exec('mv -f '.escapeshellcmd($data['old']['maildir']).'/* '.escapeshellcmd($data['new']['maildir'])); //note the aditional / the move is executed correctly - BUT the old dir is not deleted (because the mv command does not move the "invisible" .ispconfig_mailsize rmdir() fails)

Maybe it would be a better solution to move the whole directory, instead of the content i.e. mv -f /var/mail/domain.tld/mbox1 /var/mail/domain.tld/mbox2

instead of mkdir -p /var/mail/domain.tld/mbox2 mv -f /var/mail/domain.tld/mbox1/* /var/mail/domain.tld/mbox2 rmdir(/var/mail/domain.tld/mbox1)

Cheers, David

Assignee
Assign to
Time tracking