Monitor incoming and outgoing mails

May-21st-2010

How to install ZCS open source on Fedora | CentOS | RedHat

Today morning i am hunting about how to monitor incoming and outgoing mails in Postfix & Zimbra mail server. After half an hour I got the solution and worked perfectly for me.  I am sharing some tricky steps :-

Postfix V2.1 supports a “sender_bcc_maps” and  “recipient_bcc_maps”  functions.

If you are using postfix then use following steps :-

[root@map007]#  vi  /etc/postfix/main.cf

Add following line to get  a bcc copy to your email id when some one send a mail :-

sender_bcc_maps = hash:/etc/sender_bcc

Add following line to get a bcc copy to your email id when some one receive a mail :-

recipient_bcc_maps = hash:/etc/recipient_bcc

Now create these two files under etc/ directory.

[root@map007]#  touch  /etc/sender_bcc

[root@map007]#  touch  /etc/recipient_bcc

Edit these files and add entry like this :-

support@linuxsurgeon.org admin@linuxsurgeon.org

After this I will get in/out mail’s copy of support email account to admin email id.

Now run following commands :-

[root@map007]# postmap /etc/sender_bcc

[root@map007]# postmap /etc/recipient_bcc

[root@map007]# /etc/init.d/postfix  restart

=========================================================================

If you are using Zimbra then use following steps :-

[root@map007]#  vi  /opt/zimbra/postfix/conf/main.cf

Add following line to get  a bcc copy to your email id when some one send a mail :-

sender_bcc_maps = hash:/etc/sender_bcc

Add following line to get a bcc copy to your email id when some one receive a mail :-

recipient_bcc_maps = hash:/etc/recipient_bcc

Now create these two files under etc/ directory.

[root@map007]#  touch  /etc/sender_bcc

[root@map007]#  touch  /etc/recipient_bcc

Edit these files and add entry like this :-

support@linuxsurgeon.org admin@linuxsurgeon.org

After this I will get in/out mail’s copy of support email account to admin email id.

Now run following commands :-

[root@map007]# cd /opt/zimbra/postfix/sbin

[root@map007]#  ./postmap /etc/sender_bcc

[root@map007]#  ./postmap /etc/recipient_bcc

[root@map007]#  ./postfix  reload

=========================================================================

Enjoy Linux !!!

Mega World News Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google Yahoo Buzz StumbleUpon Weekend Joy

Comments

  1. p-root Said,

    Good Knowledge-base piyush….. :)

  2. pharmacy tech Said,

    What a great resource!

  3. physical therapist Said,

    found your site on del.icio.us today and really liked it.. i bookmarked it and will be back to check it out some more later

  4. cna classes Said,

    Terrific work! This is the type of information that should be shared around the web. Shame on the search engines for not positioning this post higher!

  5. Occupational Therapy Said,

    this post is very usefull thx!

  6. government grants Said,

    Great site. A lot of useful information here. I’m sending it to some friends!

  7. college grants Said,

    Great information! I’ve been looking for something like this for a while now. Thanks!

  8. school grants Said,

    I’ve recently started a blog, the information you provide on this site has helped me tremendously. Thank you for all of your time & work.

  9. Wordpress Themes Said,

    Amiable dispatch and this enter helped me alot in my college assignement. Thank you on your information.

  10. tawich Said,

    Good Knowledge-base I will follow for use my zimbra in company

    Thaink You

  11. Chenthil Said,

    Pls be aware that main.cf of postfix regenerated for every $zmcontrol stop and $ zmcontrol start …
    Surely it is gud idea to have personal backup for an account ….

  12. tawich Said,

    this post is very usefull
    i will follow for work..

Add A Comment

*