Wants to Keep a copy of outgoing emails

Taking care of your Linux box.

Wants to Keep a copy of outgoing emails

Postby aamirhussain » Sun Mar 07, 2010 5:44 pm

AOA, I'm using Sendmail as MTA on RHEL 3 and for compliance issues, our company wants to keep a record of all outgoing / incoming messages of few users.

Kindly guide how do I configure Sendmail to forward a copy of inbound/outbound emails to a monitoring account.

Regards,

Aamir
aamirhussain
Lance Naik
 
Posts: 29
Joined: Fri Jul 08, 2005 1:11 pm

Postby lambda » Sun Mar 07, 2010 9:03 pm

perhaps you can use something like this.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore

Postby syedbilalmasaud » Sun Apr 11, 2010 5:51 pm

Use Maildroprc , it will solve your problem

http://www.courier-mta.org/maildrop/
Cheers :)

:D B I L A L :D
syedbilalmasaud
Naib Subedar
 
Posts: 347
Joined: Thu Aug 18, 2005 9:25 am
WLM: bm1984@hotmail.com
Yahoo Messenger: syedbilalmasaud@yahoo.com
Location: Attock

Postby lambda » Mon Apr 12, 2010 8:42 pm

yet another useless suggestion by our favorite job poster. no, maildrop won't help at all.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore

Postby syedbilalmasaud » Tue Apr 13, 2010 11:45 am

Lambda,

maildroprc is one of my tested and working solution to archive all outgoing and incoming emails with sendmail as well as postfix , if you want configuration file let me know I will paste here

and please don't take things personal
Cheers :)



:D B I L A L :D
syedbilalmasaud
Naib Subedar
 
Posts: 347
Joined: Thu Aug 18, 2005 9:25 am
WLM: bm1984@hotmail.com
Yahoo Messenger: syedbilalmasaud@yahoo.com
Location: Attock

Re: Wants to Keep a copy of outgoing emails

Postby syedbilalmasaud » Tue Apr 13, 2010 11:59 am

aamirhussain wrote:AOA, I'm using Sendmail as MTA on RHEL 3 and for compliance issues, our company wants to keep a record of all outgoing / incoming messages of few users.

Kindly guide how do I configure Sendmail to forward a copy of inbound/outbound emails to a monitoring account.

Regards,

Aamir



Dude ,

I am searching for config file because our firm is migrated to Zimbra the solution what I had created three years back , I am looking in to backup devices as soon as I found it I will paste here and maildroprc can do the exact job what you have requested
Cheers :)



:D B I L A L :D
syedbilalmasaud
Naib Subedar
 
Posts: 347
Joined: Thu Aug 18, 2005 9:25 am
WLM: bm1984@hotmail.com
Yahoo Messenger: syedbilalmasaud@yahoo.com
Location: Attock

Postby lambda » Tue Apr 13, 2010 1:56 pm

please paste the script here, for sendmail.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore

Postby syedbilalmasaud » Tue Apr 13, 2010 2:32 pm

Here you go

This was running on sendmail first than later migrated to postfix but as far I remember I had not made any change while migration to postfix and I have changed the domain names to domain-1 , domain-2 , domain-3 and some test users commented which I add first for testing but first\.last is like bilal.masaud@whateverdomain.com or whatever it is


but at the end I am getting all emails archived at archive@what... .com


hope now its clear


---------------------------------------------------------------

# Global maildrop filter file

# Uncomment this line to make maildrop default to ~/Maildir for
# delivery- this is where courier-imap (amongst others) will look.
#DEFAULT="$HOME/Maildir"
VERBOSE=ON
SHELL="/bin/sh"
logfile "/var/log/maildrop.log"
dirname=`date +%Y-%m`
maildir="/var/spool/virtmail/quarantine"
#if ( (/^Delivered-To: first\.last@domain-1\.com/ \
# && $SIZE < 26144 )

#{
# exception {
# xfilter "/usr/bin/spamassassin"
# }
#}

#if ( /^Return-Path: \<MAILER-DAEMON\>$/)
#{
# to $HOME
#}


