<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The cPanel Admin &#187; imap</title>
	<atom:link href="http://www.thecpaneladmin.com/tag/imap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thecpaneladmin.com</link>
	<description>We know stuff about cPanel.</description>
	<lastBuildDate>Mon, 21 Nov 2011 19:50:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Installing and Configuring Dovecot</title>
		<link>http://www.thecpaneladmin.com/installing-and-configuring-dovecot/</link>
		<comments>http://www.thecpaneladmin.com/installing-and-configuring-dovecot/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 17:05:18 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[mail]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=258</guid>
		<description><![CDATA[Enabling Dovecot You can convert a server from cppop or Courier IMAP to dovecot by running the following command: /scripts/setupmailserver dovecot Then set /var/cpanel/cpanel.config values: maildir=1 mailserver=dovecot Configuring Dovecot Most relevant configurations can be made via WHM &#62; Mailserver Configuration. To customize the Dovecot configuration file in a way that the WHM configuration interface doesn&#8217;t [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/configuring-pureftp/' rel='bookmark' title='Command Line PureFTP Configuration on cPanel'>Command Line PureFTP Configuration on cPanel</a></li>
<li><a href='http://www.thecpaneladmin.com/users-customize-awstats/' rel='bookmark' title='Allowing Users to Customize AwStats'>Allowing Users to Customize AwStats</a></li>
<li><a href='http://www.thecpaneladmin.com/automating-apache-php-updates/' rel='bookmark' title='Automating Apache and PHP Updates'>Automating Apache and PHP Updates</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h2>Enabling Dovecot</h2>
<p>You can convert a server from cppop or Courier IMAP to dovecot by running the following command:</p>
<blockquote><p>/scripts/setupmailserver dovecot</p></blockquote>
<p>Then set <strong>/var/cpanel/cpanel.config</strong> values:</p>
<p><code>maildir=1<br />
mailserver=dovecot</code></p>
<h2>Configuring Dovecot</h2>
<p>Most relevant configurations can be made via WHM &gt; Mailserver Configuration.</p>
<p>To customize the Dovecot configuration file in a way that the WHM configuration interface doesn&#8217;t allow, use one of the following methods:</p>
<p>If the directive you wish to change is already present in the template file, simply provide a value in the  main datastore. For example, to change the &#8220;lock_method&#8221; to &#8220;dotlock&#8221; add a line like this to <strong>/var/cpanel/conf/dovecot/main</strong>:</p>
<p><code>lock_method: dotlock</code></p>
<p>After making this change run <strong>/scripts/builddovecotconf </strong>and the configuration file will be updated.</p>
<p>If the directives you want to use in the dovecot.conf file <strong>do not </strong>exist in the template, copy the /var/cpanel/templates/dovecot1.1/main.default  (folder name may vary per version) template file to one named main.local. Make the modifications to main.local then run <strong>/scripts/builddovecotconf </strong>to regenerate the final configuration file. Your new template will be used each time the Dovecot configuration file is rebuilt in the future.</p>
<p>When using this method please note that updates to the dovecot binaries may require matching updates to the dovecot template file. The dovecot update system does not touch the main.local template in any way, and it is the responsibility of the administrator to reconcile cPanel&#8217;s template changes in main.default with the site specific main.local template.</p>
<p>A useful command when customizing the Dovecot configuration file is <strong>dovecot -n.</strong> This outputs the configuration being used by the current Dovecot process. Using this, you can verify that Dovecot is using all the directives you added to the configuration.</p>
<p><map name='google_ad_map_258_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/258?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_258_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=258&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Finstalling-and-configuring-dovecot%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=258&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/configuring-pureftp/' rel='bookmark' title='Command Line PureFTP Configuration on cPanel'>Command Line PureFTP Configuration on cPanel</a></li>
<li><a href='http://www.thecpaneladmin.com/users-customize-awstats/' rel='bookmark' title='Allowing Users to Customize AwStats'>Allowing Users to Customize AwStats</a></li>
<li><a href='http://www.thecpaneladmin.com/automating-apache-php-updates/' rel='bookmark' title='Automating Apache and PHP Updates'>Automating Apache and PHP Updates</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/installing-and-configuring-dovecot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding Courier IMAP and Maildir</title>
		<link>http://www.thecpaneladmin.com/understanding-courier-imap-and-maildir/</link>
		<comments>http://www.thecpaneladmin.com/understanding-courier-imap-and-maildir/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 17:03:19 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[mail]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=255</guid>
		<description><![CDATA[Maildir (run by Courier IMAP or Dovecot) is a mail format used in conjunction with an MTA to store email on the server as separate files within folders.  This post covers Courier IMAP as a service, not in terms of mail client usage. Directory Structure A user&#8217;s email is store in &#8221;&#8217;/home/user/mail/&#60;domain&#62;/&#60;emailuser&#62;/&#8230;&#8221;&#8217;. Below is a [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/quota-errors-in-exims-panic-log/' rel='bookmark' title='Quota Errors in Exim&#8217;s Panic Log'>Quota Errors in Exim&#8217;s Panic Log</a></li>
<li><a href='http://www.thecpaneladmin.com/fatal-write-failure-valiases/' rel='bookmark' title='Fatal! Write failure for /etc/valiases/..'>Fatal! Write failure for /etc/valiases/..</a></li>
<li><a href='http://www.thecpaneladmin.com/cpanel-backup-system/' rel='bookmark' title='The cPanel Backup System'>The cPanel Backup System</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<blockquote><p>Maildir (run by Courier IMAP or Dovecot) is a mail format used in conjunction with an MTA to store email on the server as separate files within folders.  This post covers Courier IMAP as a service, not in terms of mail client usage.</p></blockquote>
<h2>Directory Structure</h2>
<p>A user&#8217;s email is store in &#8221;&#8217;/home/user/mail/&lt;domain&gt;/&lt;emailuser&gt;/&#8230;&#8221;&#8217;. Below is a sample directory structure of an email account:</p>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<ul>
<li>
<p style="margin-bottom: 0in;">/home/username/mail (mail folder)</p>
<ul>
<li>
<p style="margin-bottom: 0in;">/domain.com (domain)</p>
</li>
<li>
<p style="margin-bottom: 0in;">admin (email user)</p>
</li>
<li>
<p style="margin-bottom: 0in;">maildirsize (quota/usage summary, 		expendable)</p>
</li>
<li>
<p style="margin-bottom: 0in;">cur  (default inbox for read 		email)</p>
</li>
<li>
<p style="margin-bottom: 0in;">new  (default email for unread 		email)</p>
</li>
<li>
<p style="margin-bottom: 0in;">Drafts ( sample folder )</p>
<ul>
<li>
<p style="margin-bottom: 0in;">- cur (read email)</p>
</li>
<li>
<p style="margin-bottom: 0in;">- new (unread email)</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p style="margin-bottom: 0in;">
<ul>
<li>
<p style="margin-bottom: 0in;">/home/username/etc</p>
<ul>
<li>
<p style="margin-bottom: 0in;">/domain.com (domain)</p>
<ul>
<li>
<p style="margin-bottom: 0in;">passwd (contains email account 			list and UIDs, similar to /etc/passwd)</p>
</li>
<li>
<p style="margin-bottom: 0in;">shadow (contains email 			passwords, similar to /etc/shadow)</p>
</li>
<li>
<p style="margin-bottom: 0in;">quota (contains email account 			quota info)</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p style="margin-bottom: 0in;">
<h2>Folders</h2>
<p>So basically, each email user has its own folder, each containing the main inbox (cur/new), and separate email folders. Each separate inbox folder also contains a &#8221;&#8217;cur&#8221;&#8217; and &#8221;&#8217;new&#8221;&#8217; folder.</p>
<ul>
<li>cur &#8211; read email</li>
</ul>
<ul>
<li> new &#8211; unread email</li>
</ul>
<p>Email that is marked as read by the IMAP client (outlook, etc) is moved from &#8216;new&#8217; to &#8216;cur&#8217; .</p>
<p><strong>Etc Files</strong></p>
<p>Here&#8217;s a sample passwd file:</p>
<p>admin:x:510:510::/home/vnessa5/mail/v-nessa.net/admin:/bin/bash<br />
support:x:513:513::/home/vnessa5/mail/v-nessa.net/support:/bin/bash</p>
<p>Similar to the /etc/password on the server, the file contains some critical pieces of information. From left to right:</p>
<ul>
<li>username</li>
<li>password (x indicates the password is in a shadow file)</li>
<li> UID (should match main user&#8217;s UID in /etc/password)</li>
<li> GID (should match main user&#8217;s GID in /etc/password)</li>
<li> home folder (location of the email account&#8217;s mail folders)</li>
<li> shell (not relevant)</li>
</ul>
<h2>Permissions</h2>
<p>There is a script in cPanel to attempt to fix user mail permissions, which is safe to run on a VPS or Dedicated server, but should not be run on shared without approval from a system admin:</p>
<blockquote><p>/scripts/mailperm</p></blockquote>
<p>The permissions should be as follows:</p>
<p>- /home/user/etc (user:mail, 755)<br />
- domain.com (user:mail, 770)<br />
- passwd (user:mail, 644)<br />
- shadow (user:mail, 644)</p>
<p>The other permissions can be 755 user:user, as those files don&#8217;t affect email delivery.</p>
<p>The &#8216;fixperms&#8217; command on the shared servers should fix the permissions of a user&#8217;s home folder, including mail and etc.</p>
<h2>Converting to Maildir</h2>
<blockquote><p>/scripts/convert2maildir</p></blockquote>
<p>This will leave the inbox files behind if you&#8217;re coming from Mbox, so you can list/remove them with:</p>
<blockquote>
<div style="font-style: italic;"><em>find /home/*/mail/* -name inbox -exec ls -la {} \;</em></div>
</blockquote>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;"><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in;">- /home/username/mail (mail folder)</p>
<p style="margin-bottom: 0in;">- /domain.com  (domain)</p>
<p style="margin-bottom: 0in;">- /admin (email user)</p>
<p style="margin-bottom: 0in;">- maildirsize (quota/usage summary, expendable)</p>
<p style="margin-bottom: 0in;">- cur  (default inbox for read email)</p>
<p style="margin-bottom: 0in;">- new  (default email for unread email)</p>
<p style="margin-bottom: 0in;">- Drafts ( sample folder )</p>
<p style="margin-bottom: 0in;">- cur (read email)</p>
<p style="margin-bottom: 0in;">- new (unread email)</p>
<p style="margin-bottom: 0in;">- /home/username/etc</p>
<p style="margin-bottom: 0in;">- /domain.com (domain)</p>
<p style="margin-bottom: 0in;">- passwd (contains email account list and UIDs, similar to /etc/passwd)</p>
<p style="margin-bottom: 0in;">- shadow (contains email passwords, similar to /etc/shadow)</p>
<p style="margin-bottom: 0in;">- quota (contains email account quota info)</p>
</div>
<p><map name='google_ad_map_255_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/255?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_255_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=255&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Funderstanding-courier-imap-and-maildir%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=255&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/quota-errors-in-exims-panic-log/' rel='bookmark' title='Quota Errors in Exim&#8217;s Panic Log'>Quota Errors in Exim&#8217;s Panic Log</a></li>
<li><a href='http://www.thecpaneladmin.com/fatal-write-failure-valiases/' rel='bookmark' title='Fatal! Write failure for /etc/valiases/..'>Fatal! Write failure for /etc/valiases/..</a></li>
<li><a href='http://www.thecpaneladmin.com/cpanel-backup-system/' rel='bookmark' title='The cPanel Backup System'>The cPanel Backup System</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/understanding-courier-imap-and-maildir/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

