Thursday, December 06, 2012

Setup Cyrus IMAP account on Thunderbird

I connected to Cyrus-IMAP server using Thunderbird. There's some problems on the first try :

  • All the folder reside under INBOX folder. Trying to move them up fails
  • The sending does not work, always hang with the message box informing that it can not save to Sent folder
I was in the middle of following some troubleshooting direction from this discussion when I see there's textbox labeled "IMAP Server Directory" in "Account Advanced Setting" dialog (Account Management > Server Setting > Advanced) . I input the annoying "INBOX" root folder mentioned above and surprise surprise, it makes the root folder go away. The sending is acting normally after it too.

Below is how the dialog looks like :


Wednesday, December 05, 2012

Setup postfixadmin on top of existing postfix installation

My office mailserver was a result of migration sometime ago. It was done in a limited time at that time so I only migrated the needed data and setup to keep it running as soon as possible. So, stuff like postfixadmin was left out (the system is postfix+courier+sasl setup).

Until this recent time that I need to add the account that it started to bite me. Most of the setup guide for postfixadmin assume a pristine install where it generate the database from scratch which could possibly wipe out my existing installation. So, I need to follow them less linearly.

After some searching around, I settled using this article as a starting point. However, it's quite outdated (to the point the writer marked it oudated on a big font at the top of the page) but it prove useful in my case nonetheless. It also assume fresh install but it define the steps more clearly including some behind the scene matters that happen which help me make some workaround for my specific case.

So, here's the summary (some silly-but-useful trial and errors and mistakes omitted) on what I did :

  • Backup like crazy. It's a live system after all and one can not be too careful
  • Download and install the .deb package from  postfixadmin site : dpkg -i postfixadmin*.deb.  Saying no when asked for auto setup apache and database.
  • Add apache setting : make symbolic link on /etc/apache2/conf.d/postfixadmin to /etc/postfixadmin/apache.conf
  • Add setting for the existing postfix database to /etc/postfixadmin/config.inc.php along with other settings there
  • I couldn't find the admin account for it and find the solution to reset it here. Here's what I did on my case : 
    • Installed dovecot-common package since I used courier instead of dovecot. It is needed to get access to dovecotpw utility
    • run : dovecotpw -s MD5-CRYPT -p password | sed 's/{MD5-CRYPT}//'
    • update the admin account (it's on admin table of postfix db) with the above result  
After that things went quite smoothly. I get access to user management again and adding the user is a snap.