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 1,854 other subscribers

Archive for 2020

If I need to analyse power usage on my Android

Posted by jpluimers on 2020/03/20

A while ago, I had a power issue that somehow resolved itself before I could dig deeper into it, so for next time:

Via Roderick Gadellaa.

–jeroen

Posted in Android Devices, OnePlus Five, Power User | Leave a Comment »

Postfix for relaying SMTP, some info about my own configuration

Posted by jpluimers on 2020/03/20

I’ve a bunch of secondary MX servers using postfix (which I like a lot over sendmail). Basically all their configurations are very similar:

  1. To the file /etc/postfix/relay, add a list of domains to relay for, each ending with a space followed by OK as per
    [WayBack] Configure Postfix to relay mail to multiple internal mail servers w/different domains
  2. Run postmap /etc/postfix/relay to update the relay database file.
  3. Ensure that /etc/postfix/main.cf has these settings (note that the FQDN – in the example smtp3.example.org – isn’t always returned by hostname --fqdn, see below):
    1. inet_interfaces = all
    2. myhostname = smtp3.example.org
    3. smtpd_helo_required = yes
    4. smtpd_helo_restrictions = permit_mynetworks, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_unknown_helo_hostname
  4. rcpostfix restart && rcpostfix status

Check the functionality with journalctl -u postfix.

FQDN – how to get myhostname

This usually gives a good indication of your external FQDN, but depending on your network circumstances it might not at all be the FQDN of your machine:

dig +noall +answer +short -x `curl -s ipv4.whatismyip.akamai.com` | sed 's/\.$//'

I got there through these StackExchange answers:

Testing with sendEmail

Then test with sendEmail from [WayBack] GitHub – mogaal/sendemail: lightweight, command line SMTP email client, with statements like these

The most recent version is now at [Wayback/Archive.is] GitHub – zehm/sendEmail: SendEmail is a lightweight, command line SMTP email client.

  • sendEmail -o fqdn=sending.example.org -f sender@example.org -t recipient@example.com -u message-subjetc -s smtp3.example.org -m message-text
  • sendEmail -o fqdn=sending.example.org -f sender@example.org -t recipient@example.com -u message-subjetc -s smtp3.example.org -m message-text -v -v -v -v

If you get an error containing 450 4.7.1Helo command rejected: Host not found, then reject_unknown_helo_hostname works, but your -o fqdn= parameter contains an invalid hostname.

More sending examples are in the sendEmail documentation.

If you want to know more about fighting SPAM, then continue at [WayBack] Fighting Spam – What can I do as an: Email Administrator, Domain Owner, or User? – Server Fault

–jeroen

Posted in *nix, *nix-tools, postfix, Power User, sendmail | Leave a Comment »

How to Integrate ILMerge into Visual Studio Build Process to Merge Assemblies? – Stack Overflow

Posted by jpluimers on 2020/03/19

On my research list for Visual Studio 2017 and up: [WayBack] How to Integrate ILMerge into Visual Studio Build Process to Merge Assemblies? – Stack Overflow

–jeroen

Posted in .NET, Development, Software Development, Visual Studio and tools | Leave a Comment »

Why should I hire a software engineer if I can just copy and paste code from Stack Overflow?

Posted by jpluimers on 2020/03/19

Via [WayBack] Your cut and paste skills are in demand ##IL – Christoph Puppe – Google+:

–jeroen

Posted in Development, Pingback, Software Development, Stackoverflow | Leave a Comment »

Chocolatey and TLS since early 2020

Posted by jpluimers on 2020/03/19

I was upgrading a few older systems that had been off-line for quite a while.

When installing Chocolatey, I bumped into this error:

C:\bin>"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Exception calling "DownloadString" with "1" argument(s): "The request was aborted: Could not create SSL/TLS secure channel."
At line:1 char:1
+ iex ((New-Object System.Net.WebClient).DownloadString('https://chocol ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

So I tried [WayBack] chocolatey “The request was aborted: Could not create SSL/TLS secure channel.” – Google Search

Results indicated TLS 1.1 support was removed early February 2020 from Chocolatey because of security reasons, which impacts the installation on older systems:

Note [WayBack] Chocolatey install Error: The request was aborted: Could not create SSL/TLS secure channel – Stack Overflow with a temporary workaround for Microsoft Windows Server 2016:

Looks like the security protocol changed:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

–jeroen

Posted in Chocolatey, Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2016 | Leave a Comment »

Display the relationships between formulas and cells – Excel

Posted by jpluimers on 2020/03/18

The “Formulas” tab has to buttons that help to Display the relationships between formulas and cells – Excel [WayBack]:

  • Precedent cells —   cells that are referred to by a formula in another cell. For example, if cell D10 contains the formula =B5, then cell B5 is a precedent to cell D10.
  • Dependent cells —    these cells contain formulas that refer to other cells. For example, if cell D10 contains the formula =B5, cell D10 is a dependent of cell B5.

To assist you in checking your formulas, you can use the Trace Precedents and Trace Dependentscommands to graphically display and trace the relationships between these cells and formulas with tracer arrows, as shown in this figure.

Worksheet with tracer arrows

Related:

–jeroen

Posted in Development, Excel, Office, Power User, Software Development | Leave a Comment »

The Delphi Geek: Data-driven Multithreading

Posted by jpluimers on 2020/03/18

Still on my reading list because it is relevant to many programming environments: [WayBack] The Delphi Geek: Data-driven Multithreading.

Related:

–jeroen

Posted in Delphi, Development, Software Development | 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.

–jeroen

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

Fast-Forward »: My Lazarus External Tools (and Delphi External tools)

Posted by jpluimers on 2020/03/17

For my link archive if I want to make Explorer (for Linux caja) or console shortcuts to source or target directories: [WayBack] Fast-Forward »: My Lazarus External Tools with these XML files from [WayBack] Lazarus External Tools · GitHub:

And the Delphi equivalent from 2004: [WayBack] Fast-Forward »: My Delphi Tools, which addes “Open Source in Notepad2” and “Start Resource Explorer”.

via: [WayBack] Ondrej Kelle – Google+

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Lazarus, Software Development | Leave a Comment »

Working around [Fatal error] F2084 Internal errors like AV101E53EB-R0000000C-0

Posted by jpluimers on 2020/03/17

A few notes from my response to [WayBack] [Fatal error] F2084 Internal error : AV101E53EB-R0000000C-0 I’m getting this when trying to do some code completion. Any idea ? – Stéphane Wierzbicki – Google+:

This compiler related error usually made it go away for me either when it occurs during project compilation or when using code completion: Close the IDE. Delete your DCU files. Then restart the IDE.

Starting fresh gives a high chance if fixing this unless it is indeed a compiler related error in which case it returns. For that you need to trim down your code to see under which circumstances.

Reasoning (please shoot at it when things are wrong/missing):

Both the IDE code completion and the project compilation use the compiler. The DCU cache is shared between these compiler instances. The DCU cache depends on internal memory structures. Various pointer related errors (both from the IDE, compiler and 3rd party extensions) can damage this cache.

Especially weak IDE uses of the compiler are the find symbol and rename symbol functionalities. I’ve stopped using those about a decade ago.

Sometimes the F2084 (which I often mistype as F2048) is indeed an error in the compiler. Over the years, some of them have been fixed too. See my earlier articles on F2084.

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, F2084, Software Development | Leave a Comment »