Koozali.org: home of the SME Server

Email Archiving

Offline devtay

  • *
  • 145
  • +0/-0
Re: Email Archiving
« Reply #15 on: May 19, 2009, 06:20:29 PM »
Ok, mailarchiva is working. I am able to archive emails just fine. I am having trouble getting the emails I have saved in folders other than the inbox pulled off of the server. This is because mailarchiva only looks at the inbox. I have been using Thunderbird to move the emails from the folder I created to the inbox. The problem is either the server or Thunderbird errors out and it is taking a long time.

I understand the Maildir /cur /new scheme, but I don't know if I am looking at this the right way. If I go to the shell and move the files manually, am I going to mess something up? I know the dovecot file is the index file for the folder so I don't want to mess that up. What I am trying to do is a little hard to describe in a post so here is an example.

IMAP connection. I made a folder called apr2009 under the logger Maildir folder using Thunderbird. As I read the emails I moved them from the inbox to the apr2009 folder. As everyone already knows you have the dovecot files and a /tmp, /cur and /new directory for each IMAP folder you create. I want to use the shell to  move the files from /apr2009/cur, /new and /tmp to the inbox. I tried this with a test account and the files moved. The problem was they were deleted when I logged into the account. I am assuming this is because there was no appropriate index. Any help with this would be appreciated.
You can't stop what's coming. It ain't all waiting on you.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Email Archiving
« Reply #16 on: May 19, 2009, 11:49:25 PM »
devtay

You say it's a little hard to describe what you do, then go on to describe what you do ???

