SMTP tidbits for the to-be postmaster

This is a quick overview of the parts of an SMTP session that are relevant to SPF and mail server setup. Just a sample SMTP session For a starter, this is what an ESMTP session between two mail servers talking on port 25 can look like (shamelessly copied from this post, which also shows how [...]

Traces of a (failed, I hope) web server attack

I suddenly got the following line in public_html/error_log: [06-Feb-2019 17:51:53] PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set ‘always_populate_raw_post_data’ to ‘-1′ in php.ini and use the php://input stream instead. in Unknown on line 0 So I took a closer look on the logs: [...]

Better than netstat: lsof tells us who is listening to what

Be sure to read the first comment below, where I’m told netstat can actually do the job. Even though I have to admit that I still find lsof’s output more readable. OK, so we have netstat to tell us which ports are opened for listening: $ netstat -n -a | grep “LISTEN ” Thanks, that [...]

Outgoing SMTP mail servers considerations

Mail with gmail.com as From address vanishing It started really bad: Someone asked me why he hasn’t received an answer from me in two weeks, and I had answered his mail the same day I got his. It turned out that Gmail had thrown mail into the black hole without any warning. Probably the updated [...]

Turning off autosave on WordPress (since it hangs)

After upgrading to WordPress 4.7.2, and thought it would be smashing fun, I found my “Publish” button disabled due to a draft being saved forever. There have been many complaints about this all over the web. I didn’t manage to find a solution to this problem, just a workaround: Disable autosaving altogether. This is a [...]

Making a mirror of a WordPress blog on my own computer

This is a note to self on how to create a mirror copy of this blog on my own computer. My own peculiar methods are all over. Create a virtual host on my apache httpd server (port 99) Uncompress the site’s entire public_html directory into the virtual host site’s root directory (that’slazy, I got a [...]

Linux Malware Detect for occasional non-root use

Intro This is a minimal HOWTO on installing Linux Malware Detect for occasional use as a regular non-root user. Not that I’m so sure it’s worth bothering, given that contemporary exploit code seems to be able to go under its radar. Background One not-so-bright afternoon, I got a sudden mail from my web hosting provider [...]

Drupal 7: Making a global regular expression replacement

The goal: Create spam-harvesting safe mailto links anywhere in the pages, generated on the fly with slightly obfuscated JavaScript, so that harvesting bots don’t get the email addresses. To make it slightly more complicateded, I want a replacement pattern with a parameter, telling the replacement script which email address to inject. In other words, if [...]

Making a click-for-help window with jQuery’s tooltip widget

Intro I needed some neat overlay to appear when the user clicks those question-mark icons on a specific, Drupal-based page. So I went for using jQuery’s tooltip widget, with due adaptations. It turned out to be a wise choice. The idea is simple: Click on the question mark, an overlay window appears right underneath it, [...]

A perl script sending mails for testing a mail server

Just set up your mail server? Congratulations! Now you should test it. In particular, check if it relays mails to other servers and if the response time is reasonable. Here’s a script for doing the testing. Just edit the arguments to send_mail() to match your setting. #!/usr/bin/perl use warnings; use strict; use Net::SMTP; send_mail(’127.0.0.1′, # [...]