Mail filters

Server-side mail filters

If you receive mail from a variety of mailing lists or organisations you may find that you spend a lot of time sorting this mail into folders within your inbox. You may have even gone as far as creating mail filters in your email client to automatically sort your incoming email for you. This approach normally works well until you start accessing your email from lots of different mail clients in different locations. For instance at home you may use Mail, in work you might use Thunderbird, at a friends you might use the webmail interface and finally you may also want to check your email from your smartphone. Setting up the same filter rules across all these devices can be tedious if it is even possible. To get around this problem you can set up rules on the mail server so that your emails get filtered into the correct folders as soon as they arrive. You can setup and configure mail filters from the mailbox manager. Of course to do this you need to login to the mailbox manager web service. You can access the mailbox manager web interface at http://mailboxes.mtheory.co.uk or securely at https://mailboxes.mtheory.co.uk.

Note if you login securely you will get a warning that “the identity of this website has not been verified,” or “server’s certificate does not match the URL,” or “server’s certificate is not trusted,” in your web browser. This is because the mailbox configuration service is hosted by our ISP, Dreamhost, and the certificate is issued by them rather than us. Your browser will normally let you view the certificate. If you click on this your browser will give you the option to always trust this certificate or install this certificate. Either of these should resolve this problem for you.

Once you login you will see a screen similar to that shown below. You can configure quite a lot of things from the mailbox manager interface. Many of these features are pretty self-explanatory but more details can be found in this post.

Mailbox manager screen shot

Under the heading Email Filters there is the option Add New Filter for [your email address]. Clicking on this link brings up a new window with all the available options to configure your filter as shown below.

Email filter options

Much like mail filters in your email client there is a line which defines the search criteria and then several lines allowing you to specify what you would like to do with email that matches the search.

The first line defines the search and the first drop down menu allows you to select the field you want to search in, for instance: the From field which would normally contain the email address of the sender; the Subject field, which would be the subject of the email; the To field, the email address or address that the email is being sent to; the Body, i.e. the main text of the email etc. The second drop down menu lets you specify whether you want the field to contain or not contain the search term. Finally the text entry field lets you define what you want to search for. In the example above it is the term amazon.

If you want to create more complex multi-layered searches you can add another search line by clicking on the ‘+’ icon to the right of the text field. Perhaps you might want to search for emails From amazon with the Subject bill. You can add any number of layers.

The next line defines whether you want the search to act when it matches any of your search fields or all of them. You can select which you want by ticking the applicable radio button beside all and any of the above. For instance you might want to use any of the above to match emails From amazon or From hmv.

The following five lines give you the options on what you want to do with your emails that you have matched via your search. In the example above the radio button Move it to folder: is selected and the text field specifies the folder Amazon. Note that the folder must already exist in your inbox in order for the filter to be able to move the email into it. All of the options are pretty self explanatory. Forward it to email address: will forward the email to another email address you specify, perhaps a work address or a friends address. Add your text to the subject adds some text to the subject line, perhaps you might want to add Urgent or something similar. Add the header your text adds a new header to the email which another email client may use to filter. Finally Delete it quite obviously deletes the email.

Finally under If this filter matches there is a drop down menu offering you the option to  execute and continue or execute and stop. The former will run this filter and then continue to run any filters after it in your list. The later will run this filter and then stop. It will therefore not execute any filters in your list after it. Generally your last filter in your list should execute and stop while all the others should execute and continue.

Once you are happy with your filter click on the Add Filter button and you are done. You’ll now be returned to the homepage of the mailbox manager and under Email Filters you will see your new filter listed. From here you can choose to Edit it or Delete it or you can add another filter. You can have as many filters as you want.

Filter added screen shoot

Some tips

It is worth testing your filters before you let them loose. If your filters aren’t working as expected make sure the search criteria matches what is in the emails your trying to filter exactly. Sometimes the easiest thing to do is cut and paste the From or Subject from your email into the filter. If your filter is catching additionally emails then try adding more terms to the filter with the ‘+’ button to improve the selectivity.

Auto-responder

Auto responding to your email

