The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

delete data under .sqmaildata directory

Discussion in 'Database Discussions' started by crazyaboutlinux, May 12, 2009.

  1. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    hi
    how to delete all the data which are under .sqmaildata but the directory should not be deleted
     
  2. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    I am also looking for the same. Anybody aware about this??
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Are you using rm -rf .sqmaildata to delete the directory and everything in it?
     
  4. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    397
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
  5. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    That's it you got my point

    Thanks for the command
     
  6. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Hi David,,

    Thanks for your update

    i just want to delete only the date inside the .sqmaildata directory not .sqmaildata

    Anyways, platinum has got my point & his given the command
     
  7. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Is it deleting directly or

    will it ask before delete ?
     
  8. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    yes it will delete directly because of the 'f' switch with the rm.
     
  9. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    i want ask before delete it
     
  10. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    Do not use 'f' with the rm command. It will prompt you to delete each file like below.

    ==
    test@server [~]# rm -r test2
    rm: descend into directory `test2'? y
    rm: remove regular file `test2/file2.txt'? y
    rm: remove regular file `test2/file1.txt'? y
    rm: remove regular file `test2/file3.txt'? y
    rm: remove directory `test2'? y
    test@server [~]#
    ==
     
  11. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    864K ./tmp
    176K ./.cpanel
    8.0K ./public_ftp
    3.6M ./.neomail
    4.0K ./logs
    11M ./public_html
    8.0K ./.cpaddons
    8.0K ./cpmove.psql.1216235618
    18M ./.spamassassin
    8.0K ./cpmove.psql
    60K ./etc
    4.0K ./.trash
    11M ./mail
    16K ./.htpasswds
    24K ./.sqmaildata
    44M .

    i want reduce 18 MB from the directory ./.spamassassin

    but make sure that ./.spamassassin should not be deleted only inside content of directory

    should i use rm -r .spamassassin/* is it enough ?? or m i doing anything wrong ?
     
  12. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    rm -r .spamassassin/* will prompt you to enter 'y' for each file. Use rm -rf to remove all files inside forcefully. .spamassassin folder will remain intact, but all files inside it will be deleted.
    rm -rf .spamassassin/*
     
  13. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    Using "-rf" with rm command will not ask for the confirmation of deletion.
     
  14. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Thank you so much Howard

    Keep helping like this to other people

    Have a great day!
     
  15. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    root@web [/home/domain/mail/domain.com/domain/.spambox]# ls
    ./ ../ courierimapkeywords/ courierimapuiddb cur/ new/ tmp/

    there are more than 2000 spam mails under spambox/cur

    i want to delete all mails but ,

    remember Directory spambox , cur , new , tmp should not be delete

    what i do to do this
     
  16. chinmay

    chinmay Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    localhost
    If you want to delete the emails under "/home/domain/mail/domain.com/domain/.spambox/cur"

    Use the command as below
    This will delete all the emails under cur directory keeping the other directories intact...
     
  17. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    got it !!!!!!

    i have run this command rm -rf cur/*
     
  18. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    does anyone know what is .sqmaildata ? & why it is spacing this much MB?
     
    #18 crazyaboutlinux, May 1, 2010
    Last edited: May 1, 2010
  19. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    .sqmaildata contains the preferences and address books of SquirrelMail users. The data are stored in plain text files, so you can use cat, less or a text editor to view the contents of the files.

    .sqmailattach contains attachments downloaded by SquirrelMail users.
     
  20. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Hi, Jared Ryan

    Thanks for the detail

    Nilesh
     
Loading...

Share This Page