sender dependent relay host problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

sender dependent relay host problem

Marko Horn
hello list,

i want to seperate the sendout of mails for a specific doamain over 3
mailgateways i setup. it's a test scenario.

in the main.cf i set an entry like this:
sender_dependent_relayhost_maps =
hash:/etc/postfix/lookups/relayhost/sender_relay

sender_relay =

@testdomain.de         fsmtp:[192.168.100.186]:26

and in the master.cf

fsmtp   unix    -       -       n       -       -       smtp
         -o smtp_fallback_relay=[192.168.100.188]:26,[192.168.100.190]:26


when i send a mail with an account of @testdomain.de  the
sender_dependent_relayhost_map seems to work
but in the next step something goes wrong.
The error message is not clear enough for me.

in the log i get:

postfix/smtp[5164]: fatal: valid hostname or network address required in
server description: fsmtp:[192.168.100.186]:26
postfix/qmgr[4869]: warning: private/smtp socket: malformed response
postfix/qmgr[4869]: warning: transport smtp failure -- see a previous
warning/fatal/panic logfile record for the problem description
postfix/master[4524]: warning: process /usr/libexec/postfix/smtp pid
5164 exit status 1
postfix/master[4524]: warning: /usr/libexec/postfix/smtp: bad command
startup -- throttling
postfix/error[5167]: 82FD2400AA2A: to=<[hidden email]>, relay=none,
delay=1.5, delays=0.26/1.1/0/0.13, dsn=4.3.0, status=deferred (unknown
mail transport error)


what is wrong in my cronstruct?
anyone has a tipp or hint or can see the mistake in my config?

thank you

marko



--
Mitten drin statt nur Datei!
Reply | Threaded
Open this post in threaded view
|

Re: sender dependent relay host problem

Wietse Venema
Marko Horn:
> hello list,
>
> i want to seperate the sendout of mails for a specific doamain over 3
> mailgateways i setup. it's a test scenario.
>
> in the main.cf i set an entry like this:
> sender_dependent_relayhost_maps =
> hash:/etc/postfix/lookups/relayhost/sender_relay

This table requires HOST syntax.

> sender_relay =
>
> @testdomain.de         fsmtp:[192.168.100.186]:26

But you are using TRANSPORT:HOST syntax.

sender_dependent_relayhost_maps requires HOST syntax.
sender_dependent_default_transport_maps requires TRANSPORT:HOST syntax.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: sender dependent relay host problem

Marko Horn
hello wietse,

---
Mitten drin statt nur Datei!

Am 2020-09-30 16:12, schrieb Wietse Venema:

> Marko Horn:
>> hello list,
>>
>> i want to seperate the sendout of mails for a specific doamain over 3
>> mailgateways i setup. it's a test scenario.
>>
>> in the main.cf i set an entry like this:
>> sender_dependent_relayhost_maps =
>> hash:/etc/postfix/lookups/relayhost/sender_relay
>
> This table requires HOST syntax.
>
>> sender_relay =
>>
>> @testdomain.de         fsmtp:[192.168.100.186]:26
>
> But you are using TRANSPORT:HOST syntax.
>
> sender_dependent_relayhost_maps requires HOST syntax.
> sender_dependent_default_transport_maps requires TRANSPORT:HOST syntax.
>
> Wietse

thanks for showing me the mistake in my configuration.
with 'sender_dependent_default_transport_maps it works.

is it possible with postfix to use the the 3 mailgateways with 'round
robin'?

marko
Reply | Threaded
Open this post in threaded view
|

Re: sender dependent relay host problem

Wietse Venema
Wietse:
> sender_dependent_relayhost_maps requires HOST syntax.
> sender_dependent_default_transport_maps requires TRANSPORT:HOST syntax.
 
Marko Horn:
> thanks for showing me the mistake in my configuration.
> with 'sender_dependent_default_transport_maps it works.
>
> is it possible with postfix to use the the 3 mailgateways with 'round
> robin'?

