LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   exploratory postfox questions (https://www.linuxquestions.org/questions/linux-newbie-8/exploratory-postfox-questions-685704/)

0utlawza 11-24-2008 05:27 AM

exploratory postfox questions
 
Hi Guys

This is more of a exploratory question before we start bashing out the nitty gritties of the problem.

I am using postfix, postfixadmin and dovecot to offer mail to all our users at the office. Seeing as we are a sales orientated company we do suffer from high turnover. My question is this. Is it possible to move the mail from the fired/resigned staff into the sales managers mailbox from the mail server itself and not have to add the account to the sales managers outlook.

Let me see if i can explain this a little better.

Sales person leaves. I want to start forwarding all new email to sales manager. Sales person still has old mail in virtual directory structure that the sales manager would like to read and clear out that which does not belong to the company. I would to move all the old mail in the virtual directory to the sales managers virtual mailbox. Then delete the sales persons email and put a permanent forward all mail to sales manager.

I have looked at the directory structure and tried to copy mail out to a test mailbox. Outlook borks once all the mail has been moved. Looks to have something to do with dovecots dovecot.index, dovecot.index.cache, dovecot.index.log, dovecot-uidlist, maildirfolder files. Are there any solution or tools out there to migrate users mail to other mailboxes.

Regards


Terry

djsoundfx 11-24-2008 12:46 PM

Well the first part of making sure new email that was destined for your old user is pretty easy that's easiest to do with aliases ( /etc/aliases usually) you need an entry like olduser: newuser@domain Check the man pages for aliases or http://www.postfix.org/aliases.5.html

I'm not terrible familiar with Dovecot but with other programs you can usually you can do something like cp -r /var/spool/olduser/mailbox /var/spool/imap/newuser/mailbox

If you're not sure where the mail is stored http://wiki.dovecot.org/MailLocation should help you discover that.

Test that, lemme know how it works and I'll see if I can't help more =)

billymayday 11-24-2008 02:28 PM

A couple of possibilities (sorry, but I unclear as to whether you are using mbox or maildir format mailboxes):

1) I would expect you can simply concatenate on mbox to another.
2) Try restarting dovecot post copy to see if it regenerates it's indices.
3) Open the account yourself (or get the manager to do it) using a different mail client like Thnderbird and see if that forces a rebuild.
4) You may be able to force rebuild by deleting the index files.

I'd be trying these on a test account first.

uncle_philip 11-24-2008 11:06 PM

under my setting of postfix, I have a file call "virtual" and "virtual.db". It assigns all users/virtual-users to real-users. If the old salesman left, just assign his entries to sale-manager.
under main.cf, virtual_alias_maps = hash:/.../.../virtual


All times are GMT -5. The time now is 08:33 AM.