?
Solved

MailScanner Email Archive

Posted on 2005-03-22
19
Medium Priority
?
1,052 Views
Last Modified: 2012-05-05
Hello All,

There is one option in Mailscanner called mailarchive which looks like

#
# Mail Archiving and Monitoring
# -----------------------------
#

# Space-separated list of any combination of
# 1. email addresses to which mail should be forwarded,
# 2. directory names where you want mail to be stored,
# 3. file names (they must already exist!) to which mail will be appended
#    in "mbox" format suitable for most Unix mail systems.
#
# If you give this option a ruleset, you can control exactly whose mail
# is archived or forwarded. If you do this, beware of the legal implications
# as this could be deemed to be illegal interception unless the police have
# asked you to do this.
#Archive Mail = /var/spool/MailScanner/archive
Archive Mail =/backup/mailarchive/emails

Right now as you can see I am storing all emails but thats not I want , I wanted to store specific emails like

my email address is

abc@abc.com so any thing send or receive by abc@abc.com should be saved in /backup/mailarchive/abc-mailaccount/emails

I know there is a way but there isnt much information, please help me in this matter.

Thanks
0
Comment
Question by:wcws
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 7
  • 2
19 Comments
 
LVL 14

Expert Comment

by:pablouruguay
ID: 13610272
yep but no with Mailscanner, Mailscanner save entire mailboxes of all users.

if you add in the file /etc/aliases for example

realuser:   realuser, backupuser

you have a replica of your mailbox in /var/mail/backupuser

after that you can copy and move anywere.


remeber to execute after modifications newaliasesscript in console prompt
0
 

Author Comment

by:wcws
ID: 13612225
According to your statement you can only save the emails which are coming in ? not outgoing.

I am pretty sure you can do it with MailScanner I've read somewhere but I am not too sure.
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 13613032
0
How to Create Failover DNS Record Sets in Route 53

Route 53 has the ability to easily configure DNS record sets specifically for failover scenarios. These failover record sets can be configured to failover to full-blown deployments in other regions or to a static HTML page that informs your customers of the issue.

 

Author Comment

by:wcws
ID: 13616575
I've tried the following

FromOrTo: email@email.com   yes forward  /backup/emailarchive/email.mbx

and I've tried

FromOrTo: email@email.com   /backup/emailarchive/email.mbx

Bothways Its not saving any emails also I've also edit the MailScanner.conf file and define the path and everything but still its not saving any emails please let me know what did I do wrong.

Thanks
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 13617709
no nothing this is the rigth sintaxis.  you restart Mailscanner?
0
 

Author Comment

by:wcws
ID: 13617734
yes,
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 13618087
ok

you add the file archive.rules in

/etc/mail/Mailscanner/rules/  ???

or in your rules folder?


and the sintaxis are wrong. sorry for comment before that i not realize about this the sintax are

FromOrTo: pablouruguay@yahoo.com yes
From: pablito@yahoo.com no
To: myhome@yahoo.com yes
FromOrTo: default /var/spool/MailScanner/archive/archive.mbx
0
 

Author Comment

by:wcws
ID: 13618320
ok I've a email address in my server which is

email@email.com

so Will I do like this

FromOrTo: email@email.com    yes
FromOrTo: default /var/spool/MailScanner/archive/archive.mbx

What does default means will that means It will archive every single emails sending and receiving from my server ? If yes then thats what I dont want. I want only 1 email account to be archive i.e. its sending and receiving.

Thanks
0
 

Author Comment

by:wcws
ID: 13618325
yes, I did add the archive.rules in my MailScanner.conf as well in rules folder.
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 13618375
ok, leave this question open i will in vacation until monday, and i answer other experts about these question, in monday i bet to have the answer :)
0
 

Author Comment

by:wcws
ID: 13618502
wow
0
 

Author Comment

by:wcws
ID: 13618504
Is there any one , please
0
 

Author Comment

by:wcws
ID: 13638808
This is a right solution


Into MailScanner.conf:
Archive Mail = /usr/local/etc/MailScanner/rules/arch.rules
where /usr/local/etc/MailScanner/rules/ - rules directory - in Linux may by in
another place

Into arch.rules:
FromOrTo:     abc@abc.com /backup/mailarchive/abc-mailaccount/emails
FromOrTo:     qqq@www.com /some/another/place

I've able to do this myself ?
0
 
LVL 14

Accepted Solution