It would be easier for you (and clearer for us) if you quote the specific commands you use eg
Move the files using mc
or command line,
if command line quote the exact command
eg (an appropriate command would be)
mv /home/e-smith/files/users/username/Maildir/apr2009/cur/*  /home/e-smith/files/users/username/Maildir/new

If you are logged in as root, then you will/may need to correct the file ownership with chown (depending how you moved or copied the message files)

chown -R username:username /home/e-smith/files/users/username/Maildir
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline devtay

  • *
  • 145
  • +0/-0
Re: Email Archiving
« Reply #17 on: May 20, 2009, 03:03:23 AM »
devtay

You say it's a little hard to describe what you do, then go on to describe what you do ???

It would be easier for you (and clearer for us) if you quote the specific commands you use eg
Move the files using mc
or command line,
if command line quote the exact command
eg (an appropriate command would be)
mv /home/e-smith/files/users/username/Maildir/apr2009/cur/*  /home/e-smith/files/users/username/Maildir/new

If you are logged in as root, then you will/may need to correct the file ownership with chown (depending how you moved or copied the message files)

chown -R username:username /home/e-smith/files/users/username/Maildir

Mary,

Take your pick, mc (I am assuming midnight commander) or mv. I don't really care. From your post I guess you fully understood what I was asking.

I just want to know if I can move email files from the /cur directory in one folder to the /cur directory in another without messing up the dovecot index file. From what I have read so far on the net it looks like I can because the dovecot index is not implicitly trusted. Thanks for the reminder on the chown. I will be logged in as root to the logger account.
You can't stop what's coming. It ain't all waiting on you.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Email Archiving
« Reply #18 on: May 20, 2009, 08:25:40 AM »
devtay

Quote
Take your pick, mc (I am assuming midnight commander) or mv. I don't really care. From your post I guess you fully understood what I was asking.

Yes I do understand, and yes you can move files, but I suspect incorrect permissions is probably the issue, due to copying inappropriately.
 
You need to tell us which method you use and the exact command so the source of your "problem" can be determined.
It does not help to tell me to pick whichever one.

Anyway I quoted you an exact move command that should work, replacing the names where appropriate of course, followed by the chown command.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline devtay

  • *
  • 145
  • +0/-0
Re: Email Archiving
« Reply #19 on: May 21, 2009, 03:57:52 AM »
Quote
I just want to know if I can move email files from the /cur directory in one folder to the /cur directory in another without messing up the dovecot index file. From what I have read so far on the net it looks like I can because the dovecot index is not implicitly trusted. Thanks for the reminder on the chown. I will be logged in as root to the logger account.

This is the only issue that I still have. The moving and permissions were taken care of in Mary's previous posting. I just need to know I am not losing emails due to a bad index. Thanks.
You can't stop what's coming. It ain't all waiting on you.

Offline devtay

  • *
  • 145
  • +0/-0
Re: Email Archiving
« Reply #20 on: May 27, 2009, 02:57:57 PM »
For future reference to any who have this problem. I solved it by changing the user database for the logger account to allow me shell access. I then turned off the mailarchiva server so it would not try to get messages before they were moved over. I logged into the shell with the logger account and then moved the files to the ./Maildir/.hiddendirectory/* to the ./Maildir/cur directory. After moving all of the files in a hidden directory, I enabled the account on the mailarchiva server and it started collecting mail.

I had a problem with moving the files because there were too many. I had to use wild cards in the mv statement to get a few files at a time. I decided against using midnight commander because the process was too tedious right-clicking each file individually and I didn't want to try and learn more about midnight commander.

I never did get mailarchiva working on an sme box. I ended up installing it on an Ubuntu server.
You can't stop what's coming. It ain't all waiting on you.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Email Archiving
« Reply #21 on: May 27, 2009, 03:39:00 PM »
I just want to know if I can move email files from the /cur directory in one folder to the /cur directory in another without messing up the dovecot index file. From what I have read so far on the net it looks like I can because the dovecot index is not implicitly trusted. Thanks for the reminder on the chown. I will be logged in as root to the logger account.

yes.. all you need is imapsync.. it works even on two accounts on the same server

Ciao
Stefano

Offline devtay

  • *
  • 145
  • +0/-0
Re: Email Archiving
« Reply #22 on: May 27, 2009, 07:07:52 PM »
yes.. all you need is imapsync.. it works even on two accounts on the same server

Ciao
Stefano

Thanks Stefano. I will definitely look at this in the future. Thanks for the help.
You can't stop what's coming. It ain't all waiting on you.

Offline mudra

  • ****
  • 78
  • +0/-0
Re: Email Archiving
« Reply #23 on: May 28, 2009, 11:03:01 AM »
Devtay,

I have followed the instructions on the WIKI to install MailArchiva, and it was working well, until I rebooted my server. I am running SME 7.4.

When I reboot my server I get the same error that you were experiencing.

/etc/rc7.d/S99mailarchiva: Couldn't find/execute init script for service mailarchiva

Please can you let me know how you cured this problem.

Do I need to open a bug report, and if so, where / how should I do this ?

Thanks for any help.

Mudra.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Email Archiving
« Reply #24 on: May 28, 2009, 12:46:59 PM »
mudra

What do these commands show
config show mailarchiva
ls -al /etc/rc.d/rc7.d

« Last Edit: May 28, 2009, 12:51:00 PM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mudra

  • ****
  • 78
  • +0/-0
Re: Email Archiving
« Reply #25 on: May 28, 2009, 01:16:27 PM »
Mary,

The output of the commands is as follows:-

config show mailarchiva

mailarchiva=service
    TCPPort=8090
    access=private
    status=enabled

ls -al /etc/rc.d/rc7.d (I have editied this as the list was quite long and I didn't think that you needed anything else).
....
lrwxrwxrwx   1 root root    32 Nov 24  2008 S98haldaemon -> /etc/rc.d/init.d/e-smith-service
lrwxrwxrwx   1 root root    32 Nov 24  2008 S99local -> /etc/rc.d/init.d/e-smith-service
lrwxrwxrwx   1 root root    32 Oct  9  2008 S99mailarchiva -> /etc/rc.d/init.d/e-smith-service
lrwxrwxrwx   1 root root    32 Mar  5 08:34 S99mysql.init -> /etc/rc.d/init.d/e-smith-service
.....
I hope that this helps

Thanks for your help.

Murda

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Email Archiving
« Reply #26 on: May 28, 2009, 01:56:00 PM »
ok..

is there a mailarchiva script in /etc/rc.d/init.d?

Ciao
Stefano

Offline devtay

  • *
  • 145
  • +0/-0
Re: Email Archiving
« Reply #27 on: May 28, 2009, 02:44:11 PM »
Please can you let me know how you cured this problem.

Mudra,

I am sorry my friend. I didn't get it going and gave up. My mailarchiva server is installed on an Ubuntu box and works like the install said it should. I will say that the install on the SME server was dramatically different than the Ubuntu server. Maybe it is the version difference that is causing the issue (I installed the latest and the wiki is for another version). Good luck.
You can't stop what's coming. It ain't all waiting on you.

Offline mudra

  • ****
  • 78
  • +0/-0
Re: Email Archiving
« Reply #28 on: May 29, 2009, 12:06:00 PM »
Stefano,

I have the following from /etc/init.d/rc.d

ls m*
masq  mdmonitor  mdmpd  messagebus  microcode_ctl  mysqld  mysql.init

It appears that I have no mailarchiva script !! Is there a step missing from the wiki instructions, as I cut and paste them into my server.

Let me know if you need anymore information, or if this give you any ideas.

I look forward to hearing from you.

Mudra

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Email Archiving
« Reply #29 on: May 29, 2009, 01:29:15 PM »
I have the following from /etc/init.d/rc.d

I think you mean /etc/rc.d/init.d, right?

Quote
ls m*
masq  mdmonitor  mdmpd  messagebus  microcode_ctl  mysqld  mysql.init

It appears that I have no mailarchiva script !! Is there a step missing from the wiki instructions, as I cut and paste them into my server.

Let me know if you need anymore information, or if this give you any ideas.

I look forward to hearing from you.

Mudra

well.. mailarchiva should install mailarchiva init script

I see in the tgz, in mailarchiva_dist/mailarchiva/server/ directory a file "mailarchiva".. please copy it to /etc/rc.d/init.d and make it executable

it should work.

NOTE: I never tried it, so I can't go far from here :-)

Ciao
Stefano