The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

outgoing mails copy

Discussion in 'E-mail Discussions' started by anand, Jun 7, 2005.

  1. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I have a strange requirement come to me from few customers who are moving from plesk to cpanel. It seems in plesk there is a feature to forward a copy of all outgoing mails send through SMTP/webmail to an email id which can be defined by the user itself. This allows administrators in companies to check what mail traffic is being using the company domain.

    I understand using exim filters something like this can be achieved, is there someone who has done something like this ? I tried searching in the forums however none of the posts seemed to have any satisfying replies/ solution.

    Any help would be appreciated.
     
  2. Aric1

    Aric1 Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    324
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    MailScanner can do that. Add MailWatch and the mail doesn't need to be forwarded, you can check it on-line via a browser. Chirpy has the MailScanner frontend for CPANEL that includes a WHM backend that can integrate MailWatch.
     
  3. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Thx for the reply however i am looking at a solution which doesn't include mailscanner.
     
  4. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    anyone with solution to this ?
     
  5. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    A bit of a vague suggestion . . .

    If Plesk uses Exim, one would hope that the setting chosen through Plesk's interface changes something in the Exim configuration. If so, you could do the same, which would of course require a good look through the Exim documentation.
     
  6. NT

    NT Well-Known Member

    Joined:
    May 4, 2004
    Messages:
    137
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    As far as I know, Plesk uses qmail.
     
  7. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Yup thats what i thought.
     
  8. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    You might be able to use something like the follow I found.

    In exim.conf in system_filter.
    Code:
    if
     $sender_host_authenticated is not "" and $authenticated_id is not ""
    then
     unseen deliver ${quote:$authenticated_id}+Sent@xxxxxxxxxxxxxxxxx
    endif
    
    
    That said, chirpy would be a good one to ask.
     
  9. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I would imagine that it would indeed be the system filter that you would have to use some kind of coding , the main trick is ensuring that it is outgoing email that you are parsing and not incoming email. I would think that's what the condition statements are doing.

    Have a play with what dgbaker posted, culd well work ;)
     
  10. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Thx guys, i will check it out.
     
  11. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    348
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    anand, did you manage to make it work? For some interesting reason I also have this request from one of our dedicated server owners.
     
  12. Ali

    Ali Well-Known Member

    Joined:
    Jul 12, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Suprising as it is we have received similar requests too, customers wishing to keep a copy of Incoming and Outgoing emails exchanged via their business domains by banking/filing the mails on a specific email account.
     
  13. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Due to some other work in hand, i had to leave this problem in as it is condition. Do post if you guys find something on this. As dgbaker and chirpy said, system filters would be the solution for the same.
     
  14. AQHost

    AQHost Active Member

    Joined:
    Apr 14, 2003
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  15. Zaf

    Zaf Well-Known Member

    Joined:
    Aug 22, 2005
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    I believe that would only work for one email id only...could we do it for all mail ids for a domain or all domains even?
     
  16. elitewebninja

    elitewebninja Active Member

    Joined:
    Jan 2, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Atlanta Ga!
    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
     
    #16 elitewebninja, Sep 28, 2005
    Last edited: Sep 28, 2005
  17. tsook

    tsook Well-Known Member

    Joined:
    Mar 21, 2003
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6

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

    erick_paper Well-Known Member

    Joined:
    Apr 19, 2005
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    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!
     
  19. rgpayne

    rgpayne Well-Known Member

    Joined:
    Feb 25, 2003
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Texas
    add to

    Just add this to /etc/antivirus.exim

    if $message_headers matches "domain.com"
    then
    unseen deliver monitor@domain.com
    endif
     
    #19 rgpayne, May 25, 2006
    Last edited: May 25, 2006
  20. erick_paper

    erick_paper Well-Known Member

    Joined:
    Apr 19, 2005
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    I tried this, and it doesn't work. Any other ideas?
     
Loading...

Share This Page