LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to take all sendmail & Received mail backup (https://www.linuxquestions.org/questions/linux-server-73/how-to-take-all-sendmail-and-received-mail-backup-925583/)

sunrised24 01-25-2012 01:26 AM

How to take all sendmail & Received mail backup
 
Hi All.
I Had installed mail server in local internal purpose.
SENDMAIL &DOVEDOT

Its working fine,but how can i backup all the mail send & received by all user in another server system ,Can any one help me how can i migrate my mail server

when i check out user home directory i could int find any mail content
[root@localhost ~]# cd /home/
jane/ tom/
john/ vivekbansal/
[root@localhost ~]# cd /home/tom/
[root@localhost tom]# ls
dead.letter mail
[root@localhost tom]#

lithos 01-25-2012 03:00 AM

Quote:

Originally Posted by sunrised24 (Post 4583796)
Hi All.

when i check out user home directory i could int find any mail content
[root@localhost ~]# cd /home/tom/
[root@localhost tom]# ls
dead.letter mail
[root@localhost tom]#

Hi,

try
Code:

[root@localhost tom]# ls -al


and

ls -al mail    <--- this directory appears above in the directory when you do ls

what does it show ?

deep27ak 01-25-2012 03:47 AM

Quote:

Originally Posted by sunrised24 (Post 4583796)
Hi All.
I Had installed mail server in local internal purpose.
SENDMAIL &DOVEDOT

Its working fine,but how can i backup all the mail send & received by all user in another server system ,Can any one help me how can i migrate my mail server

when i check out user home directory i could int find any mail content
[root@localhost ~]# cd /home/
jane/ tom/
john/ vivekbansal/
[root@localhost ~]# cd /home/tom/
[root@localhost tom]# ls
dead.letter mail
[root@localhost tom]#

then go inside mail directory where you will get these directories
Code:

#cd /mail
#ls
inbox  INBOX.Drafts  INBOX.Sent  INBOX.Trash
#cat inbox >> /inbox.txt


sunrised24 01-25-2012 03:57 AM

Hi Deepak ,
i never any thing such hing over my user home dir .

[root@localhost ~]# cd /home/tom/
[root@localhost tom]# ls
dead.letter mail mbox
[root@localhost tom]# cd mail/
[root@localhost mail]# ls
[root@localhost mail]# ls -al
total 12
drwx------ 3 tom tom 4096 Jan 23 21:09 .
drwx------ 4 tom tom 4096 Jan 25 20:15 ..
drwx------ 3 tom tom 4096 Jan 23 21:09 .imap
[root@localhost mail]# cd .imap/
[root@localhost .imap]# ls
INBOX
[root@localhost .imap]# cd INBOX/
[root@localhost INBOX]# ls
dovecot.index dovecot.index.cache dovecot.index.log
[root@localhost INBOX]#

deep27ak 01-25-2012 04:14 AM

what is inside mbox??

check this location

Code:

#cd /var/spool/mail
#ls
user1 user2
#cat user1


sunrised24 01-25-2012 04:48 AM

Hi Deepak,
i could int find out mail box
[root@mail ~]# cd /var/spool/mail/
[root@mail mail]# ls
jane john root rpc tom vivekbansal
[root@mail mail]# cat vivekbansal
From MAILER_DAEMON Wed Jan 25 21:24:00 2012
Date: Wed, 25 Jan 2012 21:24:00 +0530
From: Mail System Internal Data <MAILER-DAEMON@mail.etl.com>
Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
Message-ID: <1327506840@mail.etl.com>
X-IMAP: 1327335335 0000000002
Status: RO

This text is part of the internal format of your mail folder, and is not
a real message. It is created automatically by the mail system software.
If deleted, important folder data will be lost, and it will be re-created
with the data reset to initial values.

deep27ak 01-25-2012 05:09 AM

copy the mail to a text file and read properly.
I believe that must be a bounced message which you are reading. It should show all the mails

Code:

#cat vivekbansal >> /vivek.txt

#vi /vivek.txt

and check once again


All times are GMT -5. The time now is 04:57 AM.