The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,224 other followers

Archive for the ‘DevOps’ Category

Some postfix notes

Posted by jpluimers on 2020/10/15

Postfix has documentation on primary MX and secondary MX, but not on tertiary MX.

If the primary MX is down, you have a series of secondary MX and tertiary MX that configured the same way, MX DNS priority for primary, the series of secondary MX and tertiary MX have increasing numbers, and the primary MX goes down, then senders can get “too many hops” as secondary and tertiary MX are looping.

I had a hard time finding a good and easy solution as these queries do not return many meaningful results:

Here are some links that helped getting this solved:

  • [WayBack] Postfix Frequently Asked Questions: What does “Error: too many hops” mean?

    Short answer: this message means that mail is probably looping. If you see this after you turned on Postfix content filtering, then you have made a mistake that causes mail to be filtered repeatedly. This is cured by appropriate use of content_filter=header_checks=, and body_checks=.

    Long answer: the message has too many Received: message headers. A received header is added whenever Postfix (or any MTA) receives a message. A large number of Received: message headers is an indication that mail is looping around.

    Side comment: email uses the opposite of the technique that is used to avoid IP forwarding loops. With IP, the sender sets a TTL (time to live) field in the IP header. The field is decremented by each router. When the TTL reaches zero the packet is discarded and an ICMP error message is returned to the sender.

  • [WayBack] Error: too many hops (in reply to end of DATA command) · Issue #713 · mail-in-a-box/mailinabox · GitHub

    In case you or anyone else was/is wondering about the mydestination = localhost thing, the reason it has to be set to just localhost is because MIAB uses Postfix’s “virtual domain hosting” ( support. Per the documentation for mydestination at

    Do not specify the names of virtual domains – those domains are specified elsewhere. See VIRTUAL_README for more information.

    (in the context of MIAB every domain is a virtual domain).

In my case a series of these:

Received: from ( [])
    by (Postfix) with ESMTP id 26395200FE
    for <>; Fri, 29 Jun 2018 11:01:02 +0200 (CEST)
Received: from (unknown [])
    by (Postfix) with ESMTP id 077A5E937
    for <>; Fri, 29 Jun 2018 11:01:02 +0200 (CEST)

Specifying the transport will likely help me solve this problem:

This all came down to editing /etc/postfix/transport adding lines for each relayed domain like this one:    smtp:[]

Lines like it direct to use the smtp transport and use a specific host (normally, the relay transport is being used).

After this:

# postmap /etc/postfix/transport
# rcpostfix reload

I choose not to configure [WayBack] Postfix Configuration Parameters: relay_recipient_maps, but might if I had an automated way of replicating lists of valid (and invalid) users.

Another option was confirmed at [WayBack] Software-update: Postfix 3.4.0 / 3.3.3 / 3.2.8 / 3.1.11 / 3.0.15 – Computer – Downloads – Tweakers by [WayBack] menocchio. Thanks!

Dat is volgens mij eenvoudig op te lossen met relay_transport of transport_maps. Zie ook: Postfix transport table format.

Daarmee dwing je de secondary servers de mail altijd af te willen leveren bij de primary server (en dus niet bij een andere secondary). En als de primary niet online is, dan wacht ie netjes tot dat wel het geval is :-)

relay_transport = smtp:[primarymx.domain.tld]

Likely relevant: [WayBack] The Book of Postfix

Maybe relevant in the future:

Found on my hunt for the above:

Try not to make typo’s: [WayBack] postfix appears not finding MX records or host names from DNS

Interesting thought, but not sure how smart SPAM bots are now: [] Spam relaying through secondary MX… – Google Groups

To archive this:

  1. Rename from
  2. To
  3. Then save in


Posted in Communications Development, Development, DevOps, DNS, Infrastructure, Internet, Internet protocol suite, Power User, SMTP | Leave a Comment »

Squirrel · GitHub: Server-driven updates for native apps

Posted by jpluimers on 2020/07/23

Reminder to self as I might need it one day:

Server-driven updates for native apps (Windows/Mac/iOS)

[WayBack]Squirrel · GitHub

Via: [WayBackHow do you deploy and update desktop applications? Carl and Richard talk to Paul Betts about the open source project called Squirrel – https://github.c… – .NET Rocks! – Google+


Posted in Deployment, Development, DevOps, Software Development | Leave a Comment »

Why and how GitLab abandoned Microsoft Azure for Google Cloud | VentureBeat

Posted by jpluimers on 2020/07/22

Reminder to self to check out how this move went: [WayBack] Why and how GitLab abandoned Microsoft Azure for Google Cloud | VentureBeat.

Via [WayBack] Kristian Köhntopp – Google+


Posted in Azure Cloud, Cloud, Containers, Development, DevOps, Docker, GCP Google Cloud Platform, Google Kubernetes Engine, Infrastructure, Kubernetes (k8n), Software Development | Leave a Comment »

GitHub – gamelinux/passivedns: A network sniffer that logs all DNS server replies for use in a passive DNS setup

Posted by jpluimers on 2020/07/15

Cool tool: [WayBackGitHub – gamelinux/passivedns: A network sniffer that logs all DNS server replies for use in a passive DNS setup via [WayBack] How to log all my DNS queries? – Unix & Linux Stack Exchange (thanks mxmlnkn!).

It listens on port 53 for DNS requests then logs them to a file on regular intervals aggregating similar requests.

Usage is simple:

# passivedns -i ens32 -l /var/log/passivedns.log

[*] PassiveDNS 1.2.0
[*] By Edward Bjarte Fjellskål <>
[*] Using libpcap version 1.8.1
[*] Using ldns version 1.7.0
[*] Device: ens32
[*] Sniffing...

There are more options in the docs (it can do a lot including export to databases for querying), but this simple one allows you to just grep over abusive hosts like [WayBack] Nice when someone in Dallas using is querying your DNS infrastructure for many permutations of domains… · GitHub

Originating in 2013 ([WayBack] PassiveDNS version 1.0 | GameLinux), it still is being maintained.

It uses libpcap for sniffing and I ran it on separate machine hooked to a vSwitch configured in promiscuous mode so it sees all network traffic from that particular network segment.

There is a not fully up-to-date package available for various OpenSuSE releases (including Tumbleweed) [WayBack] Install package home:mnhauke:security / passivedns. It is x86_64 only, so if you want to run it on ARM, or want a more recent version then you need to build it yourself, for instance by using this as a template: [WayBack] Show home:mnhauke:security / passivedns – openSUSE Build Service.

Next tool on my list to try: [WayBack] dnstracer(8) – Linux man page.


Read the rest of this entry »

Posted in *nix, *nix-tools, Development, DevOps, Infrastructure, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

Nick Craver – Stack Overflow: How We Do Deployment – 2016 Edition

Posted by jpluimers on 2020/03/18

It sounds long ago, but this post is still so relevant for anyone not yet bringing operations and development close together. And for those who did:

  • automate the heck out of everything
  • make lots of mistakes as early as possible so you can fix them before the hit any of your production sites

[WayBackNick Craver – Stack Overflow: How We Do Deployment – 2016 Edition

The relevance is why Nick repeated it in 2018 in a response to a @ThePracticalDev discussion right after the first Falcon Heavy deployment, and why I repeat it now.


Posted in Development, DevOps, Infrastructure, Software Development | Leave a Comment »

%d bloggers like this: