Per la gestione della posta elettronica, IMAP è decisamente una figata,  soprattutto per chi ha diverse postazioni da cui consultare la posta (pc fisso in ufficio, portatile, casa, palmare etc) oppure chi ha la necessità di condividere una casella email tra diverse persone. In pratica i messaggi ricevuti ed inviati vengono visualizzati sul computer ma rimangono salvati sul server, a disposizione.
Da quando usiamo thunderbird nelle varie versioni mac/linux tutto funziona perfettamente tranne una cosa: la gestione e il caricamento dei messaggi con degli allegati. Visto il nervoso che mi ha provocato nei mesi il problema e vista l’assenza di menzioni in taliano al problema, ho deciso di postare qui la mia esperienza, sperando sia d’aiuto a qualche googolatore disperato.
Il problema, in pratica  è che ogni messaggio con un’allegato di qualche mega, ogni volta che viene visualizzato, se non si salvano delle copie sul disco locale, viene scaricato per intero senza limitarsi a header e corpo del messaggio.  Questo vuol dire che per avere un’anteprima di un messaggio con scritto “CIAO” e una foto da 3 mega allegata, occorre attendere che l’intero messaggio sia scaricato, per poi riscaricarlo se lo si vuole salvare su disco.  Ovviamente è sufficiente cambiare mesasggio o cartella per sbaglio (o perchè ci è arrivato un nuovo messaggio) che l’attesa diventa inutile e il download riparte da zero. Se ricevete tanti allegati, è davvero fastidioso.

Fino alla versione 1.5 si trattava di un bug conosciuto con cui seppur a fatica, abbiamo convissuto aspettando un fix ma da li in poi nonostante i tentativi saltuari di cambiare settagi e preferenze, il problema non ha mai trovato soluzione.

Almeno finquando non ho trovato questo articolo su mozillazine che, oltre a lisatre tutte le possibili cause, segnala anche un bug che si è poi rivelato essere il mio problema e che mai ero riuscito a trovare.

Setup a simple Calendar Server

November 28th, 2005

This is small how-to will show you how to setup a small calendar server on a Fedora machine using apache, webdav, mozilla sunbird and 10 minutes of free time.

Our goals:
- Share calendars between users
- Simplify Calendar backup process
- Use ical Standard

Requirements:
- A running installation of Fedora Core (FC4 in my case)
- Apache webserver up and running
- An active network connection orFedora CdRom for additional packages

###### Server Side Setup ######

First of all check if mod_dav_svn is installed (on fedora it should be by default):

[root@machine /]# rpm -q mod_dav_svn

If you get any version number, ModDav is installed (maybe you can try an update via yum). If not launch yum and install it:

[root@machine /]# yum install mod_dav_svn

Now open apache config file

[root@machine /]# vi /etc/httpd/conf/httpd.conf

and check the presence of the WebDav lockfile by searching these lines:


# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb

If not, add the lines above just afver the last tag.

In order prevent any httpd error message (like this) make sure that the line Include conf.d/*.conf is just after all the loaded modules.

Now create a directory inside the httpd document root to store calendar files (by default fc use /var/www, change the path in order to fit your installation):

mkdir /var/www/html/calendar

And now create a passwd directory:

mkdir -p /etc/httpd/passwd/

Now reload Apache:

service httpd restart

If you don’t get any error, open apache config file again:

vi /etc/httpd/conf/httpd.conf

and add the following lines just before the document root tag:


DAV On
AuthType Basic
AuthName "WebDAV Restricted"
AuthUserFile /etc/httpd/passwd/passwords
require user webdav

Now restart Apache Again

service httpd restart

We’ll create a new user and pass to authenticate to the webserver. The username we will create should be limited to WebDAV operations only, in order to minimise the risk of your server being compromised.

Now create a password file:
htpasswd -c /etc/httpd/passwd/passwords webdav

In this example the password will be stored in a file called /etc/httpd/passwd/passwords, and the username required will be “webdav”.

Now create a Calendar Sample File:

vi /var/www/html/calendar/sample.ics

copy and paste these lines in the file:


BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.0//EN
BEGIN:VEVENT
CREATED:20051128T225803Z
LAST-MODIFIED:20051128T225902Z
DTSTAMP:20051128T225803Z
UID:uuid1133218742734
SUMMARY:Calendar task from http://blog.soolid.it
PRIORITY:0
STATUS:
CLASS:PUBLIC
DTSTART:20051128T000000
DTEND:20071128T000000
BEGIN:VALARM
TRIGGER;VALUE=DURATION:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR

save and exit.

Make sure that the file is owned by apache:
chown apache:apache /var/www/html/calendar/sample.ics
and chmod it 755
chmod 755 /var/www/html/calendar/sample.ics

Now Download and Install Mozilla Sunbird on your client machine(s) (or any other ical compatible client) and subscribe to remote calendar file by giving the exact location of the .ical file (es: http://myserverorip/calendar/sample.ics) using username and password provided during the installation.

Now you can subscribe/edit/ remote calendars.

You can add multiple calendars for your users.

Offcourse, if you want a calendar file in read only mode, just give the url without password to your users.

# # # # # # About this guide # # # # # #

To Do’s:

  • Read the tutorial twice before publish :)
  • Try a new clean installation to test

Reference
Some guides/howto/forum post that help me to write this guide>