Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 19
  1. #1
    Member madcow774's Avatar
    Join Date
    Oct 2002
    Posts
    19

    Default Changing Exim SMTP IP Address

    I know I can change the IP address that exim uses to send mail by changing the following in my exim.conf

    remote_smtp:
    driver = smtp


    to:

    remote_smtp:
    driver = smtp
    interface = 123.123.123.123


    But the problem is that the change gets overwritten with cpanel updates. So I had been using the following solution, which worked perfect until I upgraded to cpanel 11
    http://forums.cpanel.net/showpost.ph...0&postcount=15

    Why does the above solution no longer work? Is there another way to change the outbound IP for exim from within the configuration editor in WHM so it does not get overwritten?

  2. #2
    Member
    Join Date
    Jul 2004
    Posts
    24

    Default

    Anyone have a solution?

  3. #3
    Member
    Join Date
    Jul 2004
    Posts
    24

    Default

    So is this impossible now?

  4. #4
    Member
    Join Date
    Jan 2007
    Posts
    170

    Default

    don't change it in exim.conf directly, but change it int he advanced exim editor in the first box available

  5. #5
    Member
    Join Date
    Jul 2004
    Posts
    24

    Default

    That is how it was done previously (except the first box part), but that no longer works.

  6. #6
    Member
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    1,050

    Default

    Here's the iptable rule if other solution won't help you :-
    iptables -t nat -A postrouting -o eth0 -p tcp -j SNAT --dport 25 --to-source xx.xx.xx.xx

    where,
    xx is the new ip on your server from where you will route your emails from.

    Then execute :-
    service iptables save
    service iptables restart

    Also you can check whether the rule is added properly or not by :-
    iptables -t nat -n -L

  7. #7
    Member hostmedic's Avatar
    Join Date
    Apr 2003
    Location
    Ohio
    Posts
    556
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default awesome Shekhar

    Shekhar -

    I think this is the preferred method...

    If for any reason someone makes some changes to the exim config - they install Chirpy's mail scanner - or ASSP - or who knows what -

    they may not realize what the other settings were for - may forget another tech put them into place etc.



    Good Stuff (and hey I learned something today :-) )



    Feel like your Cloud Provider's just weathering the storm? Hop Off the Cloud - The Weathers nicer over here.

  8. #8
    Member
    Join Date
    Jul 2004
    Posts
    24

    Default

    When I try to run the iptables command, it returns:

    iptables: No chain/target/match by that name

  9. #9
    Member
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    1,050

    Default

    You seems to be on a VPS server where iptable modules isn't installed for your server. Contact your hosting provider and ask them to install it for you. Its just an entry in the conf file of your VPS.

    If its a dedicated server, then ask someone to look into it. If I am not mistaken you need to recompile kernel with the missing iptable modules.

  10. #10
    Member
    Join Date
    Jul 2004
    Posts
    24

    Default

    It is a dedicated.

    Quote Originally Posted by Shekhar View Post
    If its a dedicated server, then ask someone to look into it. If I am not mistaken you need to recompile kernel with the missing iptable modules.
    The kernel is compiled the way cPanel compiles it, though I think I am one version behind - I'll do a reboot tonight and see if the new version has it. If that doesn't do it, I'll recompile the kernel myself and include all the iptables modules.

  11. #11
    Member hostmedic's Avatar
    Join Date
    Apr 2003
    Location
    Ohio
    Posts
    556
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default cPanel does not recompile your kernel

    I don't believe I am off my rocker here -

    cPanel does not recompile your kernel.

    I would suggest peeking here for a how-to

    http://www.eth0.us/taxonomy/term/12



    Feel like your Cloud Provider's just weathering the storm? Hop Off the Cloud - The Weathers nicer over here.

  12. #12
    Member hostmedic's Avatar
    Join Date
    Apr 2003
    Location
    Ohio
    Posts
    556
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default how to install iptables

    In most Linux installs iptables has become a standard option, especially Red Hat. There is a very good chance that iptables is already installed on your machine.
    Check by:

    1. Opening a terminal window (making sure to be logged in as root).

    2. Typing: # iptables

    3. If iptables is installed, you should get the following message:

    iptables v1.2.8: no command specified
    Try 'iptables -h' or 'iptables --help' for more information
    4. If this message does not appear, then follow the directions in this link to install iptables.


    http://www.cae.wisc.edu/site/public/...les-installing



    Feel like your Cloud Provider's just weathering the storm? Hop Off the Cloud - The Weathers nicer over here.

  13. #13
    Member
    Join Date
    Jul 2004
    Posts
    24

    Default

    Quote Originally Posted by hostmedic View Post
    I don't believe I am off my rocker here -

    cPanel does not recompile your kernel.
    Well some software does, perhaps yum. One thing is for certain, something that is installed on the box and comes with fairly default software does compile the kernel.

    I would suggest peeking here for a how-to

    http://www.eth0.us/taxonomy/term/12
    No need for a how-to, I am aware of how to compile a kernel.

    iptables is installed, I am running CentOS (and kernel will be 2.6.9-55.0.2.EL after the reboot tonight), but according to Shekhar it is missing one of the modules.

  14. #14
    Member hostmedic's Avatar
    Join Date
    Apr 2003
    Location
    Ohio
    Posts
    556
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default yes

    yum can download a new kernel for you - personally I do not just allow anything to just randomly update my kernels - but I have a few things compiled directly into the kernel for iptables and such so they cannot be undone :-)

    My suggestion would be to double check the iptables install -
    I am not sure if your missing iptables - and doubt its just a module of iptables

    what happens when you type: iptables -V


    Also - iptables is here: http://www.netfilter.org/projects/iptablesl if that helps

    :-)

    With a little bit of diligence I am sure we can help you along



    Feel like your Cloud Provider's just weathering the storm? Hop Off the Cloud - The Weathers nicer over here.

  15. #15
    Member
    Join Date
    Jul 2004
    Posts
    24

    Default

    I read on these forums some time ago that it is better to let yum upgrade your kernel to the correct version than upgrade the kernel each time yourself, I am not sure if that still holds true.

    I do have iptables installed, APF is just a front-end and it runs fine. The version command returns: iptables v1.2.11. If this reboot tonight doesn't fix the problem, I will recompile the kernel myself and include all iptables modules.

Similar Threads & Tags
Similar threads

  1. Change SMTP/exim IP Address
    By hm2k in forum Archived Feature Requests
    Replies: 4
    Last Post: 05-11-2010, 08:14 AM
  2. URL redirection without changing the address in the address bar
    By nitaish in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-02-2007, 02:15 AM
  3. Changing Exim's IP address
    By WK-Anthony in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-09-2007, 11:00 AM
  4. Changing Exim SMTP IP address
    By tvcnet in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-29-2004, 03:50 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube