PDA

View Full Version : email archive



yoshikiwei
02-25-2005, 12:59 AM
Hi,

I have a user who request to have the following done:

1) direct all incoming emails for domain.com to an email account example@domain.com

2) sends a copy of all outgoing emails to the account example@domain.com

basically my user need to have an archive of all outgoing/incoming emails to be stored inside an email account

Can this be achieved ?

nobaloney
02-25-2005, 03:15 PM
Originally posted by yoshikiwei
1) direct all incoming emails for domain.com to an email account example@domain.com
This is easy; just set up a system catchall to one email address.

2) sends a copy of all outgoing emails to the account example@domain.com
This is impossible because you can't force your users to use your server for outgoing email. They can use their ISP, etc.

If you only want to save outgoing email you can do it by making changes to the default exim.conf file; either learn it yourself or find someone to do it for you.

However it's still a useless exercise as anyone can use any mailserver they want to use, to send email with a return address at the domain in question.

Jeff

infospace
02-26-2005, 09:58 AM
The catchall routes all incoming email to an account .

however, what if we require incoming email meant for user A to..

be sent to userA@domain.com, and another copy to archive@domain.com?

blacknight
02-27-2005, 08:00 AM
You can do it if you install Mailscanner, but it's not that easy :)

nobaloney
02-27-2005, 03:52 PM
Originally posted by infospace
The catchall routes all incoming email to an account .

however, what if we require incoming email meant for user A to..

be sent to userA@domain.com, and another copy to archive@domain.com?
But that's not what he asked for. He asked for all email to be sent to one account.

Originally posted by blacknight
You can do it if you install Mailscanner, but it's not that easy :)
I believe that if you set up a forward and a POP3 account for the same user, the mail will be forwarded and go to the POP account.

If this is true, then all infospace would have to do is create a forward and a POP3 account.

Jeff

sohaib
04-30-2005, 11:40 AM
If you've a Mail Scanner installed you can do it with no problem and nothing is Impossible. Here's the solution

Open your MailScanner.conf

At line 1071

Look for Archive Mail =

And add the following line

Archive Mail =/etc/MailScanner/rules/archive.rules

touch /etc/MailScanner/rules/archive.rules

vi /etc/MailScanner/rules/archive.rules

and add the following

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

Restart your Mailscanner

service MailScanner restart

Any email been sent or receive by youremail@youremail.com will be saved in /backup/emailarchive/youremail.mbx


Thank you,

Sohaib Khan
--
Qoogle Programming & Hosting Talk
www.qoogle.com

asmase
09-06-2007, 03:04 AM
The catchall routes all incoming email to an account .

however, what if we require incoming email meant for user A to..

be sent to userA@domain.com, and another copy to archive@domain.com?

How can i set this up when A receives B will get a copy , thats what my client wants is there a possible solution thats easy.

nobaloney
09-07-2007, 10:34 AM
First set up a mailbox for each user.

Then also set up a forwarder for userA which forwards to userB.

Since forwards and mailboxes are independent of each other, both will work.

So incoming mail for userA will end up in the userA mailbox AND will be forwarded to userB.

Jeff

freshmint
09-07-2007, 05:45 PM
First set up a mailbox for each user.

Then also set up a forwarder for userA which forwards to userB.

Since forwards and mailboxes are independent of each other, both will work.

So incoming mail for userA will end up in the userA mailbox AND will be forwarded to userB.

Jeff

Wouldn't this end up on an infinite loop?

nobaloney
09-08-2007, 07:54 PM
Not unless userB also forwards to userA. Have I missed that?

Perhaps better is to have a user archive, and mailboxes and forwards to archive from both userA and userB.

Jeff

freshmint
09-08-2007, 08:11 PM
Not unless userB also forwards to userA. Have I missed that?

Perhaps better is to have a user archive, and mailboxes and forwards to archive from both userA and userB.

Jeff

My bad, I misread you. ;)

I thought you were suggesting to create a forwarder from A to B and from B to A.

OliverScott
02-03-2008, 12:39 PM
This is an old post but I thought I would add a comment here incase anyone searches for this same topic!

I wanted to implement a system where outgoing email could be run through sa-learn as ham and obviously needed a way of getting my hands on this email in a usable format.

Edit /etc/system_filter.exim which controls how exim deals with emails going in and out of the system.

Add the following:

if first_delivery and
$sender_address_domain is domain1.com and
$sender_host_address is 127.0.0.1
then
noerror unseen deliver
destination_address@domain2.com
endif
if first_delivery and
$sender_address_domain is domain1.com and
$authenticated_id is not ""
then
noerror unseen deliver
destination_address@domain2.com
endif

Why the two versions? Well the first one catches emails sent though webmail and apache on my server, and the second one is for people using regular email clients.

Why $authenticated_id is not "" ? This is needed otherwise incoming email to this domain is also collected!

Probably a bit of a bodged solution, but may be of use to someone...

remikk
06-03-2008, 07:33 AM
Hi
I used last solution and email outgoing from my domain work perfect.
But not incoming email.
Why ? I have the same configuration in system_filter
if first_delivery and
$sender_address_domain is mydomain.pl and
$sender_host_address is 127.0.0.1
then
noerror unseen deliver
archiwum@mydomain.pl
endif

if first_delivery and
$sender_address_domain is mydomain.pl and
$authenticated_id is not ""
then
noerror unseen deliver
archiwum@mydomain.pl
endif

What wrong ?

steventay
03-18-2011, 01:43 AM
i will to know how can this be done.