If you are away you may wish to set the mail server to automatically reply to any emails received in order to inform people that you are away. An auto-response can be setup from the mailbox manager. To configure this you need to login to the mailbox manager web service. You can access the mailbox manager web interface at http://mailboxes.mtheory.co.uk or securely at https://mailboxes.mtheory.co.uk.

Note if you login securely you will get a warning that “the identity of this website has not been verified,” or “server’s certificate does not match the URL,” or “server’s certificate is not trusted,” in your web browser. This is because the mailbox configuration service is hosted by our ISP, Dreamhost, and the certificate is issued by them rather than us. Your browser will normally let you view the certificate. If you click on this your browser will give you the option to always trust this certificate or install this certificate. Either of these should resolve this problem for you.

Once you login you will see a screen similar to that shown below. You can configure quite a lot of things from the mailbox manager interface. Many of these features are pretty self-explanatory but more details can be found in this post.

Mailbox manager screen shot

 The Auto-Responder configuration can be found at the bottom of the mailbox manager interface. The options available are shown in the screen shot below.
Screen shot of auto-responder
Under the menu Auto-Responder you can configure everything about the auto-responder. At the top there is a tick box to activate the auto responder. Below this there are the From, Subject and Body fields that you would expect in any email. These three fields let you configure your generic automatic email response. To the right of the Subject field there is a tick box to Quote Subject, if ticked this simply replies to the email with the subject field used by the sender rather than one defined by you. If you are using this you should leave your Subject field blank. Below the Body field is a tick box which needs checked if your email body contains HTML. This ensures the email gets sent as a HTML email rather than a plain text one.
Finally at the bottom you have the option to set the date and time you want the auto-responder to start and stop. Note the format is years-months-days hours:minutes:seconds. Also the time zone is Pacific Time (i.e. GMT -8 hours during the winter) which you may need to take account of. Once you’ve configured your auto-responder click the Update Auto-Responder button to save the changes. As noted on the mailbox manager it can take up to 1 hour for the changes to go live, i.e. for the mail server to start or stop automatically replying to your emails.

Inbox house keeping

Inbox house keeping

The mail server is configured to prevent all your email staying in your inbox, this is to aid performance on the mail server. Typically the mail server will move email messages that have been sitting in your inbox to a folder called old-messages once they have been sitting in your inbox for 45 days or if there is more than 250 messages in your inbox. To configure these settings you need to login to the mailbox manager web service. You can access the mailbox manager web interface at http://mailboxes.mtheory.co.uk or securely at https://mailboxes.mtheory.co.uk.

Note if you login securely you will get a warning that “the identity of this website has not been verified,” or “server’s certificate does not match the URL,” or “server’s certificate is not trusted,” in your web browser. This is because the mailbox configuration service is hosted by our ISP, Dreamhost, and the certificate is issued by them rather than us. Your browser will normally let you view the certificate. If you click on this your browser will give you the option to always trust this certificate or install this certificate. Either of these should resolve this problem for you.

Once you login you will see a screen similar to that shown below. You can configure quite a lot of things from the mailbox manager interface. Many of these features are pretty self-explanatory but more details can be found in this post.

Mailbox manager screen shot

Under the heading Inbox Housekeeping you can change how many and how long messages are allowed to sit in your inbox. You can choose were to move messages to, whether the server should notify you via email that it has moved messages and whether or not you wish it to Even expire new messages, i.e. move messages which you’ve not yet read. Change the settings as you desire and then make sure you click on the button, Update Settings to save the changes.

Redirecting a webpage

There is a very simple method of redirecting webpages in html. In the <head> element you simply need to add the <meta> tag <meta http-equiv="Refresh" content="0; URL=http://www.somedomain.com/page_to_redirect_to"> to the contents of your html between your <head></head> tags. Lets look at the tag in more detail, http-equiv="Refresh" tells the web browser to refresh the webpage with the following variables content="0; URL=http://www.somedomain.com/page_to_redirect_to". There are two variables in content seperated by a semi-colon. The first, in this case 0, tells the browser how long to wait in seconds before reloading the webpage. The second, in this case URL=http://www.somedomain.com/page_to_redirect_to, gives the browser the url to redirect too. So for the above we have told the browser to load the page http://www.somedomain.com/page_to_redirect_to immediately. If we had set the first variable to 60 then the browser would wait 60 seconds before loading http://www.somedomain.com/page_to_redirect_to.

