Changing the Postfix maximum email size

I’ve recently had some of my customers emailing me large image attachments and my Postfix mail server has been rejecting them. A quick look at the postfix configuration showed the message size limit was the default so I needed to increase it. This post looks at how to see what the current email message size limit is with Postfix and how to change it.

PHP Date Constants

When writing my "Get a list of all available constants with PHP" post I discovered there are a number of usful date format constants in PHP which can be used with the date() function. (Refer to my "Formatting Dates with PHP" post for more details about the PHP date function). This post looks at these constants and how to use them with the date function. Please note that these constants have only been present in PHP since 5.1.1.

Categories PHP

303 redirect with PHP

When you submit a form using a web browser the script processing the form often redirects after it has done its work to a thank you page (or similar). The response type people usually use when coding with PHP is a 302 redirect because it’s the default used when issuing a Location: header. The problem with this is on a page refresh the browser is likely to submit the form again. Instead you can use a 303 redirect to prevent the form being submitted again. This post looks at what a 303 response code / redirect is and how to send one with PHP.

Categories PHP

Installing maildrop on CentOS 5

I have been in the process of migrating my websites from a couple of dedicated machines to a VPS (Virtual Private Server) which has a fairly minimal base install of CentOS 5 on it. My existing mailserver runs on Gentoo Linux, running Postfix, courier-imap, maildrop, Spamassassin and ClamAV, with the mail accounts and aliases handled …

Read more

Upper case and lower case strings with MySQL

MySQL, as with other database servers, has a variety of text functions including functions for converting a string to upper case or to lower case. This post looks at how to convert a string to lower case or upper case with MySQL.

Style an HTML form input with CSS and jQuery

It’s possible with CSS to style a particular form input type without having to assign a class to each one with the special style. For example you may want to add a margin before radio buttons in a form but not all the other input elements. Unfortunately this doesn’t work in Internert Explorer 6 (which still has about 25% market share as at the writing of this post) but there is a way around this using Javascript. In this post I’ll look at both the CSS way of doing this and then also using the jQuery Javascript library.