Wanted: Your Spam Email

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.

Interested in having your email filtered for spam/viruses at no charge?

Contact me and I’ll get your domain(s) set up.  You will only need to change your MX preference and add my mail server as a higher preference than your existing MX entry/entries.

All mail will be filter that is destined for your domain and then all clean email will be forwarded on to your mail server.  All spam/virus mail will remain on my mail server for you to review.  You will have web access to control whitelist/blacklist entries, as well as controlling spam score thresholds and other functions such as releasing quarantined mail and reviewing all mail seen by my mail server.

I need some real world domains to test.  You will be responsible for providing me allowed recipients for your domain though.

If you are interested, feel free to contact me (postmaster@techish.net) and we’ll discuss the details further.  I will do this at no charge during the testing phase.  Once testing has completed, I will provide an archive of your quarantined mail (if you’d like) before it is completely removed from the server.  At that point, I will ask that you remove the MX record pointing to my mail server within 30 days.

Testing can go on for 6 months, 2 years, or even as little as 24 hours.  You can opt-out at any time and within 24 hours you will have access to your email quarantine from mail stored on my server during testing phase.

Informix – Get last executed SQL query

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.

This is my preferred method.

onstat -g ses <sesid>

Where <sesid> is the session id of the connected user querying the database.

To get the session id

onstat -g ses

This will produce output similar to below.

IBM Informix Dynamic Server Version 9.40.FC7     -- On-Line -- Up 4 days 09:44:52 -- 1445712 Kbytes

session                                      #RSAM    total      used       dynamic
id       user     tty      pid      hostname threads  memory     memory     explain
31457    informix -        0        -        0        12288      11368      off
31450    informix -        0        -        0        12288      11368      off

That will print out all the sessions;  from there, use the session id column (column 1) to get the session id and plug it into the first command to show last executed statement.

onstat -g ses 31457

This produced the following output for me

Sess  SQL            Current            Iso Lock       SQL  ISAM F.E.
Id    Stmt type      Database           Lvl Mode       ERR  ERR  Vers Explain
30943 -              v004               CR  Not Wait   0    0    9.03 Off

Last parsed SQL statement :
  select distinct(tmptype) from form_cat

Google Sesame Video Demo

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.

Sorry for the poor quality. I just wanted to demo this for a few friends. Originally discovered at LifeHacker (http://lifehacker.com/5876559/sign-into-your-google-account-on-public-computers-without-typing-anything)

  1. At a public terminal, visit https://accounts.google.com/sesame
  2. Fire up your camera’s QR reader/scanner.
  3. On your phone, allow the URL to open that the QR has scanned.
  4. Choose Gmail or iGoogle.
  5. Your browser will log you in.

Enjoy!

[SLVideoPlayer file=SESAME.mp4, width=640, height=480 /]

End of the week sadness

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.
width=578

Broodwar

Argh. I just wanted to get my frustration out with some Broodwar… Guess I’ll go home unsatisfied. *shrug*

nginx 502 bad gateway

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.

[note]May 22, 2012: I have since moved away from TCP backend to Unix sockets. This has resolved my sporadic 502’s and gave better performance.
In /etc/rc.local I removed the -a and -p arguments and replaced with -b /tmp/php.socket and in my nginx configuration, I set fastcgi_pass unix:/tmp/php.socket;
[/note]

I discovered I needed a manager for fastcgi so I decided on daemontools instead of php-fpm.

Instructions for setting this up are here:  http://wiki.linuxwall.info/doku.php/en:ressources:dossiers:nginx:daemontools_spawnfcgi

I also had to modify my /etc/nginx/fastcgi_php file to reflect that I am now working on TCP port php5-cgi instead of a Unix socket.

location ~ .php$ {
    include /etc/nginx/fastcgi_params;

    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    if (-f $request_filename) {
-        fastcgi_pass unix:/var/run/www/php.sock;
+        fastcgi_pass 127.0.0.1:9000;
    }
}

This is my run command for the spawn-fcgi service:

root@node1:~# cat /etc/sv/spawn-fcgi/run
#! /bin/sh
exec /usr/bin/spawn-fcgi -n -a 127.0.0.1 -p 9000 -u www-data -g www-data -C 5 /usr/bin/php5-cgi

Now, no more intermittent 502 Bad Gateways. This isn’t nginx’s fault, it’s just PHP crashing and there isn’t a monitor to restart the process. That has been resolved now.