On my TODO list is to fix up the ProgClub wiki Log in / create account page so that there is some red text telling the user to go through the registration process if they want to sign up for the club.
Category Archives: Sys Admin
Postfix smtps configuration
I found some information on configuring Postfix to provide SMTPS (SSL/TLS) services on CentOS 5.1 Server Setup: LAMP, Email, DNS, FTP, ISPConfig (a.k.a. The Perfect Server) – Page 5 and Getting Postfix to run SMTPS on port 465.
The first article suggests main.cf configuration settings such as:
postconf -e 'smtpd_sasl_local_domain =' postconf -e 'smtpd_sasl_auth_enable = yes' postconf -e 'smtpd_sasl_security_options = noanonymous' postconf -e 'broken_sasl_auth_clients = yes' postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination' postconf -e 'inet_interfaces = all' postconf -e 'mynetworks = 127.0.0.0/8' postconf -e 'smtpd_tls_auth_only = no' postconf -e 'smtp_use_tls = yes' postconf -e 'smtpd_use_tls = yes' postconf -e 'smtp_tls_note_starttls_offer = yes' postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key' postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt' postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem' postconf -e 'smtpd_tls_loglevel = 1' postconf -e 'smtpd_tls_received_header = yes' postconf -e 'smtpd_tls_session_cache_timeout = 3600s' postconf -e 'tls_random_source = dev:/dev/urandom' postconf -e 'myhostname = server1.example.com'
And the second article tells how to modify master.cf to enable SMTPS:
smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject
PHP ini file allow_url_include configuration option
Today I enabled the allow_url_include configuration option in PHP on Apache on ProgClub MemberNet. This allows me to include a source file directly from svn, e.g.:
require_once( 'https://www.progclub.org/svn/pcrepo/slib/trunk/src/uri.php' );
Themeing my MemberNet web-page
Finally got around to making my MemberNet web-page look nice and pretty. Also integrated the look and feel with all of my PHP tests.
PHP ini file user_agent configuration option
Today I discovered the user_agent php.ini configuration option. Basically it allows you to specify the user agent PHP uses when it sends HTTP requests for files. I was screen scraping some data from Wikipedia (processing URI schemes) and it was replying with a 403 error, presumably because they’ve banned the default PHP user agent. Anyway I just changed my user agent to a copy of my one from Firefox and things started working. Pretty handy option!
How To Set Cron to Run Every 5 Minutes
Thanks to this handy document How To Set Cron to Run Every 5 Minutes I now my crontab configured so that my jj5-test repo gets updated every five minutes. It’s the sort of thing I generally do in a post-commit hook, but in this case that won’t work owing to the way the servers are configured (the files are in my account and not owned by the www-data user the commit-hook runs as).
So to configure cron I issued the command:
$ crontab -e
And then to update my svn working copy:
# m h dom mon dow command */5 * * * * cd /home/jj5/web/test && svn update > /dev/null
Handling character encodings in HTML and CSS
On my list of things to do is read the document Handling character encodings in HTML and CSS from the W3C. For some reason I can’t quite bring myself to concentrate on it right now.
How to open file links in Firefox 1.5 and above
Found some instructions about How to open file links in Firefox 1.5 and above and I’m going to try it out just as soon as I can reset my browser.
Basically you add something like the following to your user.js file which is in C:\Documents and Settings\[User Name]\Application Data\Mozilla\Firefox\Profiles\[Profile]\user.js.
user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", "http://www.example.com");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
view-source URI scheme
Today I learned about the view-source URI scheme. Check it out!
URI scheme
Reading about URI schemes today.
The UriSchemes page at the W3C suggests a few ways to add support for URL schemes. Maybe I could get file: URLs doing something suitable for SMB network resources in Firefox.