Courier offers IMAP services for your system. Prequisite: PostFix mailserver package Prequisite: Maildir style mailboxes see here Add the Courier package for IMAP support Courier will install a self signed certificate at the location /etc/courier/imapd.pem, which can be replaced with a production grade certificate later. Add your local domains to postfix Check domain settings with […]
Author: bobnoordam
How to install zlib for ubuntu
In ubuntu, the zlib package is named zlib1g, so:
Setting Postfix Support for Maildir-style Mailboxes
Maildir is an e-mail spool format that keeps all mails in seperate files, and thus does not need file locking to maintain message integrity. All operations are atomic. A MailDir directory contacins thgree subdirectories: tmp, new and cur. The populair Courier IMAP/POP servers work with the MailDir format. Restart postfix to make the changes take […]
Generic www tot non www redirect for apache
Step 1, Make sure you can use mod_rewrite The virtual host you want to apply the redirection on needs permissions to use mod_rewrite to perform the redirection. You will need something along these lines a little bit dependent on how your websites are configured to enable overriding options through .htaccess Step 2, Applying the redirect […]
Enabling apt-get on HP ThinOS
HP ThinOS (version 7 at the time of writing) is a modified version ubuntu xenial. You will find that the repository references are still present in /etc/apt/sources.list, so re-enabling package installation is rather straightforward: Activate administrator mode on the thin client Open an x-terminal (or use the build in graphical text editor) Remove the comments […]
Using backgroundworkers with progress reporting and cancelation
With the release of VS11 around the corner and the new async features in there everyone will have a wide toolset for writing non blocking responsive applications. If you have not yet played with the beta versions or regular threads (see for example Threads and the threadpool then the backgroundworker is the most basic component […]
Coloring individual cells or rows in a DX Gridcontrol based on a cell value
Coloring individual cells This sample hooks into the RowCellStyle event of the Gridview, and evaluates the value of the cell. Depending on the outcome, a background color is assigned to the cell. private void gridViewQueue_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e) { var oView = (GridView)sender; if (e.Column.FieldName == “task_stamp”) { Color oBgcolor; var dtValue = DateTime.Parse(oView.GetRowCellValue(e.RowHandle, “task_stamp”).ToString()); […]
Distinct, join and outer Join with linq to sql
While stored procedures will beat linq most of the time if you want top notch performance, there is a distinct advantage to LINQ when it comes to readability of your code, and keeping things a little more central within the application. These samples make use of the NorthWind database, and a dbml file called NorthWindContext.dbml […]
Importing data from an Excel sheet
C# Example using System; using System.Collections.Generic; using System.Data; using System.Data.OleDb; using System.Linq; using System.Text; namespace Excel2Table { public class ExcelReader { /// <summary> /// Reads an excel file with OLEDB, and returns a datatable object from the content. The sheet to be imported /// needs to be named “Import” in the excel file. /// </summary> […]
Threads and the Threadpool
This small demonstration code snippet will show you how to: Create threads to run code in the background of your application Demonstrate how to pass one or more parameters to a background thread Demonstrate how to wait for all background activity to finish before exiting the main program. using System; using System.Collections.Generic; using System.Threading; using […]