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 *enable* relay for a block of IPs

Discussion in 'General Discussion' started by wulfhere, Mar 22, 2005.

  1. wulfhere

    wulfhere Member

    Joined:
    Apr 26, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    All,

    I'd like to enable SMTP relay for a specific block of IPs. Digging through the forums, I discovered that this can be done by entering the IPs in a text file called /etc/alwaysrelay, but how can I tell it to allow relay from an entire /24, for example, without entering in each individual IP? Entering addresses in the format a.b.c.d/24 did not work.

    Thanks in advance for your help!

    -Tim
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If the CIDR doesn't work, then you're going to have to list each and every one of the individually.
     
  3. adolfchavez

    adolfchavez Registered

    Joined:
    Aug 20, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Clemente CA
    allowing specific IP's ranges of IP's to relay - help!

    I just want to add a range of static IP's so that it always allows them to relay without having pop accounts or logging in to this server.

    The server is redhat 9


    I've tried all kinds of things

    I've created a text file

    /etc/alwaysrelay

    and put the IP address in there - but nothing

    Also found in faq.cpanel.net this :

    Create a file with your host IP or IPs and named it something like

    /etc/privaterelay

    i.e

    192.168.0.2
    192.168.3.4

    Next, located the following entry at the top of the /etc/exim.conf file:

    hostlist relay_hosts = lsearch;/etc/relayhosts : \
    localhost

    and change it to this:

    hostlist relay_hosts = lsearch;/etc/relayhosts : \
    localhost : lsearch;/etc/privaterelay

    That should do it.!

    So I tried that - and restarted exim - same thing

    it's giving me a message that relaying prohibited because have not logged into pop account in last 30 minutes

    also tried uncommenting this line in exim.conf

    host_accept_relay = 127.0.0.1:172.16.0.0/24

    and adding the appropriate range of IP's - exim didn't seem to like this command

    what am I a missing? I've been struggling with it for hours...

    Thanks in advance!
    adolf.chavez@tio.com
     
  4. bjdea1

    bjdea1 Well-Known Member

    Joined:
    Mar 6, 2003
    Messages:
    83
    Likes Received:
    1
    Trophy Points:
    8
    Join the club I'm struggling with this too !!!

    Anyone ??????
     
Loading...
Similar Threads - *enable* relay block
  1. monkei
    Replies:
    1
    Views:
    269

Share This Page