sender_dependent_default_transport_maps =
        randmap:{xxx, yyy, zzz}

with xxx, yyy, zzz in TRANSPORT:HOST form. Each will be selected
with probability 1/3. If one should get more load, repeat the name.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: sender dependent relay host problem

Marko Horn
hello wietse,

---
Mitten drin statt nur Datei!

Am 2020-10-01 00:06, schrieb Wietse Venema:

> Wietse:
>> sender_dependent_relayhost_maps requires HOST syntax.
>> sender_dependent_default_transport_maps requires TRANSPORT:HOST
>> syntax.
>
> Marko Horn:
>> thanks for showing me the mistake in my configuration.
>> with 'sender_dependent_default_transport_maps it works.
>>
>> is it possible with postfix to use the the 3 mailgateways with 'round
>> robin'?
>
> sender_dependent_default_transport_maps =
> randmap:{xxx, yyy, zzz}
>
> with xxx, yyy, zzz in TRANSPORT:HOST form. Each will be selected
> with probability 1/3. If one should get more load, repeat the name.
>
> Wietse

sorry to bother you again..

is it the right i am doing it?:


sender_dependent_relayhost_maps =
hash:/etc/postfix/lookups/relayhost/sender_relay

sender_relay:
-------------
@testdomain.de     fsmtp:



main.cf:
--------
sender_dependent_default_transport_maps =
         
randmap:{fsmtp:[192.168.100.186]:26,fsmtp:[192.168.100.186]:26,fsmtp:[192.168.100.186]:26,fsmtp:[192.168.100.188]:26,fsmtp:[192.168.100.188]:26,fsmtp:[192.168.100.188]:26,fsmtp:[192.168.100.190]:26,fsmtp:[192.168.100.190]:26,fsmtp:[192.168.100.190]:26}


master.cf:
----------
fsmtp   unix    -       -       n       -       -       smtp
#       -o
smtp_fallback_relay=[192.168.100.186]:26,[192.168.100.188]:26,[192.168.100.190]:26


but the mails are not really going out in round robin. mostly 10-12
times thru same mailgateway.

do i have to set the following settings to get it better distributed?

smtp_connection_reuse_count_limit = 2
smtp_connection_reuse_time_limit = 2s
smtp_connection_cache_on_demand = no

Reply | Threaded
Open this post in threaded view
|

Re: sender dependent relay host problem

Wietse Venema
Marko Horn:
> sender_dependent_relayhost_maps =
> hash:/etc/postfix/lookups/relayhost/sender_relay
>
> sender_relay:
> -------------
> @testdomain.de     fsmtp:

sender_dependent_relayhost_maps requires a HOST, not a TRANSPORT.
But it does not matter, because the postconf(5) manpage says:

    This information is overruled with relay_transport,
    SENDER_DEPENDENT_DEFAULT_TRANSPORT_MAPS, default_transport and
    with the transport(5) table.

> sender_dependent_default_transport_maps =
>          
> randmap:{fsmtp:[192.168.100.186]:26,fsmtp:[192.168.100.186]:26,fsmtp:[192.168.100.186]:26,fsmtp:[192.168.100.188]:26,fsmtp:[192.168.100.188]:26,fsmtp:[192.168.100.188]:26,fsmtp:[192.168.100.190]:26,fsmtp:[192.168.100.190]:26,fsmtp:[192.168.100.190]:26}
>
>
> master.cf:
> ----------
> fsmtp   unix    -       -       n       -       -       smtp
> #       -o
> smtp_fallback_relay=[192.168.100.186]:26,[192.168.100.188]:26,[192.168.100.190]:26
>
>
> but the mails are not really going out in round robin. mostly 10-12
> times thru same mailgateway.

Which gateway?

And if you send 20 messages, will 10-12 be sent to the
same gateway? Where do the other messages go to?

        Wietse