Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 16 to 30 of 52
  1. #16
    Registered User
    Join Date
    Jan 2004
    Location
    Atlanta Ga!
    Posts
    43

    Default

    Here you go... this will get every email that comes in OR goes out that contains the domain name in the header.

    if $message_headers matches "domain.com"
    then
    unseen deliver monitor@domain.com
    endif

    I tested it and it works for me.

    If you want to do multiple domains, just change the if line from:
    if $message_headers matches "domain.com"
    to
    if $message_headers matches "domain.com|domain2.com|domain3.com"

    etc
    Last edited by elitewebninja; 09-28-2005 at 03:00 PM.

  2. #17
    Member
    Join Date
    Mar 2003
    Posts
    55

    Default

    Quote Originally Posted by elitewebninja
    Here you go... this will get every email that comes in OR goes out that contains the domain name in the header.

    if $message_headers matches "domain.com"
    then
    unseen deliver monitor@domain.com
    endif

    I tested it and it works for me.

    If you want to do multiple domains, just change the if line from:
    if $message_headers matches "domain.com"
    to
    if $message_headers matches "domain.com|domain2.com|domain3.com"

    etc

    OK! But if i would like to add something to subjest eg. [OUTGOING-CATCH], or change subject with that, is that possible?

  3. #18
    Member
    Join Date
    Apr 2005
    Posts
    246

    Default

    Quote Originally Posted by AQHost
    Had a request for this too, and did it successfully with a filter in /etc/antivirus.exim

    Code:
    if $sender_address is monitored@address.com
    then
     unseen deliver monitoring@address.com
    endif
    That will forward a copy of any mail sent by monitored@address.com to the monitoring@address.com mailbox. Copying the incoming mail is done easily with a standard forwarder.
    Thank you. This works, but only if the email is sent FROM the user. I am using my domain to actually send emails, but the FROM is different--the FROM is my local ISP email address. I am using Outlook to send my email. Any idea what I should use instead of 'sender_address' to check the authenticated user?

    Just to clarify, here is an example.

    My hosting domain: GREAT.COM
    My hosting domain email ID through cpanel: ERICK@GREAT.COM
    My ISP email address: ERICK@AOL.COM

    When my friends receive email, they see the 'FROM' as ERICK@AOL.COM, but I am actually sending email through my own hosting domain GREAT.COM, so my smtp server is SMTP.GREAT.COM.

    Appreciate any ideas!

  4. #19
    Member
    Join Date
    Feb 2003
    Location
    Texas
    Posts
    73

    Default add to

    Just add this to /etc/antivirus.exim

    if $message_headers matches "domain.com"
    then
    unseen deliver monitor@domain.com
    endif
    Last edited by rgpayne; 05-25-2006 at 01:48 AM.

  5. #20
    Member
    Join Date
    Apr 2005
    Posts
    246

    Default

    I tried this, and it doesn't work. Any other ideas?

  6. #21
    Member
    Join Date
    Feb 2003
    Location
    Texas
    Posts
    73

    Default

    did you restart exim?

    should work perfect if you restart exim so it will read the new settings

  7. #22
    Member
    Join Date
    Apr 2005
    Posts
    246

    Default

    Of course I restarted. Doesn't work.

    Thank you for replying. ANy other things I can try?

  8. #23
    Member
    Join Date
    Dec 2004
    Posts
    38

    Default

    Hi,

    I did this and it worked. email in and out copied to the specified address. I was having one issue where the incoming emails where being delivered twice to the monitoring email address.

    Mike

  9. #24
    Member
    Join Date
    Mar 2003
    Posts
    55

    Default

    I was having one issue where the incoming emails where being delivered twice to the monitoring email address.
    I have the same issue, haw did you manage to reolve that?

  10. #25
    Member
    Join Date
    Dec 2004
    Posts
    38

    Default

    Hi,

    I'm still addressing this. One thought although manual, would be to use:

    $sender_address

    insteade of

    $message_headers

    That wold give out going only. Then create a forward for each address through the CP for incoming that matches the email account to monitor.

    I'd like to find a way to do this with one or 2 exim directives, though. If I find someting I'll post it here.

    Mike

  11. #26
    Member
    Join Date
    Nov 2002
    Posts
    1,781
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    The below catches all incoming as well as outgoing messages for a domain.

    PHP Code:
    if first_delivery
       
    and ("$h_to:, $h_cc:" contains "@domain.com")
       or (
    "$h_from:" contains "@domain.com")
    then
       unseen deliver 
    "all-catcher@domain.com"
    endif 
    For just catching all incoming use the following:

    PHP Code:
    if first_delivery
       
    and ("$h_to:, $h_cc:" contains "@domain.com")
    then
       unseen deliver 
    "incoming-catcher@domain.com"
    endif 
    Similarly for catching only all outgoing

    PHP Code:
    if first_delivery
       
    and ("$h_from:" contains "@domain.com")
    then
       unseen deliver 
    "outgoing-catcher@domain.com"
    endif 
    :: Anand ::

    ssh root@
    who the hell is root ???

    Cpanelappz Support Forums are up now. Register Today
    http://forums.cpanelappz.com

    WHM/cPanel API : http://whmapi.cpanelappz.com
    Cpanel Login Script : www.cpanelappz.com/cpanel-login-script.htm
    Exiscan+Clam+Exim Auto Installer : www.cpanelappz.com

  12. #27
    Member
    Join Date
    Dec 2004
    Posts
    38

    Default

    Hi,

    Thanks, I'll test these out.

    Mike

  13. #28
    Member
    Join Date
    Jan 2005
    Location
    Kolkata, India
    Posts
    15

    Default

    Can i redirect all outgoing mails of a particular domain to an email id on the domain ??

    Ashish

  14. #29
    Member
    Join Date
    Dec 2004
    Posts
    38

    Default

    Hi anand,

    These worked out well for me. Thanks for the samples.

    Quote Originally Posted by anand
    The below catches all incoming as well as outgoing messages for a domain.

    PHP Code:
    if first_delivery
       
    and ("$h_to:, $h_cc:" contains "@domain.com")
       or (
    "$h_from:" contains "@domain.com")
    then
       unseen deliver 
    "all-catcher@domain.com"
    endif 
    Mike

  15. #30
    Member
    Join Date
    Jan 2005
    Location
    Kolkata, India
    Posts
    15

    Wink

    Hi,

    It worked fine for me also but 2 copies of all the incoming mails are getting delivered.

    Regards

    Ashish

Similar Threads & Tags
Similar threads

  1. Is SpamAssassin scanning outgoing mails?
    By Kent Brockman in forum E-mail Discussions
    Replies: 0
    Last Post: 07-11-2008, 07:32 PM
  2. copy of outgoing mails ???
    By furquan in forum E-mail Discussions
    Replies: 2
    Last Post: 03-15-2008, 08:13 AM
  3. extend the outgoing mails
    By Vinu007 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-02-2008, 09:04 AM
  4. Filter to copy outgoing e-mails.
    By Pringle9984 in forum E-mail Discussions
    Replies: 0
    Last Post: 06-26-2007, 11:13 AM
  5. Redirect outgoing mails ???
    By furquan in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 05-28-2007, 07:51 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube