<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[iRedMail — Change Hostname]]></title>
	<link rel="self" href="http://www.iredmail.org/forum/feed-atom-topic382.xml" />
	<updated>2009-11-01T10:35:58Z</updated>
	<generator>PunBB</generator>
	<id>http://www.iredmail.org/forum/topic382-change-hostname.html</id>
		<entry>
			<title type="html"><![CDATA[Re: Change Hostname]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post1677.html#p1677" />
			<content type="html"><![CDATA[<p>Do I need to copy all files from /etc? Why so, which configuration files are read from there?<br />cp -Rf /etc /var/spool/postfix ?<br /><em>/edit/ Answer: Since postfix is chrooted to /var/spool/postfix it needs these files to be able to determine hostname etc.<br />Not all files are requiered only hosts, localtime, nsswitch.conf, resolv.conf, services /edit/</em></p><p>And how do I create the TLS certificates? Does iRedMail use different certificates for dovecot and apache?<br />Or do I just need to recreate the iRedMail_CA.pem with the command I found in functions/packages.sh?<br /><em>/edit/ Answer: Well apparently apache and dovecot use the same hostname, script for new certificate attached. /edit/</em></p><div class="codebox"><pre><code>#!/usr/bin/env bash
# Generate new certificate for iRedMail 0.5.0

if [ X&quot;${DISTRO}&quot; == X&quot;RHEL&quot; ]; then
    export SSL_FILE_DIR=&quot;/etc/pki/tls&quot;
elif [ X&quot;${DISTRO}&quot; == X&quot;DEBIAN&quot; -o X&quot;${DISTRO}&quot; == X&quot;UBUNTU&quot; ]; then
    export SSL_FILE_DIR=&quot;/etc/ssl&quot;
else
    echo &quot;Your distribution is not supported yet.&quot;
    exit 255
fi

export HOSTNAME=&quot;$(hostname --fqdn)&quot;
export SSL_CERT_FILE=&quot;${SSL_FILE_DIR}/certs/iRedMail_CA.pem&quot;
export SSL_KEY_FILE=&quot;${SSL_FILE_DIR}/private/iRedMail.key&quot;
export TLS_COUNTRY=&#039;DE&#039;
export TLS_STATE=&#039;&#039;
export TLS_CITY=&#039;&#039;
export TLS_COMPANY=&quot;${HOSTNAME}&quot;
export TLS_DEPARTMENT=&#039;IT&#039;
export TLS_HOSTNAME=&quot;${HOSTNAME}&quot;
export TLS_ADMIN=&quot;root@${HOSTNAME}&quot;

openssl req \
        -x509 -nodes -days 3650 -newkey rsa:1024 \
        -subj &quot;/C=${TLS_COUNTRY}/ST=${TLS_STATE}/L=${TLS_CITY}/O=${TLS_COMPANY}/OU=${TLS_DEPARTMENT}/CN=${TLS_HOSTNAME}/emailAddress=${TLS_ADMIN}/&quot; \
        -out ${SSL_CERT_FILE} -keyout ${SSL_KEY_FILE}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[peterpp]]></name>
				<uri>http://www.iredmail.org/forum/user323.html</uri>
			</author>
			<updated>2009-11-01T10:35:58Z</updated>
			<id>http://www.iredmail.org/forum/post1677.html#p1677</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Change Hostname]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post1676.html#p1676" />
			<content type="html"><![CDATA[<p>Almost the complete list. <img src="http://www.iredmail.org/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Don&#039;t forget to sync files under /var/spool/postfix/etc/. You can simplily copy files under /etc/ to /var/spool/postfix/etc/, and then restart postfix.</p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2009-11-01T02:00:38Z</updated>
			<id>http://www.iredmail.org/forum/post1676.html#p1676</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Change Hostname]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post1672.html#p1672" />
			<content type="html"><![CDATA[<p>Hi, </p><p>i discovered that I had a typo in my fqdn while installing iRedMail.</p><p>What do I need to do to change the hostname after the installation:</p><p>- change hostname in /etc/hostname and /etc/hosts<br />- generate new certificate for dovecot (how do I do this?)<br />- generate new certificate for apache (how do I do this?)<br />- change hostname in amavis.conf<br />- change hostname in dovecot-quota-warning.sh<br />- change hostname in posfix/main.cf<br />- what else?</p><p>Greets, peterpp</p>]]></content>
			<author>
				<name><![CDATA[peterpp]]></name>
				<uri>http://www.iredmail.org/forum/user323.html</uri>
			</author>
			<updated>2009-10-31T19:16:37Z</updated>
			<id>http://www.iredmail.org/forum/post1672.html#p1672</id>
		</entry>
</feed>
