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.

Add IP range to allowed relay hosts

Discussion in 'E-mail Discussions' started by webfullcircle, Apr 5, 2012.

  1. webfullcircle

    webfullcircle Registered

    Joined:
    Apr 5, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    How can I add an IP range to teh /etc/relayhosts file so they can be allowed to relay without out having to enter each address seperately. If a range can't be done is there a way that I can have exim look through multiple files to see who is allowed so that I can create a file for the IP address range that way it would not clutter up our main /etc/relayhosts file. Thank you.
     
  2. 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
    The /etc/relayhosts file can't be manually edited as antirelayd will wipe any changes you make to it.

    Instead, you can add a file /etc/alwaysrelay and add the IPs into that file for to allow it to relay through your server. The /usr/sbin/antirelayd script will look for that file and then add the IPs into it into relayhosts file for you.

    I am not certain if you can actually add a range to that file. If you cannot get it to work as you'd like, you can always post on exim.org's mailing list to see any suggestions they might have.
     
  3. webfullcircle

    webfullcircle Registered

    Joined:
    Apr 5, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you for your reply, it seems that the system that peruses those files does recognize subnets. Using a /24 worked for me.
     
Loading...

Share This Page