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,880 other followers

Archive for March 20th, 2020

Links over beoordeling psychodiagnostiek

Posted by jpluimers on 2020/03/20

Wat links voor mijn archief, geïnitieerd door mijn interesse in SRZ-P:

–jeroen

Posted in About, Personal | Leave a Comment »

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

  • 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 »

 
%d bloggers like this: