postfix configuration - relay

Discussion in 'Installation/Configuration' started by cpcpy, May 15, 2006.

  1. cpcpy

    cpcpy New Member

    i have followed the perfect setup for ispconfig (2.1.2) and FC4
    and everything works fine...

    i realised that recently another machine in the same subnet (belong to someone else) is using my server to relay spams...

    i'd like to set in my main.cf such that
    mynetworks_style = host (to send out mails from my machine only, not my network)

    however, i notice that the output of postconf does not change when i set "mynetworks_style = host" in /etc/postfix/main.cf

    ===============================
    # postconf -d | grep mynetworks

    mynetworks = 127.0.0.0/8 203.81.39.0/24
    mynetworks_style = subnet
    ===============================

    i did not set "mynetworks", so it seems that postfix gets the value (203.81.39.0/24) somewhere else.

    according to the man pages, if "mynetworks" is set, then "mynetworks_style" will be ignored.

    am i missing anything?

    how can i set "mynetworks_style = host" ?

    thanks
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Just set
    Code:
    mynetworks = 127.0.0.0/8
    and comment out mynetworks_style.
    Then restart Postfix. This will allow sending only from localhost (without authentication).
     
  3. cpcpy

    cpcpy New Member

    my server is currently hosting a few domains and have a few IP addresses
    would there be any problem by doing the above?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No, there shall be no problems.
     
  5. cpcpy

    cpcpy New Member

    thanks - this works for me...

    actually there was a problem with my earlier command...
    should have omitted the -d and i think i'll be ok

    ===============================
    # postconf -d | grep mynetworks

    mynetworks = 127.0.0.0/8 203.81.39.0/24
    mynetworks_style = subnet
    ===============================
     

Share This Page