by:
pablouruguay earned 2000 total points
ID: 13643104
Archive Mail = %rules-dir%/archive.mail.rules

and then in /etc/MailScanner/rules/archive.mail.rules you want this:

To: pablo@lac.net /backup/mailarchive/emails/pablo
To: ssss@lac.net /backup/mailarchive/emails/ssss
FromOrTo: default


thats all. is working for me!
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 13683409
and ??? what happend with this?
0
 
LVL 1

Expert Comment

by:SYSHALL
ID: 15145059
Hi there
I have done the proposed solution to archive mail as mentioned above and it works, however now i want to be enabled to restore some of the mail which has attached files inside the mail, how do i do that? i have samba setup on tis machine so that i can access/copy the folder holding the messages to a winclient with for example Thunderbird or Express, do i have to auto rename the files, convert or what? i can open the mail in express with the extension .eml ,but the attached file is included in the entire message and not as a file?

PLS help i really need to have this solved.

se attached mail below, ibelive the last part is the moset interesting since it seems to include the zip file?!

"
------_=_NextPart_001_01C5D870.69EA5DCC
Content-Type: multipart/alternative;
boundary="----_=_NextPart_002_01C5D870.69EA5DCC"


------_=_NextPart_002_01C5D870.69EA5DCC
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

=20

=20

user usersurname
domain i region AB
cityerarev=E4gen 42, 300 00 cityberg
Tfn: 00-000000, Fax: 00-000000, Mobil: 00-00 00 00
E-post: user.user@user.se =
<blocked::mailto:user.user@user.se> Web: =
www.domain.se/region <=20"http://www.domain.se/region>=20
*******************************************************************

domain har en framskjuten position bland Nordens IT -konsultf=F6retag.
domains aff=E4rsid=E9 =E4r att aktivt st=F6dja kundernas =
aff=E4rsutveckling
med effektiva informationssystem.
domain =E4r etablerat med kontor och dotterbolag p=E5 35 platser i =
norra Europa

Detta mail kommer fr=E5n en scan spamfilter Server.
Vill du veta mer om spamfilter och hur ditt f=F6retag
enkelt kan spara resurser klicka p=E5 l=E4nken f=F6r
produktblad och prisuppgifter


=20


------_=_NextPart_002_01C5D870.69EA5DCC
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Garamond;
panose-1:2 2 4 4 3 3 1 1 8 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.E-postmall17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
{page:Section1;}
-->
</style>

</head>

<body lang=3DSV link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><st1:PersonN=
ame
ProductID=3D"user usersurname" w:st=3D"on"><font size=3D2 =
face=3DGaramond><span
style=3D'font-size:10.0pt;font-family:Garamond'>user =
usersurname</span></font></st1:PersonName></u1:PersonName><br>
<b><font size=3D2 face=3DGaramond><span =
style=3D'font-size:10.0pt;font-family:Garamond;
font-weight:bold'>domain&nbsp;i <u3:PLACE u2:insAuthor=3D"user =
usersurname" u2:insDate=3D"2005-03-24T12:03:00Z" u2:endInsAuthor=3D"user =
usersurname" u2:endInsDate=3D"2005-03-24T12:03:00Z"><u3:CITY =
u2:insAuthor=3D"user usersurname" u2:insDate=3D"2005-03-24T12:03:00Z" =
u2:endInsAuthor=3D"user usersurname" =
u2:endInsDate=3D"2005-03-24T12:03:00Z">region</u3:CITY>
<u3:STATE u2:insAuthor=3D"user usersurname" =
u2:insDate=3D"2005-03-24T12:03:00Z" u2:endInsAuthor=3D"user usersurname" =
u2:endInsDate=3D"2005-03-24T12:03:00Z">AB<br>
</span></font></b><font size=3D2 face=3DGaramond><span =
style=3D'font-size:10.0pt;
font-family:Garamond'></u3:STATE></u3:PLACE>cityerarev=E4gen 42, 311 =
36
cityberg<br>
Tfn: 0346-71 43 13, Fax: 0346-714 317, Mobil: 0706-75 45 85<br>
E-post:&nbsp;<a href=3D"blocked::mailto:user.user@user.se"
title=3D"BLOCKED::mailto:user.user@user.se&#10;mailto:user.w=
armbold@domain.se"><span
title=3D"BLOCKED::mailto:user.user@user.se"><span
title=3D"BLOCKED::mailto:user.user@user.se&#10;mailto:user.w=
armbold@domain.se">user.user@user.se</span></span></a>&nbsp;
Web: <a href=3D"http://www.domain.se/region"
title=3D"http://www.domain.se/region"><span
title=3D"http://www.domain.se/region"><span
title=3D"http://www.domain.se/region">www.domain.se/region</span></sp=
an></a><br>
</span></font><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:
Arial'>******************************************************************=
*</span></font><o:p></o:p></p>

