Search This Blog

Friday, June 25, 2021

Preserve first X characters of each line in Notepad++

In notepad++, press CTRL-H.
This regex example will chop off every line longer than 200 characters:


Thursday, May 20, 2021

Postfix Autostarts and delivers local mail

I had a Mac Folder action setup to call a shell script.  Within the shell script is a mail -s command send send an email out.   The problem is that a normal unix-based system, such as the MacOS, doesn't have a mail system running to help you deliver mail.   However, it comes pre-installed with Postfix and a simple edit to:
/private/etc/postfix/main.cf

with the line:
relayhost = smtp.myabcdomain.com

is all it takes.   But I thought I had to do more.  I ran the mailq command and it said "Queue report unavailable - mail system is down".  I ran netstat -a -n |grep 25 and saw nothing LISTENing on port 25.

To my surprise, just running the mail -s command to send an email will automatically start the service, listen on port 25, delivery the mail, then shut down the postfix service automatically.  Knowing that, then I'm good. This saves me from learning how to permanently start postfix daemon and I don't care about bounce back messages as the smarthost will handle that.

Here you can see the mailq command works fine just after sending an email. and Port 25 will close after about 30 seconds.
  




Tuesday, January 12, 2021

Felt the need

 Reality: A compromise of a state or local government system does not necessarily mean election infrastructure or the integrity of your vote has been compromised.

  Rumor: If state or local jurisdiction information technology (IT) has been compromised, the election results cannot be trusted.

Marina Fox and Youtube have passive aggressive desires to link to "Rumorcontrol" https://www.cisa.gov/rumorcontrol whenever Trump speaks.

Yet, they assure you with "not necessarily".   That's bogus.  If you've been compromised, then you should assume an integrity problem.  That's just common sense, people.