Announcement

Collapse
No announcement yet.

How do I Change the KMail Directory to a Data Drive?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do I Change the KMail Directory to a Data Drive?

    Hello;

    I want KMail to use the data drive on my 2nd hdd instead of using my Home directory.

    I have 2 physical hard disk drives (hdd) on my system: the first is to boot the OS and the second is for data only. I did it this way so upgrading to a new version of Kubuntu wouldn't leave behind data files and email. That way all I had to do before was point KMail at the data drive directory and I had all my email history.

    I was able to do this in past versions of KMail, but not in 11.04 and I don't understand why. Please help.

    "If you're in a room with another person who sees the world exactly as you do, one of you is redundant." Dr. Steven Covey, The 7-Habits of Highly Effective People

    #2
    Re: How do I Change the KMail Directory to a Data Drive?

    Originally posted by mhumm2
    I want KMail to use the data drive on my 2nd hdd instead of using my Home directory.

    I have 2 physical hard disk drives (hdd) on my system: the first is to boot the OS and the second is for data only. I did it this way so upgrading to a new version of Kubuntu wouldn't leave behind data files and email. That way all I had to do before was point KMail at the data drive directory and I had all my email history.

    I was able to do this in past versions of KMail, but not in 11.04 and I don't understand why. Please help.
    DISCLAIMER: Make a backup of the file I'm about to mention! Also make backups of your current (in your $HOME directory) and stored (on your 2nd hard drive) mail.

    I don't use KMail (I use SeaMonkey), but I couldn't resist seeing why KMail wasn't doing what you're wanting, so I took a look. Before you do anything make a backup of your ~/.kde/share/config/kmailrc file and your mail. Make sure KMail is not running.

    Here's what I did to accomplish what you want:

    1) Made a backup of my kmailrc file.

    cp kmailrc kmailrc.orig

    2) Edited kmailrc as follows:

    In its [General] section I changed the line that read:

    folders[$e]=$HOME/.kde/share/apps/kmail/mail

    to:

    folders[$e]=/data/mail/kmail/mail

    (I store all my mail on my /data partition, in the subdirectory /mail.)

    3) Created /data/mail/kmail/mail:

    mkdir -p /data/mail/kmail/mail

    4) Changed its permissions:

    chmod -R 777 /data/mail/kmail

    (Yes, I know making it 777 is a bad idea...blah blah blah...but I don't care as I'm the only user on this laptop. You can make it 666 or 644 if you want.)

    5) Fired up KMail

    6) Sent myself an e-mail, received it in KMail

    7) Verified that the mail was indeed stored in /data/mail/kmail/mail/inbox/cur and /data/mail/kmail/mail/sent-mail/cur

    That's it!
    Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

    Comment


      #3
      SOLVED : How do I Change the KMail Directory to a Data Drive?

      That's it! It works! Thank you very much DoYouKubuntu. This is going to make administration of my system a lot easier. Thanks. I'm also going to take a look at Seamonkey for email management.

      mhumm2
      "If you're in a room with another person who sees the world exactly as you do, one of you is redundant." Dr. Steven Covey, The 7-Habits of Highly Effective People

      Comment


        #4
        Re: How do I Change the KMail Directory to a Data Drive?

        Another option is to replace the target directory with a sysmlink. I have done this in the past with firefox and thunderbird without issue.

        You might considering using a hidden directory as your target again - preventing accidental shenanigans...

        Please Read Me

        Comment


          #5
          Re: How do I Change the KMail Directory to a Data Drive?

          Originally posted by mhumm2
          That's it! It works! Thank you very much DoYouKubuntu. This is going to make administration of my system a lot easier. Thanks. I'm also going to take a look at Seamonkey for email management.
          You're very welcome. I'm glad it worked out well for you.

          Something I failed to mention in my OP was that I had already poked around in all of KMail's settings trying to find a place to change the default mail directory's location, but found nothing. WHY they eliminated that functionality, which is what I'm assuming from your OP, is beyond me! So my solution came about because of the lack of a settings option within KMail itself.

          As for SeaMonkey, I use it as my default browser--and I've customized it so each tab has its own color--as well as my e-mail and newsgroup client. I love it. Just in case anyone doesn't know, SeaMonkey began its life as the Mozilla Suite, which came about from Netscape Communicator; SeaMonkey is the older sibling of Firefox and Thunderbird.
          Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

          Comment

          Working...
          X