if ( $SIZE < 99800 )
{
if ( /^Return-Path: \<.*@domain-1\.com\>$/)
{
to $HOME
}
if ( /^Return-Path: \<.*@my2connect\.com\>$/)
{
to $HOME
}
if ( /^From: MAILER-DAEMON@runner\.domain-1\.com/)
{
to $HOME
}
if ( /^Return-Path: \<.*@domain-4\.com\>$/)
{
to $HOME
}

if ( /^Return-Path: \<.*@domain-2\.com\>$/)
{
to $HOME
}

# New Entry domain-3.com

if ( /^Return-Path: \<.*@domain-3\.com\>$/)
{
to $HOME
}


if (/^Delivered-To: archive@domain-1\.com$/)
{
to $HOME
}

if (/^Delivered-To: .*@domain-1\.com$/)
{
exception {
xfilter "/usr/bin/spamassassin"
}

# if ( (/^Delivered-To: first\.last@domain-1\.com$/) \
# || (/^Delivered-To: first\.last@domain-1\.com$/) \
# || (/^Delivered-To: martin@domain-1\.com$/) \
# || (/^Delivered-To: first\.last@domain-1\.com$/) \
# || (/^Delivered-To: first\.last@domain-1\.com$/) \
# || (/^Delivered-To: eyad@domain-1\.com$/) \
# \
# )
# {
if ( /^X-Spam-Status: *Yes/)
{
`test -d $maildir/domain-1.com/.$dirname`
if( $RETURNCODE == 1 )
{
`/usr/bin/maildirmake -f $dirname $maildir/domain-1.com`
}

to "$maildir/domain-1.com/.$dirname/"
}
# }
}

if (/^Delivered-To: .*@domain-4\.com$/)
{
exception {
xfilter "/usr/bin/spamassassin --siteconfigpath /etc/spamassassin/domain-4.com/"
}
if ( /^X-Spam-Status: *Yes/)
{
`test -d $maildir/domain-4.com/.$dirname`
if( $RETURNCODE == 1 )
{
`/usr/bin/maildirmake -f $dirname $maildir/domain-4.com`
}

to "$maildir/domain-4.com/.$dirname/"
}

}
# New Entry for domain-3.com

if (/^Delivered-To: .*@domain-3\.com$/)
{
exception {
xfilter "/usr/bin/spamassassin --siteconfigpath /etc/spamassassin/domain-3.com/"
}
if ( /^X-Spam-Status: *Yes/)
{
`test -d $maildir/domain-3.com/.$dirname`
if( $RETURNCODE == 1 )
{
`/usr/bin/maildirmake -f $dirname $maildir/domain-3.com`
}

to "$maildir/domain-3.com/.$dirname/"
}

}



if (/^Delivered-To: .*@domain-2\.com$/)
{
exception {
xfilter "/usr/bin/spamassassin --siteconfigpath /etc/spamassassin/domain-2.com/"
}

}
}


---------------------------------------------------------------

I am also looking for sendmail.cf and sendmail.mc files but may be someone deleted because we are not using sendmail or postfix standalone on mail server , this all was done 2.5 to 3 years back
Cheers :)



:D B I L A L :D
syedbilalmasaud
Naib Subedar
 
Posts: 347
Joined: Thu Aug 18, 2005 9:25 am
WLM: bm1984@hotmail.com
Yahoo Messenger: syedbilalmasaud@yahoo.com
Location: Attock

Postby syedbilalmasaud » Tue Apr 13, 2010 2:36 pm

this script is also doing the spam check for incoming emails and I am still looking for sendmail config scripts , I am afraid might I lost it but I will keep try up to few hours in different locations

by the way I have found the last postfix files main and master , if you need I can send you via email

thanks
Cheers :)



:D B I L A L :D
syedbilalmasaud
Naib Subedar
 
Posts: 347
Joined: Thu Aug 18, 2005 9:25 am
WLM: bm1984@hotmail.com
Yahoo Messenger: syedbilalmasaud@yahoo.com
Location: Attock

Postby lambda » Wed Apr 14, 2010 1:56 am

i don't see any place where it hooks into sendmail to record outgoing emails. configuring maildrop (or procmail, or whatever) is trivial; connecting it to your mail server isn't.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore


Return to “%s” Administration

Who is online

Users browsing this forum: No registered users and 0 guests

cron