msgbartop
A cronological documentation test project, nothing serious, really!
msgbarbottom

24 May 2009 Configure mutt for Zimbra and IMAP

This post describes how to configure the command line e-mail client mutt to use your Zimbra IMAP mailbox.

Open the text file .muttrc, located in your home directory. If it does not exist, create it. Add or replace the following lines with your own user ID:

set spoolfile=imaps://mail.example.com/Inbox
set folder=imaps://mail.example.com/
set imap_user=username@example.com

If you would like to use your Zimbra Sent and Drafts folders for sent and postponed messages in Mutt, also add the following lines, as above:

set record=imaps://mail.example.com/Sent
set postponed=imaps://mail.example.com/Drafts

Mutt can now be used as a e-mail Zimbra client with access to all your mail. You can change folder in mutt by pressing the etter c. If you do not know the name of the folder, just press ?.

Tags: , , ,

Posted by

04 Apr 2007 Create a Courier-imap shared Spam folder

My aim is to ask procmail to deliver everyone’s spam emails into “shared.System.Spam” IMAP folder. All my mail-receiving users belong to a unix group called “users“.

  1. I need to create the shared maildir first. I put all my shared folders under “/var/spool/Maildir“, so first I will create a “System” sharable maildir, and then create a “Spam” folder inside it. Run these commands as root.
    # maildirmake -S /var/spool/Maildir/System
    # maildirmake -s write -f Spam /var/spool/Maildir/System
  2. The problem with the default “maildirmake -s write” is that it creates directories with mode 1777. Because of this sticky bit (mode ‘t‘ displayed in directory listing), you cannot remove files that does not belong to you. However, it is necessary for Courier IMAP to move all email files from ‘new/‘ to ‘cur/‘ when a user tries to select that folder. Thus the files that cannot be moved, i.e. files belong to other users, will not be picked up by Courier IMAP. That is the reason you cannot see other users’ newly delivered emails, even though these files do exist in the shared folder.The quick ‘n’ dirty solution would be turning off the sticky bit. But we also want to restrict the access to our user group only. So..
    # chgrp -R users /var/spool/Maildir/System/.Spam
    # chmod 1770 /var/spool/Maildir/System/.Spam/[cnt]??
  3. Finally, you want to link the shared folder to your own maildir. Run this as a regular user.
    $ maildirmake --add System=/var/spool/Maildir/System $HOME/Maildir

    You might need to run the above command for every user which needs to access the sharable maildir. Alternatively, you can set up a file called “/etc/maildirshared” (check the maildirmake man page for the exact location) to have the following configuration:

    System	/var/spool/Maildir/System

    Note that it is a character between “System” and the directory.

  4. Now you should be able to subscribe to the shared IMAP folder through your favourite mail user agent (Mozilla Mail in my case)! You should also be able to see all the new emails delivered to this folder, even if they are addressed to another user.

Tags: , , ,

Posted by