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.

how to setup cpanel to send email for a domain off the IP that is setup for it

Discussion in 'E-mail Discussions' started by mattjustin, Jun 1, 2011.

  1. mattjustin

    mattjustin Registered

    Joined:
    Jun 1, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    how do I setup cpanel to send email for a domain off the IP that is setup for it?

    Ive searched for this solution but it seems that there are older posts relating to this and they dont seem to work for new versions of cpanel.

    Im running WHM 11.30.0 (build 23) CENTOS 5.6 x86_64

    I have a class c assigned to my box and have multiple urls setup.

    Im trying to configure outbound mail to go out on the IP that is configured for that url and or additional specific IP's instead of going out main ip (eth0). The headers print the main ulr and eth0 which is incorrect as its setup for multiple clients.

    thanks
     
    #1 mattjustin, Jun 1, 2011
    Last edited: Jun 1, 2011
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    You can change this in WHM > exim configuration editor - there's a checkbox to have the account send out with its dedicated IP.
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please note that scripts will still send out using the main IP for the machine if you are using sendmail or the PHP mail() function. To have the script use the dedicated IP once you have checked the Exim Configuration Editor options that follow, you need to use SMTP authentication in the script rather than sendmail or PHP mail() function. Here are the options you would check in WHM > Exim Configuration Editor to have the dedicated IPs automatically used:

     
  4. blogbytes

    blogbytes Member

    Joined:
    Jul 11, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I am facing the same issue. What do I need to select exactly to send mail from the domains dedicated ip and to use the dedicated IP helo?

    View attachement, if i select Send mail from account’s dedicated IP. the other 2 parts get greyed out and I am unable to select them.

    My second question is, I have a clients crm tool setup on our main server. His email gets relayed through another server, smtp settings are all correct and setup, however, I have noticed that the main server still gets referenced in the email header. View header below.

    Code:
    Received: from smtp.secondary.server ([xx.xxx.xx.xx])
    	by receiving.server with esmtps (TLSv1:AES256-SHA:256)
    	(Exim 4.69)
    	(envelope-from <someemail@email.com>)
    	id 1QgBS1-0002Yi-D1
    	for email.email.com; Mon, 11 Jul 2011 10:02:46 +0200
    Received: from main.server ([xxx.xx.xxx.xx] helo=domain.crm.runs.on)
    	by smtp.secondary.server with esmtpa (Exim 4.69)
    	(envelope-from <someemail@email.com>)
    	id 1QgBRy-0007oJ-LV
    	for email.email.com; Mon, 11 Jul 2011 10:02:42 +0200
    
    
    How can I remove this part?
    Code:
    Received: from main.server ([xxx.xx.xxx.xx] helo=domain.crm.runs.on)
    	by smtp.secondary.server with esmtpa (Exim 4.69)
    	(envelope-from <someemail@email.com>)
    	id 1QgBRy-0007oJ-LV
    	for email.email.com; Mon, 11 Jul 2011 10:02:42 +0200
    

    Thanks
     

    Attached Files:

  5. blogbytes

    blogbytes Member

    Joined:
    Jul 11, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    For anybody that needs to remove the main header when relaying to an external smtp

    add this to your exim.conf just below driver = smtp "headers_remove = Received"

    will look like this:
    Code:
    remote_smtp:
      driver = smtp
    headers_remove = Received
      interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
      helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}
    
     
  6. stunn3r

    stunn3r Registered

    Joined:
    Jun 21, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Re: how to setup cpanel to send email for a domain off the IP that is setup

    Thanks blogbytes!!

    It worked for me. similarly can we remove other header attributes?

    Best Regards,
     
  7. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Re: how to setup cpanel to send email for a domain off the IP that is setup

    You should be aware about the changes you are going to make in exim.conf else it will corrupt the configuration causing email problem.

    Thanks blogbytes!!
     
Loading...

Share This Page