<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[iRedMail — Postfix Aliases]]></title>
	<link rel="self" href="http://www.iredmail.org/forum/feed-atom-topic104.xml" />
	<updated>2009-06-30T18:51:03Z</updated>
	<generator>PunBB</generator>
	<id>http://www.iredmail.org/forum/topic104-postfix-aliases.html</id>
		<entry>
			<title type="html"><![CDATA[Re: Postfix Aliases]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post557.html#p557" />
			<content type="html"><![CDATA[<p>Hi again,</p><p>&nbsp; I just tried this solution and for me it work great.</p><p>Here are the changes I made :</p><div class="codebox"><pre><code> 
Main.cf

Replace : virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
For this : virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf, mysql:/etc/postfix/mysql_virtual_alias_maps_custom.cf</code></pre></div><p>Copy /etc/postfix/mysql_virtual_alias_maps.cf to mysql_virtual_alias_maps_custom.cf.</p><div class="codebox"><pre><code>mysql_virtual_alias_maps_custom.cf

Replace : query       = SELECT goto FROM alias WHERE address=&#039;%s&#039; AND active=&#039;1&#039; AND expired &gt;= NOW()
For this : query       = SELECT username FROM mailbox WHERE memberOfGroup =&#039;%s&#039; AND active=&#039;1&#039; AND expired &gt;= NOW()</code></pre></div><p>And in the mySql database just add the field &#039;memberOfGroup&#039; on the mailbox table.</p>]]></content>
			<author>
				<name><![CDATA[zeussn]]></name>
				<uri>http://www.iredmail.org/forum/user101.html</uri>
			</author>
			<updated>2009-06-30T18:51:03Z</updated>
			<id>http://www.iredmail.org/forum/post557.html#p557</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Postfix Aliases]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post534.html#p534" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>zeussn wrote:</cite><blockquote><p>Ok, but using that method I have to add all the users, one by one, or can I do some kind of regex like *@domain.com ?</p></blockquote></div><p>Not tested yet. Why not give it a try by yourself? <img src="http://www.iredmail.org/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>PS: i think you can add &#039;all@domain.ltd&#039; during adding &#039;memberOfGroup&#039; column:<br /></p><div class="codebox"><pre><code>mysql&gt; ALTER TABLE mailbox ADD memberOfGroup VARCHAR(255) NOT NULL DEFAULT &#039;all@domain.ltd&#039;;</code></pre></div><p>Note: Maybe VARCHAR(255) is not what you need, change it to the type you need.</p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2009-06-29T14:00:54Z</updated>
			<id>http://www.iredmail.org/forum/post534.html#p534</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Postfix Aliases]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post533.html#p533" />
			<content type="html"><![CDATA[<p>Ok, but using that method I have to add all the users, one by one, or can I do some kind of regex like *@domain.com ?</p>]]></content>
			<author>
				<name><![CDATA[zeussn]]></name>
				<uri>http://www.iredmail.org/forum/user101.html</uri>
			</author>
			<updated>2009-06-29T13:53:45Z</updated>
			<id>http://www.iredmail.org/forum/post533.html#p533</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Postfix Aliases]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post532.html#p532" />
			<content type="html"><![CDATA[<p>Maybe you can try the way below (it&#039;s used in LDAP solution, but not tested &amp; used in MYSQL solution yet):<br /></p><div class="codebox"><pre><code># table: vmail.mailbox
# Columns: username, memberOfGroup
www@domain.com all@domain.com</code></pre></div><p>And add one more virtual_alias_maps lookup file, make it search memberOfGroup column.</p><p>PS: you have to add &#039;memberOfGroup&#039; column manually.</p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2009-06-29T13:51:10Z</updated>
			<id>http://www.iredmail.org/forum/post532.html#p532</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Postfix Aliases]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post531.html#p531" />
			<content type="html"><![CDATA[<p>Hi, this maybe a little offtopic question but I search for a while and I didn&#039;t find any solution, so here is the question :</p><p>Is it possible to create an Alias like &quot;all@domain.com&quot; to send an email to all the users of a domain ?</p><p>I tried creating an alias on Postfix.Admin with the name &quot;all&quot; and the destionation &quot;*&quot; but the postfix log said &quot;user unknown&quot;.</p><p>BTW, I&#039;m running iRedMail 0.5.0-rc1 with mySQL.</p>]]></content>
			<author>
				<name><![CDATA[zeussn]]></name>
				<uri>http://www.iredmail.org/forum/user101.html</uri>
			</author>
			<updated>2009-06-29T13:23:00Z</updated>
			<id>http://www.iredmail.org/forum/post531.html#p531</id>
		</entry>
</feed>
