Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    3

    Default 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
    Last edited by mattjustin; 06-01-2011 at 04:01 PM.

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Sep 2006
    Location
    Virginia Beach, VA
    Posts
    254
    cPanel/Enkompass Access Level

    Root Administrator

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

    You can change this in WHM > exim configuration editor - there's a checkbox to have the account send out with its dedicated IP.

  3. #3
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

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

    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:

    ** Send mail from account’s dedicated IP [?]
    Automatically send outgoing mail from the account’s IP address instead of the main IP address. Warning: If you turn this setting on, make sure that reverse DNS entries match the ones in /etc/mail_reverse_dns.

    ** Reference /etc/mailhelo for outgoing SMTP HELO [?]
    Send HELO based on the domain name in /etc/mailhelo (more information)

    ** Reference /etc/mailips for outgoing SMTP connections [?]
    Send outgoing mail from the IP that matches the domain name in /etc/mailips (more information)
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  4. #4
    Registered User
    Join Date
    Jul 2011
    Posts
    2

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

    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 Thumbnails Attached Thumbnails how to setup cpanel to send email for a domain off the IP that is setup for it-cpanel.jpg  

  5. #5
    Registered User
    Join Date
    Jul 2011
    Posts
    2

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

    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. #6
    Registered User
    Join Date
    Jun 2009
    Posts
    1

    Default 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. #7
    Member
    Join Date
    Nov 2011
    Posts
    302
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: how to setup cpanel to send email for a domain off the IP that is setup

    Quote Originally Posted by stunn3r View Post
    Thanks blogbytes!!

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

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

    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"
    Thanks blogbytes!!

Similar Threads & Tags
Similar threads

  1. Setup new Email System on Cpanel...!
    By mhran in forum E-mail Discussions
    Replies: 3
    Last Post: 03-17-2009, 08:37 PM
  2. Possible to setup accounts without domain (email only) ?
    By SeanLee in forum E-mail Discussions
    Replies: 1
    Last Post: 04-09-2008, 09:39 AM
  3. Question about primary domain setup in cPanel
    By Firestorm in forum New User Questions
    Replies: 7
    Last Post: 11-27-2004, 12:24 AM
  4. how to setup domain can receive and send mail
    By preleaf in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-25-2004, 05:27 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube