On Mon, Oct 01, 2007 at 01:01:21PM +0200, Patrick Schoenfeld wrote: > Hi, > > I intend to use mutt in the feature for reading/writing emails. However, > besides some defaults that seem strange to me, it is good. But I am > experiencing problems with IMAP. > > Scenario: > Our companies imap server is a dovecot imap server, migrated from an earlier > courier imap. So this one has an INBOX. prefix before each folder. Thats > annoying, but it is. > > So now the question is: How to setup mutt, so that working with this is > posssible efficient? > > Configuration in .muttrc: > set imap_user = XXXXX > set imap_pass = XXXXX > set folder = imap://user@host/INBOX. > set spoolfile = imap://user@host/INBOX > set record = imap://user@host/INBOX.Sent > set postponed = imap://user@host/INBOX.Drafts > > This configuration works so far, that I can change to folders via 'c'. > If i remove the point at the end of set folder I cannot see any folder except > INBOX. Not working are the shorthand to call e.g. > INBOX.Mailinglisten.mutt-users by =Mailinglisten.mutt-users. > I could really need this to work with my folder structure. So can somebody > give me a > hint on how to fix this? Is this fixable at all? > If possible I would like to avoid the use of an imap syncer. Hi. You can either switch to the direct view of your subscribed (?) IMAP-Folders or fill your "mailboxes" via a small perl-script that queries the IMAP-Server about the subscribed / existing folders. (see attachment) Paul --
#!/usr/bin/perl use Net::IMAP::Simple::SSL; my $password="unencryptedpassword"; my $user="username"; my $host="imap-server"; my $seperator="/"; my $imap = Net::IMAP::Simple::SSL->new($host) || die $Net::IMAP::Simple::SSL::errstr."\n"; unless($imap->login($user, $password)){ die "Login failed: " . $imap->errstr() . "\n"; } my @mb; push @mb,sort($imap->mailboxes); foreach (@mb){ s/^/=/; s|/|$seperator|g; print "$_ "; }; print "\n"; $imap->quit;
Attachment:
signature.asc
Description: Digital signature