<p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=3D2 face=3DGaramond><span =
style=3D'font-size:10.0pt;font-family:Garamond'>domain
har en framskjuten position bland Nordens IT -konsultf=F6retag.<br>
domains aff=E4rsid=E9 =E4r att aktivt st=F6dja kundernas =
aff=E4rsutveckling<br>
med effektiva informationssystem.<br>
domain =E4r etablerat med kontor och dotterbolag p=E5 35 platser i =
norra Europa</span></font><o:p></o:p></p>

<p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><strong><b><=
font
size=3D3 color=3D"#4a4a4a" face=3DGaramond><span =
style=3D'font-size:12.0pt;font-family:
Garamond;color:#4A4A4A'>Detta mail kommer fr=E5n en scan spamfilter =
Server.</span></font></b></strong><b><font
color=3D"#4a4a4a" face=3DGaramond><span =
style=3D'font-family:Garamond;color:#4A4A4A;
font-weight:bold'><br>
<strong><b><font face=3DGaramond><span =
style=3D'font-family:Garamond'>Vill du veta
mer om spamfilter och hur ditt f=F6retag</span></font></b></strong><br>
<strong><b><font face=3DGaramond><span =
style=3D'font-family:Garamond'>enkelt kan
spara resurser klicka p=E5 l=E4nken f=F6r</span></font></b></strong><br>
<strong><b><font face=3DGaramond><span =
style=3D'font-family:Garamond'>produktblad
och prisuppgifter</span></font></b></strong><br>
<strong><b><font face=3DGaramond><span style=3D'font-family:Garamond'><a
href=3D"http://region02.domain.se/scanplus.pdf"
title=3D"http://region02.domain.se/scanplus.pdf"><font size=3D2
title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf"><span =
style=3D'font-size:
10.0pt'><span =
title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf">http://region02.sy=
steam.se/scanpl</span></font><font
size=3D2><span style=3D'font-size:10.0pt'>u</span></span></font><font =
size=3D2
title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf"><span =
style=3D'font-size:
10.0pt'>s</span></span></font></span><font size=3D2
title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf"><span =
style=3D'font-size:
10.0pt'>.</span></span></font></span><font size=3D2
title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf"><span =
style=3D'font-size:
10.0pt'>p</span></span></span></font><font size=3D2
title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf"><span =
style=3D'font-size:
10.0pt'><span =
title=3D"http://region02.domain.se/scanplus.pdf">d</span></span></sp=
an></font></span><font
size=3D2 title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf"><span =
style=3D'font-size:
10.0pt'></span><span =
title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf"><span
title=3D"http://region02.domain.se/scanplus.pdf">f</span></span></sp=
an></font></span></span></a></span></span></font></b></strong></span></fo=
nt></b><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>

------_=_NextPart_002_01C5D870.69EA5DCC--

------_=_NextPart_001_01C5D870.69EA5DCC
Content-Type: application/x-zip-compressed;
name="test med zipfil.zip"
Content-Transfer-Encoding: base64
Content-Description: test med zipfil.zip
Content-Disposition: attachment;
filename="test med zipfil.zip"

UEsDBAoAAAAAAOBOWDMAAAAAAAAAAAAAAAATAAAAdGVzdCBtZWQgemlwZmlsLnR4dFBLAQIUCwoA
AAAAAOBOWDMAAAAAAAAAAAAAAAATAAAAAAAAAAAAIAAAAAAAAAB0ZXN0IG1lZCB6aXBmaWwudHh0
UEsFBgAAAAABAAEAQQAAADEAAAAAAA==

------_=_NextPart_001_01C5D870.69EA5DCC--
"
Thanks for helping





0
 
LVL 1

Expert Comment

by:SYSHALL
ID: 15145931
Hi
Ok i resolved it myselv, if anyone is intressted read below:
I read somewhere that the mbx format was supported as eduora mail and
I installed Netscape messenger 4.51 since this was the only app i knew supported this format and voaila, the mailbox was imported with attacment in mails and everything.

Bye

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question