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.

Incoming/Outgoing email copy

Discussion in 'E-mail Discussions' started by crazyaboutlinux, Apr 3, 2009.

  1. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Hoping someone can help me for this


    I need all incoming and outgoing mail forwarding to any other gmail account

    How to do outgoing fw. ?

    we are using

    cPanel 11.24.4-S34960
    WHM 11.24.2 - X 3.9
    CENTOS 5.3 i686 standard
     
  2. hzJayJ

    hzJayJ Well-Known Member

    Joined:
    Nov 14, 2008
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    It is not possible to forward outgoing mails from cpanel.

    You can use the option forward options under your cpanel>>mail>>Forwarders to froward the incoming mails.
     
  3. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    Not entirely accurate...

    From within cPanel, no. But it's fairly simple to do...

    A) your email program's outgoing mail server must use your cPanel server. If you use your ISP mail server to send mail, you can't do any processing on it.

    B) configure your server to copy all email to the third account. There are several ways to do this, but the easiest to maintain is by installing MailScanner.

    I highly recommend using the mailscanner stuff that configserver.com provides.

    In any case, if you go this route, it's as simple as using the mailscanner 'archive' features to capture the email and forward it thusly:

    in the 'archive.rules' file:

    FromOrTo: *origin-domain.com address@sent-to-domain.com

    This grabs email that is addressed From or To any address of origin-domain.com and sends it to address@sent-to-domain.com
     
  4. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    you mean this is allowing only from email program's not into webmail right ??
     
  5. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    If you set this up and use webmail, it will also capture those outgoing messages.
     
  6. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Brilliant! Thanks.

    I have been using configserver's Mailscanner for two plus years without ever realizing it had this capability.
     
    #6 meeven, Apr 22, 2009
    Last edited: Apr 22, 2009
  7. hploh

    hploh Member
    PartnerNOC

    Joined:
    Jun 14, 2006
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
  8. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    That method will work too.... it's a lot more work, though.
     
  9. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    i have seen that thread

    but i think that script is made only for domain.com

    in my server there are 400 account created & more than 1000 email accounts

    what about other domains & email accounts

    in my server there are more than 150 domains are hosted e.g mydomain.com , mydomain.org , testdomain.com , testing.com

    In mydomain.com there 5 email accounts
    test1@mydomain.com
    test2@mydomain.com
    test3@mydomain.com
    test4@mydomain.com
    test5@mydomain.com

    all email which are sent from those ids must be copy to monitor@mydomain.com
    test1@testdomain.com
    test2@testdomain.com
    test3@testdomain.com
    test4@testdomain.com
    test5@testdomain.com

    all email which are sent from those ids must be copy to Owner@testmydomain.com
     
  10. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    thanks for your bring attention here
     
  11. screege

    screege Well-Known Member

    Joined:
    Aug 11, 2004
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    Where do I find this archive.rules file? I have mailscanner updated and cannot find it anywhere

    Regards
     
  12. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    on my system (centos, but should be true elsewhere I think):

    /usr/mailscanner/etc/rules/archive.rules

    Having said that, you can set where rules are stored by modifying the mailscanner configuration file. I HIGHLY recommend getting the MailScanner Front End from ConfigServer.com
     
  13. screege

    screege Well-Known Member

    Joined:
    Aug 11, 2004
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    I only have this archives:

    [root@server1 rules]# ls
    bounce.rules filename.rules.rules max.message.size.rules spam.action.rules spamhigh.action.rules spam.scanning.rules spam.whitelist.rules virus.scanning.rules
    EXAMPLES filetype.rules.rules README spam.blacklist.rules spamhigh.score.rules spam.score.rules virus.delivery.rules

    I have the most recent version of mailscanner and they can be viewed on the GUI in WHM thats why I asked. Then which file must be modified?

    Regards
     
  14. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    archive.rules will be the filename...

    Is it enabled in the config? Have you verified the path for the archive.rules file in the config? It's possible to set a different path for each rule file.

    It follows the same internal structure as the other files, such that:

    Code:
    FromOrTo: *domain.com address@otherdomain.com
    FromOrTo: default no
    Will send any email in/out of domain.com to address@otherdomain.com
     
  15. screege

    screege Well-Known Member

    Joined:
    Aug 11, 2004
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    Yes I do not have that file under:

    /usr/mailscanner/etc/rules

    or anywhere on my server, as I stated I am using the latest version of configserver mailscanner with the front end attached to cpanel =o(

    Maybe this file is depreciated in later versions
     
  16. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    This is all good, but is there a way to archive the outbound mail to the 'Sent' IMAP folder of a Cpanel account instead of the Inbox? Can you do it like this in Mailscanner?

    To: *domain.com address@otherdomain.com
    From: *domain.com address@otherdomain.com/.Sent
     
Loading...

Share This Page