Postfix Multiple IP's

Discussion in 'General' started by guimnk, Mar 25, 2011.

  1. guimnk

    guimnk Member

    Hi all..

    I've a mail marketing system running in ISPConfig..

    Thats ok, ISPConfig is very fast..

    But I need to make my postfix to change IP/hostname while send the list of e-mails.

    It's possible? Is necessary to run another instance of postfix? How can I do to use more SMTP's (ips/hostnames) in the same ispconfig server?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The IP that postfix uses is set with the parameter smtp_bind_address in the postfix main.cf file. You can e.g. change the IP there and then restart postfix.
     
  3. guimnk

    guimnk Member

    Ok Till, but I could put it in cron to restart postfix and change this parameter? I'll have a problems with items scheduled?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, you can put that into cron.

    I dont think so, asl all mails get kept in the queue.
     
  5. guimnk

    guimnk Member

    Ok Till..

    What the difference between inet_interfaces and smtp_bind_address ?

    If I input all ip's in inet_interfaces parameter, fix my solicitation?

    I read about master.cf parameters:

    Code:
    192.168.0.1:smtp      inet  n       -       -       -       -       smtpd
    
    If I input in master.cf all ip's fix the my solicitation?
     
  6. falko

    falko Super Moderator Howtoforge Staff

    inet_interfaces:


    smtp_bind_address:

     
  7. guimnk

    guimnk Member

    Falko and Till..

    I create a script to change the value of "smtp_bind_address" every minute. But, when I set this parameter on main.cf, I get this message:

    Code:
    Mar 28 19:14:04 turbo amavis[16754]: (16754-08) (!)DENIED ACCESS from IP 187.x.x.15, policy bank ''
    Mar 28 19:14:04 turbo postfix/smtp[17458]: 4EFAB50C16F4: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.1, delays=0.09/0.01/0/0, dsn=4.4.2, status=deferred (lost connection with 127.0.0.1[127.0.0.1] while receiving the initial server greeting)
    
    What is this??

    Thanks
     
  8. skangraf

    skangraf New Member

    In Amavis configuration file You have to add IP which is blocked. For example
    Debian 6.0
    /etc/amavis/conf.d/05-domain - add line

    @inet_acl = qw( 127.0.0.1 [::1] 187.x.x.15/32);

    next restart amavis service, and should working.
    I'm not sure is it correct, but in my case it's working..
     
  9. guimnk

    guimnk Member

    Hi skangraf, thanks for reply..

    When I insert:

    Code:
    @inet_acl = qw( 127.0.0.1 [::1] 187.x.x.0/24);
    
    The parameter

    Code:
    smtp_bind_address = 187.x.x.28
    
    is ignored...

    Why??

    Thanks..
     
  10. skangraf

    skangraf New Member

    Try to add to main.cf

    smtp_bind_addres = 187.x.x.28 127.0.0.1

    and I'm not sure but Your @inet_acl line should be as follow

    @inet_acl = qw( 127.0.0.1 [::1] 187.x.x.28/32);
    or
    @inet_acl = qw( 127.0.0.1 [::1] 187.x.x.28);

    Don't forget restart Postfix and amavis service
     
  11. vwpete

    vwpete Member

    did this work for you?

    I want to do the same, i would like to always send from a differant ip.

    i did add to main.cf

    smtp_bind_addres = xxx.xxx.xxx.174 to main.cf


    and restart postfix but it still sends from the default ip

    i have a standard ispconfig 3.0.3.3 ubuntu 10.4 lts

    any ideas!
     
  12. guimnk

    guimnk Member

    I'm changing this parameter in main.cf using a shell script with my cron..

    Put here your main.cf...
     
  13. vwpete

    vwpete Member

    oops! how does that work?

    the second i look at this post i see that i am missing a 's' :eek:

    anyways changed from main.cf

    from

    smtp_bind_addres = xx.xxx.xx.174 127.0.0.1

    to
    smtp_bind_address = xx.xxx.xx.174 127.0.0.1

    and it all works :eek:

    sorry and thanx for a quick replay
     
  14. qtvx

    qtvx New Member

  15. akstern

    akstern New Member

    Hi i tried to create another instance of myy postfix server.

    In my server tehere two eth interface and therefore i have two ip e two hostname.

    I tried to use first host to send an email with my email client and i had success.

    If i try to send by second host i have error. I followed this doc
    linuxpoison.blogspot.it/2008/02/howto-make-two-instance-of-postfix.html
    without postfix -c /etc/postfix-out start

    because in my debian script there is option for multi instance. Where i wrong ? Thanks
     

Share This Page