So say you want to redirect your main website at http://www.mtheory.co.uk/name straight to your blog then you would replace the code in your index.html file in your Website folder with the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
	<meta http-equiv="Refresh" content="0; URL=http://www.mtheory.co.uk/name/wordpress/">
        <title>My Blog</title>
	</head>
	<body>
	<!--<p>This page should automatically redirect you to
       <a href="http://www.mtheory.co.uk/name/wordpress/">
       http://www.mtheory.co.uk/name/wordpress/</a></p>-->
	</body>
</html>

You should replace the name parts of the urls with your name which is the part before the @mtheory.co.uk in your email address. The paragraph in the <body> has been commented out with <!-- -->. You may want to remove the comments so that the browser displays a link that people can click on if for some reason their browser fails to redirect them. You may also wish to change the title from My Blog to anything else you wish.

Wikis and more

Wikis

A wiki is a web page or set of web pages that can be edited by the users rapidly and collaboratively. Wikipedia is probably the most famous of all wikis and their underlying engine is called MediaWiki. It’s open source and available for install on mtheory.

Wiki’s allow easy edits to webpages and enable many people to collaborate, however they are a prime target for spammers and unless you expect a largish number of people to contribute we would suggest you avoid a wiki. Either that or you need to lock it down quite a bit to eliminate the spamming problem. This somewhat negates some of the benefits of a wiki. The support pages on the old mtheory site were based around media wiki and suffered from large numbers of unwanted edits never mind the creation of hundreds of unwanted pages by spammers. In saying that, if you are willing to monitor and have multiple contributors you can make it work.

More

In general most web based things can be installed and made to run under mtheory. SQL databases can be readily generated and custom frameworks and platforms can be installed if required and you have a genuine need. If you’re looking to do something unusual just ask.

Web logs and web analytics

Web logs are logs from your website turned into useful statistics. More commonly people use web analytics these days which provide more detailed information on who is actually visiting your site. Traditionally people used web logs which are derived from the server logs (in most cases Apache) and converted into graphs by programs like Analog. However in 2005 Google launched Google Analytics which relies upon tracking code being inserted into the web pages to register the visitor with the tracking system (this isn’t the same as a cookie, which is left on your machine). This allowed much more sophisticated, including real time, analysis of what visitors were doing on your website. As a result it was a massive success and some estimates suggest that half of all web sites use Google Analytics.

A variety of open source alternatives now exist which attempt to compete with Google Analytics, one of which is called Piwik. This is what we use to track web site stats and because it relies upon code being embedded into web page in question you can use it to track any website you want and not just ones hosted on mtheory.

Why not just use Google Analytics? Well there are potentially good reasons not to use Google especially when it comes to privacy concerns. See the Wikipedia page on Google Analytics for an explanation of potential concerns. Personally we like having control over data we generate.

What about web logs? We also run a traditional stats system using Analog and the server logs for domains hosted on mtheory. Generally these will be made available to anyone who wants to look at them, they are much harder to derive useful information from however.

You can login to our Piwik install at https://mtheory.co.uk/logs. (Note you’ll need to request a username and password first).

Sub-domains

A sub-domain is a domain that sits underneath the main domain name. It is anything before the ‘.’ before the main domain name. In the case of mtheory, mtheory.co.uk is the main domain name and tippingpoint.mtheory.co.uk is a sub-domain of mtheory.co.uk.

Sub-domains are useful as they can often be easily remembered and can redirect traffic somewhere else whilst appearing to stay within your domain. For instance tippingpoint.mtheory.co.uk is actually a Tumblr blog and mailboxes.mtheory.co.uk is actually hosted by our ISP, Dreamhost. They can also be used as a shortcut to some deeply nested part of your site that may otherwise require a very long URL.

If you need or want a sub-domain from mtheory for some particular use please get in touch with the administrator.