HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Default Maildir structure (http://www.howtoforge.com/forums/showthread.php?t=61784)

Hans-Linux 10th May 2013 10:55

Default Maildir structure
 
OS: Debian 6
ISPConfig version: 3.0.5.2
Mail: Dovecot

New Installation.

I need to change the default IMAP Maildir layout generated for new mail accounts and subdirectories to:

Maildir-|
______|./INBOX.Draft
______|./INBOX.Junk
______|./INBOX.Sent
______|./INBOX.Trash
______|/cur
______|/new
______|/tmp


How can I do this?

Thanks in advance

Hans

tahunasky 11th May 2013 09:54

Hi,

You can specify and INBOX path in dovecots.conf file:

mail_location = maildir:~/Maildir:INBOX=~/Maildir/.INBOX

Then you set the rest of the folders up in the email client as dovecot only cares about INBOX, cur, new, tmp.

For example, in windows live mail, you say where to store the emails that are sent, deleted, drafts and junk. So the client actually sends the email to the imap SENT folder when you send and email, or by default in windows live mail SENT ITEMS. Same with TRASH, or default DELETED ITEMS.

You also do this with the webmail clients. In squirrelmail you can change the locations in the config file /config/config.php. eg:
$default_folder_prefix = '';
$trash_folder = 'Trash';
$sent_folder = 'Sent';
$draft_folder = 'Drafts';

or in your case:
$default_folder_prefix = '';
$trash_folder = 'INBOX.Trash';
$sent_folder = 'INBOX.Sent';
$draft_folder = 'INBOX.Drafts';

Hans-Linux 13th May 2013 08:20

Thanks for the information.

We have to about 2,000 IMAP accounts to create and then transfer stored mails from an external hosting provider to these new IMAP accounts. The users use Evolution and Thunderbird on very low end diskless Gentoo systems. The sub accounts below /maildir/ should be automatically created when the user connect the first time with his Evolution or Thunderbird mail client and create the aforesaid directory structure, including /.INBOX.Junk.
It can be easily be done with IRedMail, but requires a dedicated mail server, hardware and administration.

till 13th May 2013 10:20

ISPConfig uses Maildirs without prefixes. I recommend thyt you convert the maildir structure during migration to the one that ispconfig uses. This should be possible as batch job with a script.

A prefix "INBOX" is typical for courier imap systems, on dovecot systems you dont have a prefix.

tahunasky 14th May 2013 01:13

I would also just stick with the default maildir structure. If you intend sticking with ispconfig, do the conversion now and then you dont have to worry about it again if upgrading or transferring to a new server.
It will also look better in Thunderbird/evolution, as the sent/junk/trash folder will all be top level and not hidden under INBOX.

Hans-Linux 23rd May 2013 17:18

Quote:

Originally Posted by till (Post 297145)
ISPConfig uses Maildirs without prefixes. I recommend thyt you convert the maildir structure during migration to the one that ispconfig uses. This should be possible as batch job with a script.

A prefix "INBOX" is typical for courier imap systems, on dovecot systems you dont have a prefix.

Converting the Maildir structure is easy. The problem is to convert nearly 2000 Evolution clients.

Will have to dig around and try to modify the configuration scripts.

Hans-Linux 5th June 2013 07:34

[SOLVED] Default Maildir structure
 
Modified mail_plugin.inc.php:
line 132 to: if(!is_dir($data['new']['maildir'].'/.INBOX.Sent')) {
line 135 to: $app->system->maildirmake($maildomain_path,$mail_config['mailuser_name'],'INBOX.Sent');

line 137 to: if(!is_dir($data['new']['maildir'].'/.INBOX.Drafts')) {
line 140 to: $app->system->maildirmake($maildomain_path,$mail_config['mailuser_name'],'INBOX.Drafts');

line 142 to: if(!is_dir($data['new']['maildir'].'/.INBOX.Trash')) {
line 145 to: $app->system->maildirmake($maildomain_path,$mail_config['mailuser_name'],'INBOX.Trash');

line 147 to: if(!is_dir($data['new']['maildir'].'/.INBOX.Junk')) {
line 150 to: $app->system->maildirmake($maildomain_path,$mail_config['mailuser_name'],'INBOX.Junk');


All times are GMT +2. The time now is 07:56.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.