<?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>Control WebPanel Wiki &#187; Migrate Emails</title>
	<atom:link href="https://wiki.centos-webpanel.com/tag/migrate-emails/feed" rel="self" type="application/rss+xml" />
	<link>https://wiki.centos-webpanel.com</link>
	<description>CentOS WebPanel Wiki</description>
	<lastBuildDate>Wed, 12 Feb 2025 20:38:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>Move /var/vmail to another partition</title>
		<link>https://wiki.centos-webpanel.com/move-varvmail-to-another-partition</link>
		<comments>https://wiki.centos-webpanel.com/move-varvmail-to-another-partition#comments</comments>
		<pubDate>Sun, 29 Mar 2020 21:46:29 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[E-Mail]]></category>
		<category><![CDATA[Migrate Emails]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1334</guid>
		<description><![CDATA[Due to the lack of the disk space on partitions like / or /var, it's sometimes necessary to move the /var/vmail folder to a larger partition which has more free space and mostly to the /home partition. You can check the list of your partitions with this command: df -h Before moving the emails you [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Due to the lack of the disk space on partitions like / or /var, it's sometimes necessary to move the /var/vmail folder to a larger partition which has more free space and mostly to the /home partition.</p>
<p>You can check the list of your partitions with this command:</p>
<pre>df -h</pre>
<p>Before moving the emails you should first check the actual usage of /var/vmail with this command</p>
<pre>du -hs /var/vmail</pre>
<p><strong>Step 1:</strong> We advise you stop postfix and dovecot during this process</p>
<pre>systemctl stop postfix dovecot</pre>
<p><strong>Step 2:</strong> copy the vmail folder to the new location</p>
<pre>rsync -av /var/vmail/ /home/vmail/</pre>
<p>The Above command will copy the folder vmail to /home, so we will have /home/vmail. All permissions will be maintained as well.</p>
<p><strong>Step 3:</strong> Backup /var/vmail folder</p>
<pre>mv /var/vmail /var/vamil.orig</pre>
<p><strong>Step 4:</strong> create a symlink from the new location to old location</p>
<pre>ln -s /home/vmail /var/vmail</pre>
<p><strong>Step 5:</strong> start postfix and dovecot</p>
<pre> systemctl start postfix dovecot</pre>
<p>You can then test send and receipt of emails. If all is ok, then you can delete the /var/vmail.orig folder to make the space available.</p>
<p><strong>Correct permissions are required (edit if you use different location)</strong><br />
chmod 770 /var/vmail<br />
chown vmail.mail /var/vmail</p>
<p><strong>MAIL DISK QUOTA (postfix vmail)</strong><br />
Please note that if you want quota to work for mail then it needs to be on the same partition as user home files.<br />
If you have a custom partition for /home then you will need to have /var/vmail moved per instructions to /home/vmail</p>
<p><strong>CWP SECURE KERNEL</strong><br />
CWP Secure Kernel will allow only <strong>/var/vmail</strong> and <strong>/home/vmail</strong> locations, other locations might have issues with quota.</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/move-varvmail-to-another-partition/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
