performance question

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

performance question

Olaf313
Hi,

for a period of time we need to route ~ 2.000 mail addresses to our old
system.
I would add those addresses into the transport file like

[hidden email] smtp:system.fqdn.com
....
[hidden email] smtp:system.fqdn.com

Will the larger transport file now affect the performance of the Postfix
server ?



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: performance question

Matus UHLAR - fantomas
On 25.06.18 06:39, Olaf313 wrote:

>for a period of time we need to route ~ 2.000 mail addresses to our old
>system.
>I would add those addresses into the transport file like
>
>[hidden email] smtp:system.fqdn.com
>....
>[hidden email] smtp:system.fqdn.com
>
>Will the larger transport file now affect the performance of the Postfix
>server ?

depends on how do you configure it. hash: should not have noticeable
performance impact.

However, shouldn't it be better to define @domain.com instead of listing all
mailboxes?

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Posli tento mail 100 svojim znamim - nech vidia aky si idiot
Send this email to 100 your friends - let them see what an idiot you are
Reply | Threaded
Open this post in threaded view
|

Re: performance question

Olaf313
The problem is that all mails for domain.com will go to O365 now but there
are some mailboxes not yet migrated so they still reside on our on-premise
system.
That's why we can't define the whole domain.

But yes, the transport file is hash'ed  :)



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: performance question

Harald Koch-2
In reply to this post by Matus UHLAR - fantomas

On 25 June 2018 at 09:42, Matus UHLAR - fantomas <[hidden email]> wrote:

depends on how do you configure it. hash: should not have noticeable
performance impact.

a linear search through 2000 addresses should not have a noticeable performance impact either, compared to, say, network round-trip times...

--
Harald

Reply | Threaded
Open this post in threaded view
|

Re: performance question

Viktor Dukhovni
In reply to this post by Olaf313


> On Jun 25, 2018, at 9:39 AM, Olaf313 <[hidden email]> wrote:
>
> for a period of time we need to route ~ 2.000 mail addresses to our old
> system.
> I would add those addresses into the transport file like
>
> [hidden email] smtp:system.fqdn.com
> ....
> [hidden email] smtp:system.fqdn.com
>
> Will the larger transport file now affect the performance of the Postfix
> server ?

I generally prefer to do traffic splitting via address
rewriting, rather than per-user transport entries.
This enables the use of remote data sources (LDAP, SQL, ...)
without creating a performance bottleneck.  If your transport
table stays *local* (an indexed file) you can of course
use that and it'll perform very well.  Consider "cdb"
rather than "hash" or "btree" (more stable on disk
format and API).

To this with rewriting I use:

 virtual:
   [hidden email]  [hidden email]
   [hidden email]  [hidden email]

 generic:
   [hidden email] [hidden email]
   [hidden email] [hidden email]

 main.cf:
  indexed = $default_database_type:$config_directory/
  virtual_alias_maps = ${indexed}virtual
  relay_generic_maps = ${indexed}generic

 transport:
   store1.example relay
   store2.example relay

 master.cf:
   relay unix ... smtp
     -o smtp_generic_maps=$relay_generic_maps

Note, that enabling "smtp_generic_maps" causes header
rewriting on output, which can affect DKIM signature
validity when the headers are out of spec.  Presumably,
if you use DKIM signing at all, it happens in the
outbound direction, and does not use the "relay"
transport.  On the inbound direction, DKIM is normally
verified at the edge, and Authentication-Results added.

However, if you're then forwarding to an external mailbox
provider, and it is necessary to avoid avoidable DKIM
signature breakage, then "smtp_generic_maps" may not be
suitable.  Unfortunately, we don't yet have an
"smtp_generic_classes" to restrict output rewriting to
just envelope recipients.


--
        Viktor.