Rotate IPs Postfix

  • Hello friends...
    Sorry to all for my English ... is google translator


    I am integrating a system with multiple ips postfix to spread the use a little more and not have problems with yahoo ... it's always the same.


    I say I'm doing



    a) I am using this file to generate the rotation




    Perl
    1. #!/usr/bin/perl -w# author: Hari Hendaryanto <hari.h -at- csmcom.com>use strict;use warnings;use Sys::Syslog qw(:DEFAULT setlogsock);## our transports array, we will define this in master.cf as transport services#our @array = ('rotate1:','rotate2:','rotate3:','rotate4:','rotate5:');## Initalize and open syslog.#openlog('postfix/randomizer','pid','mail');## Autoflush standard output.#select STDOUT; $|++;while (<>) { chomp; # randomizing transports array my $random_smtp = int(rand(scalar(@array))); if (/^get\s(.+)$/i) { print "200 $array[$random_smtp]\n"; syslog("info","Using: %s Transport Service", $random_smtp); next; } print "200 smtp:";}



    b) Then I created the ips calls in master file, and here is where the problem starts


    I have to call the file postfix rotation to switch it on ... the call is correct and can change the last time use ips



    But to do that I have to reflect a new transport master file postfix


    --> Line comment for close transport
    # transport_maps = hash:/etc/postfix/imscp/transport
    Open new transpor
    transport_maps = tcp:[127.0.0.1]:2527
    127.0.0.1:2527_time_limit = 3600s


    But if I change the conveying line I can not make deliveries of incoming mail via docecot ...


    If you use either the exit ... but delivery
    relay = none


    My problem is where can include use of the 2 transport
    one of imscp dovecot and transport via use of rotation ips


    Always grateful for your help
    Cheers

  • @kurgans


    I would help but I don't understand the last part about transport and dovecot.


    Can you write all this in your native language (without typo) and then I'll deal with google translator. Thanks.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Gracias Nuxwin...


    En configuracion de postifx main.cf


    Tenemos para la entrega local de los correo recibidos

    Code
    1. # Receiving messages parameters....transport_maps = hash:/etc/postfix/imscp/transport....


    entregamos el correo entrante al buzon virtual
    relay=dovecot


    Es lo que esta bien


    Pero para usar el archivo ramdon.pl
    tenemos que incluir 2 lineas una en archivo main.cf y otra en archivo master.cf


    1.- ) En archivo /etc/postfix/master.cf


    indicamos el uso del archivo random.pl,


    2527 inet n n n - 0 spawn user=nobody argv=/etc/postfix/random.pl


    Y se identifican los nombres y las ips que tenemos disponibles



    Code
    1. 127.0.0.1:2527 inet n n n - 0 spawn user=nobody argv=/etc/postfix/random.plrotate1 unix - - n - - smtp -o syslog_name=postfix-rotate1 -o smtp_helo_name=smtp1.example.com -o smtp_bind_address=1.2.3.1rotate2 unix - - n - - smtp -o syslog_name=postfix-rotate2 -o smtp_helo_name=smtp2.example.com -o smtp_bind_address=1.2.3.2rotate3 unix - - n - - smtp -o syslog_name=postfix-rotate3 -o smtp_helo_name=smtp3.example.com -o smtp_bind_address=1.2.3.3


    2.-) Sobre el archivo main.cf tenemos que habilitar el nuevo transporte




    al comentar la linea de transport_maps
    dejamos sin uso la entregas de correo por dovecot a nuestros buzones virtuales


    server postfix-rotate2/smtp[23876]: D7921BC0064: to=<test@reventadehosting.es>, relay=none, delay=0.28, delays=0.25/0.02/0/0, dsn=5.4.6, status=bounced


    Y aqui es donde esta mi pequeño problema,


    como poner sobre el archivo los 2 transportes


    Siempre agradecido a todos por su ayuda.
    Saludos

  • @kurgans


    I'll give this a try that evening. From my point of view, dovecot shouldn't be involved here. The Dovecot LDA is for local mail delivery only. As I understand, your intent is to rotate IPs for mail outgoing, I'm right?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Yeah that's right



    I get ips rotate in outgoing mail,
    but I lose the next incoming relay Dovecot to change the transport

  • @kurgans


    I'll try when the version 1.2.12 will be published. I'm so busy ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Thank you, I understand very well that this very busy with the panel when you can try to be good
    It is an interesting option to avoid shipping fees to suppliers.



    Thank you very much for your answer
    Cheers