<?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>Linux Mail Server Setup and Howto Guide &#187; Dovecot</title>
	<atom:link href="http://www.linuxmail.info/category/dovecot/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxmail.info</link>
	<description>Rapidly deploy Linux based mail solutions today</description>
	<lastBuildDate>Tue, 01 Nov 2011 00:43:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Dovecot POP3/IMAP Server Setup Howto for Ubuntu 10.04</title>
		<link>http://www.linuxmail.info/dovecot-pop3-imap-server-setup-howto-ubuntu-10-04/</link>
		<comments>http://www.linuxmail.info/dovecot-pop3-imap-server-setup-howto-ubuntu-10-04/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 13:27:01 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[Ubuntu 10.04]]></category>

		<guid isPermaLink="false">http://www.linuxmail.info/?p=426</guid>
		<description><![CDATA[How to install Dovecot POP3/IMAP server in Ubuntu 10.04]]></description>
			<content:encoded><![CDATA[<p>Installing and setting up Dovecot in Ubuntu 10.04 is easy. All we have to do is set the <a href="/mbox-maildir-mail-storage-formats/">mailbox format to maildir</a> and we are good to go.</p>
<span id="more-426"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<h2>Configure Dovecot</h2>
<div class="clearfix steps"><a href="/images/ubuntu-10-04/edit-dovecot-conf.png"><img class="preview" alt="Edit dovecot.conf" src="/images/ubuntu-10-04/t-edit-dovecot-conf.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><div class="m">1. Edit the file <em>/etc/dovecot/dovecot.conf</em> using the command
<pre class="steps">
sudo vi /etc/dovecot/dovecot.conf
</pre>
and update the lines below
<pre class="steps">
mail_location = maildir:~/Maildir
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
</pre>
</div></div>
<div class="clearfix steps"><a href="/images/ubuntu-10-04/service-dovecot-restart.png"><img class="preview" alt="Service Configuration" src="/images/ubuntu-10-04/t-service-dovecot-restart.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Restart dovecot using the command
<pre class="steps">
sudo service dovecot restart
</pre>
</div>
<h2 id="test-dovecot">Test Dovecot</h2>
<p>Here&#8217;s a sample dovecot session. Replace <strong>johndoe</strong> and <strong>password</strong> with any valid user name and password.</p>
<div class="clearfix">
<pre class="steps">
johndoe@mail:~$ <span class="h">telnet localhost pop3</span>
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK dovecot ready.
<span class="h">user johndoe</span>
+OK
<span class="h">pass password</span>
+OK Logged in.
<span class="h">list</span>
+OK 1 messages:
1 622
.
<span class="h">retr 1</span>
+OK 622 octets
Return-Path: &lt;johndoe@mail.acme.local&gt;
X-Original-To: johndoe
Delivered-To: johndoe@mail.acme.local
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
        by mail.acme.local (Postfix) with SMTP id 9729067C17
        for &lt;johndoe&gt;; Thu, 22 Feb 2007 09:06:37 -0500 (EST)
Message-Id: &lt;20070222140640.9729067C17@mail.acme.local&gt;
Date: Thu, 22 Feb 2007 09:06:37 -0500 (EST)
From: johndoe@mail.acme.local
To: undisclosed-recipients:;
X-IMAPbase: 1172153557 1
Status: O
X-UID: 1
Content-Length: 5
X-Keywords:


test
.
<span class="h">quit</span>
+OK Logging out.
Connection closed by foreign host.
johndoe@mail:~$
</pre>
</div>
<p><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />If you encounter any problems, check the log file at <em>/var/log/mail.log.</em></p>
<div style="clear: both">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/dovecot-pop3-imap-server-setup-howto-ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix SMTP Authentication and Dovecot SASL for RHEL/CentOS 6</title>
		<link>http://www.linuxmail.info/postfix-smtp-auth-dovecot-sasl-centos-6/</link>
		<comments>http://www.linuxmail.info/postfix-smtp-auth-dovecot-sasl-centos-6/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 12:28:15 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[CentOS 6]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Red Hat Enterprise Linux 6]]></category>
		<category><![CDATA[SASL]]></category>

		<guid isPermaLink="false">http://www.linuxmail.info/?p=406</guid>
		<description><![CDATA[How to enable Postfix SMTP Authentication using Dovecot SASL in Red Hat Enterprise Linux 6 or CentOS 6]]></description>
			<content:encoded><![CDATA[<p><strong>SMTP Authentication (SMTP Auth)</strong> provides an access control mechanism that can be used to allow legitimate users to relay mail while denying relay service to unauthorized users, such as spammers.</p>
<span id="more-406"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<h2>Configure Postfix and Dovecot</h2>
<div class="clearfix steps"><a href="/images/centos-6/edit-dovecot-master-conf.png"><img class="preview" alt="Edit dovecot 10-master.conf" src="/images/centos-6/t-edit-dovecot-master-conf.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><div>1. Edit the file <em>/etc/dovecot/conf.d/10-master.conf</em> and make sure your <em>service auth</em> section has the lines below.</div>
<div class="m">
<pre class="steps">
service auth {	
  unix_listener /var/spool/postfix/private/auth {
	mode = 0666
	user = postfix
	group = postfix
  }	
}
</pre>
</div>
</div>
<div class="clearfix steps"><a href="/images/centos-6/edit-dovecot-auth-conf.png"><img class="preview" alt="Edit dovecot 10-auth.conf" src="/images/centos-6/t-edit-dovecot-auth-conf.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><div>2. Edit the file <em>/etc/dovecot/conf.d/10-auth.conf</em> and update the line below.</div>
<div class="m">
<pre class="steps">
auth_mechanisms = plain login
</pre>
</div>
</div>
<div class="clearfix steps"><a href="/images/centos-5/edit-main-cf-dovecot-sasl.png"><img class="preview" alt="Edit main.cf" src="/images/centos-5/t-edit-main-cf-dovecot-sasl.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. Edit <em>/etc/postfix/main.cf</em>, find the keys below and change its values as follows or add it at the bottom of the file if the key (the word before the = sign) cannot be found.
<pre class="steps">
mynetworks = 127.0.0.0/8
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions =  permit_mynetworks, 
    permit_sasl_authenticated, 
    reject_unauth_destination
broken_sasl_auth_clients = yes
</pre>
</div>
<div>The first line says trust only localhost, meaning only localhost can send email outside the network (relay). The last line is there to support old clients like Microsoft Outlook Express 4.0 and Microsoft Exchange 5.0 just in case someone is still using it.</div>
<div>&nbsp;</div>
<div>Lines starting with <tt>#</tt> are comments. Save the file after completing your changes.</div>
<div>&nbsp;</div>
<div class="clearfix steps"><a href="/images/centos-6/terminal-semodule-postfixdovecotsasl.png"><img class="preview" alt="Install postfixdovecotsasl.te" src="/images/centos-6/t-terminal-semodule-postfixdovecotsasl.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>4. Configure SELinux using the commands below. Here&#8217;s the content of <a href="/files/rhel6/postfixdovecotsasl.te">postfixdovecotsasl.te</a></div>
<div class="clearfix steps">
<pre class="steps">
wget linuxmail.info/files/rhel6/postfixdovecotsasl.te
checkmodule -M -m -o postfixdovecotsasl.mod postfixdovecotsasl.te
semodule_package -o postfixdovecotsasl.pp -m postfixdovecotsasl.mod
semodule -i postfixdovecotsasl.pp
</pre>
</div>
<div class="clearfix steps"><a href="/images/centos-6/service-config-2.png"><img class="preview" alt="Service Configuration" src="/images/centos-6/t-service-config-2.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>5. Restart the Dovecot and Postfix service. But if you installed MailScanner, restart MailScanner instead of Postfix. <a href="/how-to-start-stop-services-centos-6/">Learn how to restart services here.</a></div>
<h2 id="test-postfix">Test Postfix</h2>
<div class="clearfix steps"><a href="/images/centos-5/telnet-smtp-sasl.png"><img class="preview" alt="Terminal" src="/images/centos-5/t-telnet-smtp-sasl.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>In a <strong>Terminal</strong> window, type in the highlighted commands below.</div>
<p>Sample postfix session</p>
<pre class="steps">
[root@mail ~]# <span class="h">telnet mail smtp</span>
</pre>
<p><img class="icon32x32 left" alt="Important" src="/images/emblem-important.png" />Replace <strong>mail</strong> with the name of your server. We should not use localhost since localhost is a trusted client ip address. And make sure the domain name you specified does not resolve to 127.0.0.1 which is the IP address of localhost.</p>
<pre class="steps">
Trying 192.168.0.1...
Connected to mail.acme.local (192.168.0.1).
Escape character is '^]'.
220 mail.acme.local ESMTP Postfix
<span class="h">ehlo localhost</span>
250-mail.acme.local
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
</pre>
<p>Note the new <tt>250-AUTH</tt> lines. See the old <a href="/postfix-smtp-server-howto-centos-6/#test-postfix">SMTP Telnet Test</a>.</p>
<pre class="steps">
<span class="h">mail from:&lt;johndoe&gt;</span>
250 2.1.0 Ok
<span class="h">rcpt to:&lt;test@example.com&gt;</span>
554 5.7.1 &lt;test@example.com&gt;: Relay access denied
</pre>
<p>It works, now to check if we can send it after authenticating.</p>
<pre class="steps">
<span class="h">auth plain AGpvaG5kb2UAcGFzc3dvcmQ=</span>
235 2.0.0 Authentication successful
<span class="h">rcpt to:&lt;test@example.com&gt;</span>
250 2.1.5 Ok
<span class="h">quit</span>
221 2.0.0 Bye
Connection closed by foreign host.
[root@mail ~]#
</pre>
<p><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />You can send to email addresses belonging to your domain without authentication. This is normal as it enables you to receive mail from the outside.</p>
<p>The gibberish text after <strong>AUTH PLAIN</strong> is the base64 encoded value of the user name <em>johndoe</em> and password <em>password</em>. You can generate your own base64 text using the form below.</p>
<form name="base64Form" action="">
<label for="username" style="display: block; width: 9em; float: left">User Name:</label><input type="text" name="username" id="username" style="width: 25em" /><br />
<label for="password" style="display: block; width: 9em; float: left">Password:</label><input type="password" name="password" id="password" style="width: 25em" /><br />
<br />
<input type="button" value="Encode" style="margin-left: 18em" onclick="document.base64Form.result.value=base64('\0' + document.base64Form.username.value + '\0' + document.base64Form.password.value);" /><br />
<br />
<label for="result" style="display: block; width: 9em; float: left">Result:</label><input type="text" name="result" id="result" readonly="readonly" style="width: 25em" />
<br /><br />
</form>
<p><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />If you encounter any problems, check the log file at <em>/var/log/maillog.</em></p>
<div>&nbsp;</div>
<div class="left">&laquo;&laquo; Previous: <a href="/install-setup-dovecot-centos-6/">How to Setup Dovecot</a></div><div class="right">Next: <a href="/squirrelmail-webmail-setup-howto-centos-6/">How to Install SquirrelMail</a> &raquo;&raquo;</div>
<div class="clear">&nbsp;</div>
<script type="text/javascript">function base64(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;do{chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}else if(isNaN(chr3)){enc4=64;}output=output+keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);}while(i< input.length);return output;}</script>]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/postfix-smtp-auth-dovecot-sasl-centos-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dovecot POP3/IMAP Server Setup Howto for RHEL/CentOS 6</title>
		<link>http://www.linuxmail.info/install-setup-dovecot-centos-6/</link>
		<comments>http://www.linuxmail.info/install-setup-dovecot-centos-6/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 16:04:45 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[CentOS 6]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[Red Hat Enterprise Linux 6]]></category>

		<guid isPermaLink="false">http://www.linuxmail.info/?p=402</guid>
		<description><![CDATA[How to install Dovecot POP3/IMAP server in Red Hat Enterprise Linux 6 or CentOS 6]]></description>
			<content:encoded><![CDATA[<p>Installing and setting up Dovecot in Red Hat Enterprise Linux 6 or CentOS 6 is easy. All we have to do is to enable the services we would like to provide and we are good to go.</p>
<span id="more-402"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<h2>Configure Dovecot</h2>
<div class="clearfix steps"><a href="/images/centos-6/edit-dovecot-conf.png"><img class="preview" alt="Edit dovecot.conf" src="/images/centos-6/t-edit-dovecot-conf.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><div class="m">1. The settings for Dovecot are spread out across several files. Edit the files listed below and update its lines accordingly.
<div>&nbsp;</div>
<em>/etc/dovecot/dovecot.conf</em>
<pre class="steps">
protocols = pop3 imap lmtp
</pre>
<em>/etc/dovecot/conf.d/10-mail.conf</em>
<pre class="steps">
mail_location = maildir:~/Maildir
</pre>
<em>/etc/dovecot/conf.d/20-pop3.conf</em>
<pre class="steps">
pop3_uidl_format = %08Xu%08Xv
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
</pre>
</div></div>
<div class="clearfix steps"><a href="/images/centos-6/service-config.png"><img class="preview" alt="Service Configuration" src="/images/centos-6/t-service-config.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Start the dovecot service. <a href="/how-to-start-stop-services-centos-6/">Learn how to start and stop services here.</a></div>
<h2 id="test-dovecot">Test Dovecot</h2>
<div class="clearfix steps"><a href="/images/centos-6/terminal-shortcut.png"><img class="preview" alt="Terminal" src="/images/centos-6/t-terminal-shortcut.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Click <em>Applications</em>, select <em>System Tools</em>, and click <em>Terminal</em>. This will launch the <strong>Terminal</strong> window.</div>
<div class="clearfix steps"><a href="/images/centos-6/terminal.png"><img class="preview" alt="Terminal" src="/images/centos-6/t-terminal.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. In the <strong>Terminal</strong> window, type in the highlighted commands below.</div>
<p>Sample dovecot session. Replace <strong>johndoe</strong> and <strong>password</strong> with any valid user name and password.</p>
<div class="clearfix">
<pre class="steps">
[root@mail ~]# <span class="h">telnet localhost pop3</span>
+OK dovecot ready.
<span class="h">user johndoe</span>
+OK
<span class="h">pass password</span>
+OK Logged in.
<span class="h">list</span>
+OK 1 messages:
1 622
.
<span class="h">retr 1</span>
+OK 622 octets
Return-Path: &lt;johndoe@mail.acme.local&gt;
X-Original-To: johndoe
Delivered-To: johndoe@mail.acme.local
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
        by mail.acme.local (Postfix) with SMTP id 9729067C17
        for &lt;johndoe&gt;; Thu, 22 Feb 2007 09:06:37 -0500 (EST)
Message-Id: &lt;20070222140640.9729067C17@mail.acme.local&gt;
Date: Thu, 22 Feb 2007 09:06:37 -0500 (EST)
From: johndoe@mail.acme.local
To: undisclosed-recipients:;
X-IMAPbase: 1172153557 1
Status: O
X-UID: 1
Content-Length: 5
X-Keywords:


test
.
<span class="h">quit</span>
+OK Logging out.
Connection closed by foreign host.
[root@mail ~]#
</pre>
</div>
<p><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />If you encounter any problems, check the log file at <em>/var/log/maillog.</em></p>
<div>&nbsp;</div>
<div class="left">&laquo;&laquo; Previous: <a href="/postfix-smtp-server-howto-centos-6/">How to Setup Postfix SMTP Server </a></div><div class="right">Next: <a href="/postfix-smtp-auth-dovecot-sasl-centos-6/">How to Setup SMTP Auth</a> &raquo;&raquo;</div>
<div style="clear: both">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/install-setup-dovecot-centos-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Static DB Virtual Users in Postfix and Dovecot</title>
		<link>http://www.linuxmail.info/postfix-dovecot-static-db/</link>
		<comments>http://www.linuxmail.info/postfix-dovecot-static-db/#comments</comments>
		<pubDate>Sat, 29 May 2010 05:44:44 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://www.linuxmail.info/?p=385</guid>
		<description><![CDATA[This article describes how to use a text file or static db file as the source for user accounts in Postfix and Dovecot.]]></description>
			<content:encoded><![CDATA[<p>This article describes how to use a text file or static db file as the source for user accounts in Postfix and Dovecot. This is suitable for very simple mail account requirements. For larger implementations, check out the <a href="/multiple-domains-postfix-admin-centos-5/">MySQL virtual accounts</a> or <a href="/postfix-dovecot-ldap-centos-5/">Active Directory/LDAP virtual accounts</a>.</p>
<span id="more-385"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<h2>Create the Virtual Mail User Account</h2>
<div class="clearfix steps"><a href="/images/centos-5/create-user-vmail.png"><img class="preview" alt="Create user vmail" src="/images/centos-5/t-create-user-vmail.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Create a new user, we will call it <em>vmail.</em> Change the <em>Login Shell</em> to <em>/sbin/nologin</em>, this user account should not be used for logging in. <a href="/how-to-add-remove-user-accounts-centos-5/">Learn how to use the User Manager application here.</a></div>
<div class="clearfix steps"><a href="/images/centos-5/user-manager-vmail.png"><img class="preview" alt="User Manager" src="/images/centos-5/t-user-manager-vmail.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Take note of the <em>User ID</em> and <em>Home Directory</em> of vmail.</div>
<div class="clearfix steps"><a href="/images/centos-5/user-manager-vmail-groups.png"><img class="preview" alt="User Manager" src="/images/centos-5/t-user-manager-vmail-groups.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. Click the <em>Groups</em> tab and now note down the <em>Group ID</em>  of vmail. We&#8217;ll be needing all of them later.</div>
<h2>Configure Postfix for Virtual User Accounts</h2>
<div class="clearfix steps"><a href="/images/centos-5/edit-main-cf-virtual-2.png"><img class="preview" alt="Edit main.cf" src="/images/centos-5/t-edit-main-cf-virtual-2.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Edit the postfix configuration file <em>/etc/postfix/main.cf</em> and edit the line below</div>
<pre class="steps">
mydestination = $myhostname, localhost.$mydomain, localhost
</pre>
<p>and add the lines below</p>
<pre class="steps">
virtual_mailbox_domains = $mydomain
virtual_mailbox_base = /home/vmail/
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_uid_maps = static:501
virtual_gid_maps = static:501
</pre>
<p><em>virtual_mailbox_base</em>, <em>virtual_uid_maps</em> and <em>virtual_gid_maps</em> should contain the home directory, user id and group id of vmail respectively.</p>
<div class="clearfix steps"><a href="/images/centos-5/edit-vmailbox.png"><img class="preview" alt="Edit main.cf" src="/images/centos-5/t-edit-vmailbox.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Create the file <em>/etc/postfix/vmailbox</em> containing the mapping from an email address to a mailbox path relative to virtual_mailbox_base. See the example below.
<div class="m">
<pre class="steps">
johndoe@acme.local johndoe/Maildir/
janedoe@acme.local janedoe/Maildir/
</pre>
</div>
</div>
<div class="clearfix steps"><a href="/images/centos-5/postmap-vmailbox.png"><img class="preview" alt="postmap vmailbox" src="/images/centos-5/t-postmap-vmailbox.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><div class="m">3. Type in the command below to generate the static db that will be used for the lookup.
<pre class="steps">
postmap /etc/postfix/vmailbox
</pre>
</div></div>
<div class="clearfix steps"><a href="/images/centos-5/service-config-2.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-service-config-2.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>4. Restart the Postfix or MailScanner service if you have installed MailScanner. <a href="/how-to-start-stop-services-centos-5/">Learn how to start and stop services here.</a></div>
<div class="clearfix steps"><a href="/images/centos-5/terminal.png"><img class="preview" alt="Terminal" src="/images/centos-5/t-terminal.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>5. Try sending an email. See <a href="/postfix-smtp-server-howto-centos-5/#test-postfix">Test Postfix using Telnet</a>. New mails should now be stored under the path specified in virtual_mailbox_base.</div>
<h2>Configure Dovecot Virtual User Accounts</h2>
<div class="clearfix steps"><a href="/images/centos-5/edit-dovecot-conf-virtual.png"><img class="preview" alt="Edit dovecot.conf" src="/images/centos-5/t-edit-dovecot-conf-virtual.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Edit the file <em>/etc/dovecot.conf</em> and change the value of the following keys below
<div class="m">
<pre class="steps">
passdb static {
  args = /etc/dovecot-passdb
}

userdb static {
  args = uid=501 gid=501 home=/home/vmail/%u
}
</pre>
</div>
</div>
<p><em>uid</em>, <em>gid</em> and <em>home</em> should contain the user id, group id and home directory respectively of the vmail user account.</p>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />Make sure comment out all the other <em>passdb</em> and <em>userdb</em> sections to avoid any conflicts.</div>
<div class="clearfix steps"><a href="/images/centos-5/edit-dovecot-passdb.png"><img class="preview" alt="Edit dovecot-passdb" src="/images/centos-5/t-edit-dovecot-passdb.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Create the file <em>/etc/dovecot-passdb</em> containing the password of a user name. See the example below.
<div class="m">
<pre class="steps">
johndoe:{PLAIN}secret
janedoe:{HMAC-MD5}dd59f669267e9bb13d42a1ba57c972c5b13a4b2ae457c9ada803dc7d8bae4ab
</pre>
</div>
</div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />You can generate a hash password using the <tt>dovecotpw</tt> command.</div>
<div class="clearfix steps"><a href="/images/centos-5/service-config-3.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-service-config-3.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. Restart the dovecot service. <a href="/how-to-start-stop-services-centos-5/">Learn how to start and stop services here.</a></div>
<div class="clearfix steps"><a href="/images/centos-5/terminal.png"><img class="preview" alt="Terminal" src="/images/centos-5/t-terminal.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>4. <a href="/install-setup-dovecot-centos-5/#test-dovecot">Test Dovecot using Telnet</a>. You should be able to read the recently sent mail which was stored in a new location.</div>]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/postfix-dovecot-static-db/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup Postfix Mailbox</title>
		<link>http://www.linuxmail.info/backup-postfix-mailbox/</link>
		<comments>http://www.linuxmail.info/backup-postfix-mailbox/#comments</comments>
		<pubDate>Sun, 09 May 2010 12:36:48 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://www.linuxmail.info/?p=381</guid>
		<description><![CDATA[This article describes how to backup and restore your Postfix mailboxes using the tar command.]]></description>
			<content:encoded><![CDATA[<p>Backing up your mailboxes is a simple as copying your mailbox folder. This article describes how to backup and restore your Postfix mailboxes using the tar command.</p>
<span id="more-381"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<div class="clearfix steps"><a href="/images/centos-5/postfix-backup-mailbox.png"><img class="preview" alt="Backup mailbox" src="/images/centos-5/t-postfix-backup-mailbox.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><div class="m">To backup the mailbox, type the command below in a terminal window.
<pre class="steps">
tar cvzf mailbox-`date +%F_%H%M`.tar.gz /home/vmail
</pre>
</div>
<p>Replace <strong>/home/vmail</strong> with the location of your own mailbox.</p>
</div>
<div class="clearfix steps"><a href="/images/centos-5/postfix-restore-mailbox.png"><img class="preview" alt="Restore mailbox" src="/images/centos-5/t-postfix-restore-mailbox.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><div class="m">To restore the mailbox, type the command below in a terminal window.
<pre class="steps">
tar xvzf mailbox.tar.gz -C /
</pre>
</div>
<p>Replace <strong>mailbox.tar.gz</strong> with the name of your backup file.</p>
</div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />Ideally, the Postfix and Dovecot configurations should be documented, or better yet, maintained using a change configuration process. But you can also use the procedure above to backup the <em>/etc</em> directory although it is not recommended since you may restore your configuration on an updated OS.</div>]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/backup-postfix-mailbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix and Dovecot SSL/TLS</title>
		<link>http://www.linuxmail.info/postfix-dovecot-ssl/</link>
		<comments>http://www.linuxmail.info/postfix-dovecot-ssl/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 17:01:32 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[SSL/TLS]]></category>

		<guid isPermaLink="false">http://www.linuxmail.info/?p=378</guid>
		<description><![CDATA[This article describes how to configure Postfix and Dovecot to use SSL/TLS to encrypt communication.]]></description>
			<content:encoded><![CDATA[<p>This article describes how to configure Postfix and Dovecot to use SSL/TLS to encrypt communication. Before you begin, <a href="/generate-ssl-certificate/">generate an SSL certificate</a>.</p>
<span id="more-378"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<h2>Postfix</h2>
<div class="clearfix steps"><a href="/images/centos-5/edit-main-cf-tls.png"><img class="preview" alt="Edit main.cf" src="/images/centos-5/t-edit-main-cf-tls.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Edit the file <em>/etc/postfix/main.cf</em> and add the lines below.</div>
<pre class="steps">
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_cert_file = /etc/pki/tls/certs/mail.acme.local.cert
smtpd_tls_key_file = /etc/pki/tls/private/mail.acme.local.key
tls_random_source = dev:/dev/urandom
</pre>
<p>Make sure <strong>smtpd_tls_cert_file</strong> and <strong>smtpd_tls_key_file</strong> refers to your own certificate and key file respectively.</p>
<div class="clearfix steps"><a href="/images/centos-5/service-config-2.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-service-config-2.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Restart the Postfix or MailScanner service if you have installed it. <a href="/how-to-start-stop-services-centos-5/">Learn how to start and stop services here.</a></div>
<div class="clearfix steps"><a href="/images/centos-5/terminal.png"><img class="preview" alt="Terminal" src="/images/centos-5/t-terminal.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. <a href="/postfix-smtp-server-howto-centos-5/#test-postfix">Test Postfix using Telnet</a> and check if <tt>250-STARTTLS</tt> is present after the <tt>ehlo host</tt> command.</div>
<h2>Dovecot</h2>
<div class="clearfix steps"><a href="/images/centos-5/edit-dovecot-conf-tls.png"><img class="preview" alt="Edit dovecot.conf" src="/images/centos-5/t-edit-dovecot-conf-tls.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Edit the file <em>/etc/dovecot.conf</em> and add the lines below.</div>
<pre class="steps">
ssl_cert_file = /etc/pki/tls/certs/mail.acme.local.cert
ssl_key_file = /etc/pki/tls/private/mail.acme.local.key
</pre>
<p>Make sure <strong>ssl_cert_file</strong> and <strong>ssl_key_file</strong> refers to your own certificate and key file respectively.</p>
<div class="clearfix steps"><a href="/images/centos-5/service-config-3.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-service-config-3.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Restart the dovecot service. <a href="/how-to-start-stop-services-centos-5/">Learn how to start and stop services here.</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/postfix-dovecot-ssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix SMTP Authentication and Dovecot SASL</title>
		<link>http://www.linuxmail.info/postfix-smtp-auth-dovecot-sasl/</link>
		<comments>http://www.linuxmail.info/postfix-smtp-auth-dovecot-sasl/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 08:42:02 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[CentOS 5]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Red Hat Enterprise Linux 5]]></category>
		<category><![CDATA[SASL]]></category>
		<category><![CDATA[Ubuntu 10.04]]></category>

		<guid isPermaLink="false">http://www.linux-mail.info/postfix-smtp-auth-dovecot-sasl/</guid>
		<description><![CDATA[How to enable Postfix SMTP Authentication using Dovecot SASL]]></description>
			<content:encoded><![CDATA[<p><strong>SMTP Authentication (SMTP Auth)</strong> provides an access control mechanism that can be used to allow legitimate users to relay mail while denying relay service to unauthorized users, such as spammers.</p>
<span id="more-64"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<p>Thanks to the new SASL support in Dovecot 1.0 and the new Dovecot SASL support in Postfix 2.3, setting up SMTP authentication is now easier. Instead of setting up two separate authentication for Postfix and Dovecot, we can now just setup the authentication in Dovecot and just let Postfix talk to Dovecot.</p>
<h2>Configure Postfix and Dovecot</h2>
<div class="clearfix steps"><a href="/images/centos-5/edit-dovecot-conf-sasl.png"><img class="preview" alt="Edit dovecot.conf" src="/images/centos-5/t-edit-dovecot-conf-sasl.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><div>1. Edit the file <em>/etc/dovecot.conf</em> and make sure your <em>auth default</em> section has the lines below.</div>
<div class="m">
<pre class="steps">
auth default {	
  socket listen {
    client {
	  path = /var/spool/postfix/private/auth
	  mode = 0660
	  user = postfix
	  group = postfix
    }
  }	
  mechanisms = plain login
}
</pre>
<p><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />If you are using Ubuntu, edit <em>/etc/dovecot/dovecot.conf</em>.</p>
</div>
</div>
<div class="clearfix steps"><a href="/images/centos-5/edit-main-cf-dovecot-sasl.png"><img class="preview" alt="Edit main.cf" src="/images/centos-5/t-edit-main-cf-dovecot-sasl.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Edit <em>/etc/postfix/main.cf</em>, find the keys below and change its values as follows or add it at the bottom of the file if the key (the word before the = sign) cannot be found.</div>
<pre class="steps">
mynetworks = 127.0.0.0/8
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions =  permit_mynetworks, 
    permit_sasl_authenticated, reject_unauth_destination
broken_sasl_auth_clients = yes
</pre>
<div>The first line says trust only localhost, meaning only localhost can send email outside the network (relay). The last line is there to support old clients like Microsoft Outlook Express 4.0 and Microsoft Exchange 5.0 just in case someone is still using it.</div>
<div>&nbsp;</div>
<div>Lines starting with <tt>#</tt> are comments. Save the file after completing your changes.</div>
<div>&nbsp;</div>
<div class="clearfix steps"><a href="/images/centos-5/service-config-2.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-service-config-2.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. Restart the Dovecot and Postfix service. But if you installed MailScanner, restart MailScanner instead of Postfix.</div>
<h2 id="test-postfix">Test Postfix</h2>
<div class="clearfix steps"><a href="/images/centos-5/telnet-smtp-sasl.png"><img class="preview" alt="Terminal" src="/images/centos-5/t-telnet-smtp-sasl.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>In a <strong>Terminal</strong> window, type in the highlighted commands below.</div>
<p>Sample postfix session</p>
<pre class="steps">
[root@mail ~]# <span class="h">telnet mail smtp</span>
</pre>
<p><img class="icon32x32 left" alt="Important" src="/images/emblem-important.png" />Replace <strong>mail</strong> with the name of your server. We should not use localhost since localhost is a trusted client ip address. And make sure the domain name you specified does not resolve to 127.0.0.1 which is the IP address of localhost.</p>
<pre class="steps">
Trying 192.168.0.1...
Connected to mail.acme.local (192.168.0.1).
Escape character is '^]'.
220 mail.acme.local ESMTP Postfix
<span class="h">ehlo localhost</span>
250-mail.acme.local
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
</pre>
<p>Note the new <tt>250-AUTH</tt> lines. See the old <a href="/postfix-smtp-server-howto-centos-5/#test-postfix">SMTP Telnet Test</a>.</p>
<pre class="steps">
<span class="h">mail from:&lt;johndoe&gt;</span>
250 2.1.0 Ok
<span class="h">rcpt to:&lt;test@example.com&gt;</span>
554 5.7.1 &lt;test@example.com&gt;: Relay access denied
</pre>
<p>It works, now to check if we can send it after authenticating.</p>
<pre class="steps">
<span class="h">auth plain AGpvaG5kb2UAcGFzc3dvcmQ=</span>
235 2.0.0 Authentication successful
<span class="h">rcpt to:&lt;test@example.com&gt;</span>
250 2.1.5 Ok
<span class="h">quit</span>
221 2.0.0 Bye
Connection closed by foreign host.
[root@mail ~]#
</pre>
<p><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />You can send to email addresses belonging to your domain without authentication. This is normal as it enables you to receive mail from the outside.</p>
<p>The gibberish text after <strong>AUTH PLAIN</strong> is the base64 encoded value of the user name <em>johndoe</em> and password <em>password</em>. You can generate your own base64 text using the form below.</p>
<form name="base64Form" action="">
<label for="username" style="display: block; width: 9em; float: left">User Name:</label><input type="text" name="username" id="username" style="width: 25em" /><br />
<label for="password" style="display: block; width: 9em; float: left">Password:</label><input type="password" name="password" id="password" style="width: 25em" /><br />
<br />
<input type="button" value="Encode" style="margin-left: 18em" onclick="document.base64Form.result.value=base64('\0' + document.base64Form.username.value + '\0' + document.base64Form.password.value);" /><br />
<br />
<label for="result" style="display: block; width: 9em; float: left">Result:</label><input type="text" name="result" id="result" readonly="readonly" style="width: 25em" />
<br /><br />
</form>
<p><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />If you encounter any problems, check the log file at <em>/var/log/maillog</em> (<em>mail.log</em> in Ubuntu).</p>
<div>&nbsp;</div>
<div class="left">&laquo;&laquo; Previous: <a href="/install-setup-dovecot-centos-5/">How to Setup Dovecot</a></div><div class="right">Next: <a href="/squirrelmail-webmail-setup-howto-in-centos-5/">How to Install SquirrelMail</a> &raquo;&raquo;</div>
<div class="clear">&nbsp;</div>
<script type="text/javascript">function base64(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;do{chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}else if(isNaN(chr3)){enc4=64;}output=output+keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);}while(i< input.length);return output;}</script>]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/postfix-smtp-auth-dovecot-sasl/feed/</wfw:commentRss>
		<slash:comments>123</slash:comments>
		</item>
		<item>
		<title>Active Directory and Dovecot PAM Authentication</title>
		<link>http://www.linuxmail.info/active-directory-dovecot-pam-authentication/</link>
		<comments>http://www.linuxmail.info/active-directory-dovecot-pam-authentication/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 05:34:17 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[CentOS 5]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[Kerberos]]></category>
		<category><![CDATA[Red Hat Enterprise Linux 5]]></category>

		<guid isPermaLink="false">http://www.linux-mail.info/active-directory-dovecot-pam-authentication/</guid>
		<description><![CDATA[How to enable Dovecot to authenticate to an Active Directory server using the Kerberos network authentication protocol and Linux PAM.]]></description>
			<content:encoded><![CDATA[<p>LDAP authentication is available in Dovecot starting version 1.0. Since Active Directory is an implementation of LDAP directory services, we can use the LDAP authentication to <a href="/postfix-dovecot-ldap-centos-5/#dovecot-ldap">authenticate Dovecot against an Active Directory server</a>. But for users of Dovecot prior to 1.0 or those having problems with LDAP authentication, we can instead use the Kerberos authentication mechanism in Windows via the Linux PAM.</p>
<span id="more-62"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<h2>Setup and Configure Kerberos</h2>
<p>The steps below describes how to configure Kerberos using the GUI tool. You can apply the changes manually by editing the file <em>/etc/krb5.conf</em>.</p>
<p><img class="icon32x32 left" alt="Important" src="/images/emblem-important.png" />The Kerberos network authentication protocol requires the clocks of the involved machines to be synchronized or at least the difference is less than 5 minutes.</p>
<div class="clearfix steps"><a href="/images/centos-5/authentication.png"><img class="preview" alt="Authentication" src="/images/centos-5/t-authentication.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Click <em>System</em>, select <em>Administration</em> and click <em>Authentication</em>. This will launch the <strong>Authentication Configuration</strong> window.</div>
<div class="clearfix steps"><a href="/images/centos-5/auth-config-a.png"><img class="preview" alt="Authentication" src="/images/centos-5/t-auth-config-a.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Click the <em>Authentication</em> tab and check the <em>Enable Kerberos Support</em>. Next, click the <em>Configure Kerberos</em> button.</div>
<div class="clearfix steps"><a href="/images/centos-5/kerberos-settings.png"><img class="preview" alt="Kerberos Settings" src="/images/centos-5/t-kerberos-settings.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. In the <strong>Kerberos Settings</strong> window, fill in the <em>Realm</em>, clear out <em>KDC</em> and <em>Admin Servers</em> and check the <em>Use DNS to locate KDCs for realms</em>. Realm is usually your domain name capitalized, <em>capitalization is important.</em> KDC is your Active Directory server. Click <em>Ok</em> when you&#8217;re done.</div>
<p><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />To make sure that your KDC can be automatically located, type in the command <tt>host -t any _kerberos._tcp.acme.local</tt> in a terminal window. Replace <em>acme.local</em> with your own realm. If it replies &#8220;_kerberos._tcp.acme.local has SRV record &#8230;&#8221; then it works. This is how the Windows workstation is able to find the domain controller during domain logon. If it does not work, something is wrong with your DNS setting. You could either fix your DNS settings or manually fill in the KDC field above. You can specify more than one KDC by separating each server with a comma or space.</p>
<div class="clearfix steps"><a href="/images/centos-5/auth-config-b.png"><img class="preview" alt="Authentication" src="/images/centos-5/t-auth-config-b.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>4. Uncheck the <em>Enable Kerberos Support</em> and click <em>Ok</em>. We don&#8217;t actually want to use Kerberos authentication in Linux, we just want the tool to setup Kerberos for us.</div>
<div class="clearfix steps"><a href="/images/centos-5/terminal-kinit.png"><img class="preview" alt="Terminal" src="/images/centos-5/t-terminal-kinit.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>5. Test Kerberos by typing in <tt>kinit username</tt> in a terminal window. If you need help in making sense of the kinit error messages, check out <a href="/troubleshooting-active-directory-centos-5/#test-kerberos">Test the Kerberos Authentication</a>.</div>
<h2>Configuring Dovecot PAM</h2>
<div class="clearfix steps"><a href="/images/centos-5/edit-pam-dovecot.png"><img class="preview" alt="Edit pam dovecot" src="/images/centos-5/t-edit-pam-dovecot.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Edit the file <em>/etc/pam.d/dovecot</em> and replace the content with the lines below.
</div>
<pre class="steps">
auth        sufficient   pam_krb5.so no_user_check validate
account     sufficient   pam_permit.so
</pre>
<div class="clearfix steps"><a href="/images/centos-5/edit-dovecot-conf-virtual.png"><img class="preview" alt="Edit dovecot.conf" src="/images/centos-5/t-edit-dovecot-conf-virtual.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Edit the file <em>/etc/dovecot.conf</em> and change the value of the following keys below</div>
<pre class="steps">
passdb pam {
}

userdb static {
  args = uid=501 gid=501 home=/home/vmail/%Lu
}
</pre>
<p><em>uid</em>, <em>gid</em> and <em>home</em> should contain the user id, group id and home directory respectively of the vmail user account.</p>
<div class="clearfix steps"><a href="/images/centos-5/service-config-3.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-service-config-3.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. Restart the dovecot service. <a href="/how-to-start-stop-services-centos-5/">Learn how to start and stop services here.</a></div>
<div class="clearfix steps"><a href="/images/centos-5/terminal.png"><img class="preview" alt="Terminal" src="/images/centos-5/t-terminal.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>4. You should now be able to login using the user names found in your Active Directory server. See <a href="/install-setup-dovecot-centos-5/#test-dovecot">Test Dovecot using Telnet</a> and try using Active Directory user names instead of the system user names.</div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />If you encounter any problems, check the log file at <em>/var/log/maillog.</em></div>]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/active-directory-dovecot-pam-authentication/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Active Directory/LDAP Virtual Users for RHEL/CentOS 5/6</title>
		<link>http://www.linuxmail.info/postfix-dovecot-ldap-centos-5/</link>
		<comments>http://www.linuxmail.info/postfix-dovecot-ldap-centos-5/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 09:48:19 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[CentOS 5]]></category>
		<category><![CDATA[CentOS 6]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Red Hat Enterprise Linux 5]]></category>
		<category><![CDATA[Red Hat Enterprise Linux 6]]></category>

		<guid isPermaLink="false">http://www.linux-mail.info/postfix-dovecot-ldap-centos-5/</guid>
		<description><![CDATA[This page will show you how to enable Postfix to lookup email addresses and enable Dovecot to authenticate to an Active Directory or LDAP server.]]></description>
			<content:encoded><![CDATA[<p>This guide will show you how to integrate Active Directory/LDAP into Postfix and Dovecot. In this page, you will learn how to enable Postfix to lookup email addresses in LDAP and how to enable Dovecot to authenticate to an LDAP server.</p>
<span id="more-48"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<div class="clearfix steps"><a href="/images/centos-5/jxplorer-ad.png"><img class="preview" alt="JXplorer Active Directory" src="/images/centos-5/t-jxplorer-ad.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>This is what a typical Active Directory layout looks like.</div>
<div class="clearfix steps"><a href="/images/centos-5/jxplorer-ldap.png"><img class="preview" alt="JXplorer LDAP" src="/images/centos-5/t-jxplorer-ldap.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>And here&#8217;s a sample OpenLDAP layout. See <a href="/openldap-setup-howto/">OpenLDAP Setup Howto</a> for a guide in setting up OpenLDAP. Or better yet, use the <a href="/389-directory-server-setup-howto-centos-5/">389 Directory Server</a>.</div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />I used <a href="http://www.jxplorer.org/">JXplorer</a> to browse the LDAP servers, you&#8217;ll need the <a href="http://www.java.com/getjava/">Java Runtime Environment</a> to use it.</div>
<p>We will be using the following attributes</p>
<ul class="spaced">
<li><em>samaccountname</em> or <em>uid</em> &#8211; User Name for Active Directory or OpenLDAP respectively.</li>
<li><em>mail</em> &#8211; Email Address. For Active Directory users, you need to fill-up the <strong>E-mail</strong> field of the User.</li>
<li><em>othermailbox</em> &#8211; For Active Directory only. We will use this field to store email aliases. Use <a href="/adsi-edit-ldap-attributes/">ADSI Edit</a> to update this field.</li>
</ul>
<h2>Create the Virtual Mail User Account</h2>
<p>Since the Active Directory/OpenLDAP user names are not part of the Linux system, we will have to create a user that will be the owner for all the files belonging to the LDAP user names. </p>
<div class="clearfix steps"><a href="/images/centos-5/create-user-vmail.png"><img class="preview" alt="Create user vmail" src="/images/centos-5/t-create-user-vmail.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Create a new user, we will call it <em>vmail.</em> Change the <em>Login Shell</em> to <em>/sbin/nologin</em>, this user account should not be used for logging in. <a href="/how-to-add-remove-user-accounts-centos-5/">Learn how to use the User Manager application here.</a></div>
<div class="clearfix steps"><a href="/images/centos-5/user-manager-vmail.png"><img class="preview" alt="User Manager" src="/images/centos-5/t-user-manager-vmail.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Take note of the <em>User ID</em> and <em>Home Directory</em> of vmail.</div>
<div class="clearfix steps"><a href="/images/centos-5/user-manager-vmail-groups.png"><img class="preview" alt="User Manager" src="/images/centos-5/t-user-manager-vmail-groups.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. Click the <em>Groups</em> tab and now note down the <em>Group ID</em>  of vmail. We&#8217;ll be needing all of them later.</div>
<h2>Postfix Active Directory/LDAP Integration</h2>
<div class="clearfix steps"><a href="/images/centos-5/edit-ldap-users-cf.png"><img class="preview" alt="Postfix service" src="/images/centos-5/t-edit-ldap-users-cf.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Create the file <em>/etc/postfix/ldap-users.cf</em> containing the lines below</div>
<pre class="steps">
server_host = <em>your ldap server</em>
search_base = <em>your search base</em>
version = 3
query_filter = (&#038;(objectclass=person)(mail=%s))
result_attribute = samaccountname
result_format = %s/Maildir/
</pre>
<p>If you are connecting to an Active Directory server and would like to have email alias capability, change the query filter to <tt>(&#038;(objectclass=person)(|(mail=%s)(othermailbox=%s)))</tt> to include the <em>othermailbox</em> field in the search.</p>
<p>Change <em>samaccountname</em> to <em>uid</em> if you will be connecting to an OpenLDAP server. If your server requires authentication, add the lines below</p>
<pre class="steps">
bind = yes
bind_dn = cn=mailuser,dc=acme,dc=local
bind_pw = password
</pre>
<p>Replace the value of <em>bind_dn</em> and <em>bind_pw</em> with a valid user account and password respectively. If you will be connecting to an Active Directory server, <em>bind_dn</em> can also be</p>
<pre class="steps">
bind_dn = acme\mailuser
</pre>
<p>or</p>
<pre class="steps">
bind_dn = mailuser@acme.local
</pre>
<div class="clearfix steps"><a href="/images/centos-5/postmap-query-user.png"><img class="preview" alt="Postmap query" src="/images/centos-5/t-postmap-query-user.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Test your postfix configuration file by typing in the command</div>
<pre class="steps">
postmap -q bugsbunny@acme.local ldap:/etc/postfix/ldap-users.cf
</pre>
<p>in a terminal window. Replace <em>bugsbunny@acme.local</em> with a valid email address from your server. It should return the path to a mailbox file.</p>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />If you are querying  a Windows 2003 Server and postmap does not seem to work, try <a href="/windows-2003-anonymous-ldap-operation/">enabling the Windows 2003 Active Directory anonymous ldap operations</a>.</div>
<div class="clearfix steps"><a href="/images/centos-5/edit-main-cf-virtual.png"><img class="preview" alt="Edit main.cf" src="/images/centos-5/t-edit-main-cf-virtual.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. Edit the postfix configuration file <em>/etc/postfix/main.cf</em> and edit the line below</div>
<pre class="steps">
mydestination = $myhostname, localhost.$mydomain, localhost
</pre>
<p>and add the lines below</p>
<pre class="steps">
virtual_mailbox_domains = $mydomain
virtual_mailbox_base = /home/vmail/
virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf
virtual_uid_maps = static:501
virtual_gid_maps = static:501
</pre>
<p><em>virtual_mailbox_base</em>, <em>virtual_uid_maps</em> and <em>virtual_gid_maps</em> should contain the home directory, user id and group id of vmail respectively.</p>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />Make sure <em>$mydomain</em> in <em>mydestination</em> has been removed, otherwise the lookup will not work and you will get a &#8220;User unknown in local recipient table&#8221; error.</div>
<div class="clearfix steps"><a href="/images/centos-5/service-config-2.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-service-config-2.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>4. Restart the Postfix or MailScanner service if you have installed it. <a href="/how-to-start-stop-services-centos-5/">Learn how to start and stop services here.</a></div>
<div class="clearfix steps"><a href="/images/centos-5/terminal.png"><img class="preview" alt="Terminal" src="/images/centos-5/t-terminal.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>5. You should now be able to send email to addresses found in your LDAP server. See <a href="/postfix-smtp-server-howto-centos-5/#test-postfix">Test Postfix using Telnet</a> and try using LDAP email addresses instead of the system user names.</div>
<h2 id="dovecot-ldap">Dovecot Active Directory/LDAP Integration</h2>
<div class="clearfix steps"><img class="icon32x32 left" alt="Important" src="/images/emblem-important.png" />If you will be connecting to an Active Directory server, use <a href="/active-directory-dovecot-pam-authentication/">Active Directory and Dovecot PAM Authentication</a> which uses Kerberos authentication instead. The Kerberos authentication method is more reliable since it doesn&#8217;t require a persistent connection and you can gain fail-over capabilities if you have multiple Active Directory servers.</div>
<div class="clearfix steps"><a href="/images/centos-5/edit-dovecot-ldap-conf.png"><img class="preview" alt="Edit dovecot-ldap.conf" src="/images/centos-5/t-edit-dovecot-ldap-conf.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><div class ="m">1. Create a file containing the lines below using the filename specified below.
<table>
<tr><th>RHEL/CentOS Version</th><th>Filename</th></tr>
<tr><td>5</td><td>/etc/dovecot-ldap.conf</td></tr>
<tr><td>6</td><td>/etc/dovecot/dovecot-ldap.conf</td></tr>
</table>
<pre class="steps">
hosts = <em>your ldap server</em>
base = <em>your search base</em>
ldap_version = 3
auth_bind = yes
</pre>
</div>
</div>
<p>Depending on the LDAP server and the layout you are going query, you have 3 ways to enable Dovecot to authenticate to your LDAP server.</p>
<p><strong>Option 1: Active Directory</strong><br />Replace <em>acme</em> with your own domain name. Works only with Microsoft&#8217;s Active Directory.</p>
<pre class="steps">
auth_bind_userdn = acme\%u
</pre>
<p><strong>Option 2: Distinguished Name Template</strong><br />Change the sample value to one that is appropriate for your layout.</p>
<pre class="steps">
auth_bind_userdn = uid=%u,ou=people,dc=acme,dc=local
</pre>
<p><strong>Option 3: Search Filter</strong><br />This should work with any layout but requires an additional search operation to find the correct distinguished name. Change the sample value to one that is appropriate for your layout.</p>
<pre class="steps">
pass_filter = (&#038;(objectclass=person)(uid=%u))
</pre>
<div class="clearfix steps"><a href="/images/centos-5/edit-dovecot-conf-virtual.png"><img class="preview" alt="Edit dovecot.conf" src="/images/centos-5/t-edit-dovecot-conf-virtual.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. For RHEL/CentOS 5, edit the file <em>/etc/dovecot.conf</em> and change the value of the following keys below
<pre class="steps">
auth_username_format = %Lu

passdb ldap {
  args = /etc/dovecot-ldap.conf
}

userdb static {
  args = uid=501 gid=501 home=/home/vmail/%u
}
</pre>
</div>
<div class="clearfix steps"><a href="/images/centos-6/edit-dovecot-10-auth-conf-2.png"><img class="preview" alt="Edit 10-auth.conf" src="/images/centos-6/t-edit-dovecot-10-auth-conf-2.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>For RHEL/CentOS 6, edit the file <em>/etc/dovecot/conf.d/10-auth.conf</em> and add the lines below
<pre class="steps">
auth_username_format = %Lu

passdb {
  driver = ldap
  args = /etc/dovecot/dovecot-ldap.conf
}

userdb {
  driver = static
  args = uid=501 gid=501 home=/home/vmail/%u
}
</pre>
</div>
<p><em>uid</em>, <em>gid</em> and <em>home</em> should contain the user id, group id and home directory respectively of the vmail user account.</p>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />Comment out all the other <em>passdb</em> and <em>userdb</em> sections or include lines except for those specified above to ensure that nothing will conflict with our LDAP virtual accounts.</div>
<div class="clearfix steps"><a href="/images/centos-5/service-config-3.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-service-config-3.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. Restart the dovecot service. <a href="/how-to-start-stop-services-centos-5/">Learn how to start and stop services here.</a></div>
<div class="clearfix steps"><a href="/images/centos-5/terminal.png"><img class="preview" alt="Terminal" src="/images/centos-5/t-terminal.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>4. You should now be able to login using the user names found in your LDAP server. See <a href="/install-setup-dovecot-centos-5/#test-dovecot">Test Dovecot using Telnet</a> and try using LDAP user names instead of the system user names.</div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />If you encounter any problems, check the log file at <em>/var/log/maillog.</em></div>
<h2>Related Pages</h2>
<div class="clearfix steps"><a href="/images/centos-5/ad-group.png"><img class="preview" alt="Active Directory Group" src="/images/centos-5/t-ad-group.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><a href="/postfix-active-directory-ldap-lookup-howto/">How to use the Active Directory Distribution Group in Postfix.</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/postfix-dovecot-ldap-centos-5/feed/</wfw:commentRss>
		<slash:comments>128</slash:comments>
		</item>
		<item>
		<title>Dovecot POP3/IMAP Server Setup Howto for RHEL/CentOS 5</title>
		<link>http://www.linuxmail.info/install-setup-dovecot-centos-5/</link>
		<comments>http://www.linuxmail.info/install-setup-dovecot-centos-5/#comments</comments>
		<pubDate>Mon, 23 Apr 2007 07:36:38 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[CentOS 5]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[Red Hat Enterprise Linux 5]]></category>

		<guid isPermaLink="false">http://www.linux-mail.info/install-setup-dovecot-centos-5/</guid>
		<description><![CDATA[How to install Dovecot POP3/IMAP server in Red Hat Enterprise Linux 5 or CentOS 5]]></description>
			<content:encoded><![CDATA[<p>Installing and setting up Dovecot in Red Hat Enterprise Linux 5 or CentOS 5 is easy. All we have to do is to enable the services we would like to provide and we are good to go.</p>
<span id="more-36"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<h2>Install Dovecot</h2>
<div class="clearfix steps"><a href="/images/centos-5/package-manager.png"><img class="preview" alt="Package Manager" src="/images/centos-5/t-package-manager.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. If you did not add dovecot during the CentOS installation, you can add it now using <a href="/how-to-add-remove-applications-centos-5/">Package Manager.</a></div>
<h2>Configure Dovecot</h2>
<div class="clearfix steps"><a href="/images/centos-5/file-browser.png"><img class="preview" alt="File Browser" src="/images/centos-5/t-file-browser.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Click <em>Applications</em>, select <em>System Tools</em> then click <em>File Browser</em>. This will launch the <strong>File Browser</strong> window.</div>
<div class="clearfix steps"><a href="/images/centos-5/file-browser-3.png"><img class="preview" alt="File Browser" src="/images/centos-5/t-file-browser-3.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. In the <em>Location</em> field, type in <em>/etc</em> and press Enter. If you don&#8217;t see the Location field, click the notepad button to toggle to text-based location bar.</div>
<div class="clearfix steps"><a href="/images/centos-5/edit-dovecot-cf.png"><img class="preview" alt="Edit dovecot.cf" src="/images/centos-5/t-edit-dovecot-cf.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. Double click on the file <em>dovecot.conf</em> to open it for editing. We need to change a few key items.</div><div class="clearfix">Find the following keys and change its values as follows</div>
<pre class="steps">
protocols = pop3 pop3s imap imaps
mail_location = maildir:~/Maildir/
pop3_uidl_format = %08Xu%08Xv
imap_client_workarounds = delay-newmail outlook-idle netscape-eoh
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
</pre>
<p><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />For 64-bit users: Add the line <tt>login_process_size = 64</tt> in the file <em>/etc/dovecot.conf</em>.</p>
<p>Lines starting with # are comments. The last two line enables workarounds for various client bugs. Save the file after completing your changes.</p>
<div class="clearfix steps"><a href="/images/centos-5/service-config.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-service-config.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>4. Start the dovecot service. <a href="/how-to-start-stop-services-centos-5/">Learn how to start and stop services here.</a></div>
<h2 id="test-dovecot">Test Dovecot</h2>
<div class="clearfix steps"><a href="/images/centos-5/terminal-shortcut.png"><img class="preview" alt="Terminal" src="/images/centos-5/t-terminal-shortcut.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Click <em>Applications</em>, select <em>Accessories</em>, and click <em>Terminal</em>. This will launch the <strong>Terminal</strong> window.</div>
<div class="clearfix steps"><a href="/images/centos-5/terminal.png"><img class="preview" alt="Terminal" src="/images/centos-5/t-terminal.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. In the <strong>Terminal</strong> window, type in the highlighted commands below.</div>
<p>Sample dovecot session. Replace <strong>johndoe</strong> and <strong>password</strong> with any valid user name and password.</p>
<div class="clearfix">
<pre class="steps">
[root@mail ~]# <span class="h">telnet localhost pop3</span>
+OK dovecot ready.
<span class="h">user johndoe</span>
+OK
<span class="h">pass password</span>
+OK Logged in.
<span class="h">list</span>
+OK 1 messages:
1 622
.
<span class="h">retr 1</span>
+OK 622 octets
Return-Path: &lt;johndoe@mail.acme.local&gt;
X-Original-To: johndoe
Delivered-To: johndoe@mail.acme.local
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
        by mail.acme.local (Postfix) with SMTP id 9729067C17
        for &lt;johndoe&gt;; Thu, 22 Feb 2007 09:06:37 -0500 (EST)
Message-Id: &lt;20070222140640.9729067C17@mail.acme.local&gt;
Date: Thu, 22 Feb 2007 09:06:37 -0500 (EST)
From: johndoe@mail.acme.local
To: undisclosed-recipients:;
X-IMAPbase: 1172153557 1
Status: O
X-UID: 1
Content-Length: 5
X-Keywords:


test
.
<span class="h">quit</span>
+OK Logging out.
Connection closed by foreign host.
[root@mail ~]#
</pre>
</div>
<p><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />If you encounter any problems, check the log file at <em>/var/log/maillog.</em></p>
<div>&nbsp;</div>
<div class="left">&laquo;&laquo; Previous: <a href="/postfix-smtp-server-howto-centos-5/">How to Setup Postfix SMTP Server </a></div><div class="right">Next: <a href="/postfix-smtp-auth-dovecot-sasl/">How to Setup SMTP Auth</a> &raquo;&raquo;</div>
<div style="clear: both">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/install-setup-dovecot-centos-5/feed/</wfw:commentRss>
		<slash:comments>61</slash:comments>
		</item>
	</channel>
</rss>

