<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[iRedMail — Piping Script with iRedAdmin]]></title>
	<link rel="self" href="http://www.iredmail.org/forum/feed-atom-topic4158.xml" />
	<updated>2012-11-20T06:04:25Z</updated>
	<generator>PunBB</generator>
	<id>http://www.iredmail.org/forum/topic4158-piping-script-with-iredadmin.html</id>
		<entry>
			<title type="html"><![CDATA[Re: Piping Script with iRedAdmin]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post19158.html#p19158" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><div class="quotebox"><cite>sangeeta.arora wrote:</cite><blockquote><p>and for each email account how I set the &quot;-d ${user}@${domain} &quot; option in master.cf file?</p></blockquote></div><p>Oh, you don&#039;t need to change it, just use &quot;-d ${user}@${domain}&quot;, it will be substituted by the real email address. That&#039;s why i say you need only one entry in master.cf.</p><p>If you script doesn&#039;t support &#039;-f&#039;, &#039;-d&#039;, just replace by the valid variables. For example:<br /></p><div class="codebox"><pre><code>    flags=DRhu user=vmail:vmail argv=/path/to/your/external/script.sh --sender=${sender} --recipient=${user}@${domain} --extension=${extension}</code></pre></div></blockquote></div><p>Thanks a lot Zhang <img src="http://www.iredmail.org/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>It is working fine now.</p>]]></content>
			<author>
				<name><![CDATA[sangeeta.arora]]></name>
				<uri>http://www.iredmail.org/forum/user32180.html</uri>
			</author>
			<updated>2012-11-20T06:04:25Z</updated>
			<id>http://www.iredmail.org/forum/post19158.html#p19158</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Piping Script with iRedAdmin]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post19143.html#p19143" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>sangeeta.arora wrote:</cite><blockquote><p>and for each email account how I set the &quot;-d ${user}@${domain} &quot; option in master.cf file?</p></blockquote></div><p>Oh, you don&#039;t need to change it, just use &quot;-d ${user}@${domain}&quot;, it will be substituted by the real email address. That&#039;s why i say you need only one entry in master.cf.</p><p>If you script doesn&#039;t support &#039;-f&#039;, &#039;-d&#039;, just replace by the valid variables. For example:<br /></p><div class="codebox"><pre><code>    flags=DRhu user=vmail:vmail argv=/path/to/your/external/script.sh --sender=${sender} --recipient=${user}@${domain} --extension=${extension}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2012-11-19T12:18:15Z</updated>
			<id>http://www.iredmail.org/forum/post19143.html#p19143</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Piping Script with iRedAdmin]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post19138.html#p19138" />
			<content type="html"><![CDATA[<p>Hi Zhang,</p><p>Thanks for your response.</p><p>But still I am not clear about how I achieved this? As you told that in master.cf, I will set recipient@example.com. But my issue is that I have multiple email accounts like test1@example.com, test2@example.com, test3@example.com etc. and for each email account how I set the &quot;-d ${user}@${domain} &quot; option in master.cf file? My domain name is fixed but the user is not fixed as it is creating dynamically. It may be test1, test2, test3 or something so I will set this in master.cf file and also how my script file will identify that mail is coming on test1@example.com or test2@example.com or test3@example.com etc.?</p>]]></content>
			<author>
				<name><![CDATA[sangeeta.arora]]></name>
				<uri>http://www.iredmail.org/forum/user32180.html</uri>
			</author>
			<updated>2012-11-19T06:10:24Z</updated>
			<id>http://www.iredmail.org/forum/post19138.html#p19138</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Piping Script with iRedAdmin]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post19137.html#p19137" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>sangeeta.arora wrote:</cite><blockquote><p>Can anyone please explain? How I map it with multiple email accounts?</p></blockquote></div><p>You already achieved it. What do you mean &quot;map it with multiple email accounts&quot;?</p><div class="quotebox"><cite>sangeeta.arora wrote:</cite><blockquote><p>&nbsp; &nbsp; flags=DRhu user=vmail:vmail argv=/path/to/your/external/script.sh -f ${sender} -d ${user}@${domain} -m ${extension}</p></blockquote></div><p>As defined in master.cf, Postfix will pile email to your script.sh, with option &quot;-f sender@domain.com -d recipient@example.com -m ${extension}&quot;. You script should have ability to handle multiple accounts.</p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2012-11-19T06:02:42Z</updated>
			<id>http://www.iredmail.org/forum/post19137.html#p19137</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Piping Script with iRedAdmin]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post19136.html#p19136" />
			<content type="html"><![CDATA[<p>Hi Zhang,</p><p>As I told you already that I am creating multiple dynamic email accounts. So, suppose if I have test1@mydomain.com and test2@mydomain.com then how I will do the entry in master.cf? As per Wikki, I have to do the following:-</p><p>sql&gt; USE vmail;<br />sql&gt; UPDATE mailbox SET transport=&#039;external-pipe&#039; WHERE username=&#039;test1@mydomain.com&#039;;</p><p>sql&gt; USE vmail;<br />sql&gt; UPDATE mailbox SET transport=&#039;external-pipe&#039; WHERE username=&#039;test2@mydomain.com&#039;;</p><p>and then how it will be in master.cf :-</p><p>external-pipe&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;unix&nbsp; &nbsp; -&nbsp; &nbsp; &nbsp; &nbsp;n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&nbsp; &nbsp; &nbsp; &nbsp;pipe<br />&nbsp; &nbsp; flags=DRhu user=vmail:vmail argv=/path/to/your/external/script.sh -f ${sender} -d ${user}@${domain} -m ${extension}</p><p>Can anyone please explain? How I map it with multiple email accounts?</p>]]></content>
			<author>
				<name><![CDATA[sangeeta.arora]]></name>
				<uri>http://www.iredmail.org/forum/user32180.html</uri>
			</author>
			<updated>2012-11-19T04:46:14Z</updated>
			<id>http://www.iredmail.org/forum/post19136.html#p19136</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Piping Script with iRedAdmin]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post19118.html#p19118" />
			<content type="html"><![CDATA[<p>Oh, no. You need only one entry in /etc/postfix/master.cf. When you create new mail accounts, please set its per-user transport to this entry by following our wiki tutorial:<br /><a href="http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Pipe.Incoming.Email.For.Certain.User.To.External.Script#Update_per-user_transport_to_use_this_new_transport">http://www.iredmail.org/wiki/index.php? … _transport</a></p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2012-11-16T12:09:03Z</updated>
			<id>http://www.iredmail.org/forum/post19118.html#p19118</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Piping Script with iRedAdmin]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post19116.html#p19116" />
			<content type="html"><![CDATA[<p>Hi Zhang,</p><p>So it means for each dynamic email account, I must have to do entry in /etc/postfix/master.cf for that email account ? In my application, there may be thousand of email accounts can be created so is it advisable to do so many entry in master.cf? Please suggest.</p>]]></content>
			<author>
				<name><![CDATA[sangeeta.arora]]></name>
				<uri>http://www.iredmail.org/forum/user32180.html</uri>
			</author>
			<updated>2012-11-16T10:23:27Z</updated>
			<id>http://www.iredmail.org/forum/post19116.html#p19116</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Piping Script with iRedAdmin]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post19108.html#p19108" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>sangeeta.arora wrote:</cite><blockquote><p>I am using dynamic email accounts</p></blockquote></div><p>For example?</p><p>Your accounts must exist in SQL server first, then why not update proper SQL record to set per-user transport as mentioned in wiki tutorial?</p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2012-11-16T09:50:26Z</updated>
			<id>http://www.iredmail.org/forum/post19108.html#p19108</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Piping Script with iRedAdmin]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post19104.html#p19104" />
			<content type="html"><![CDATA[<p>Hi Zhang,</p><p>In my case, I am using dynamic email accounts, so how I will use the dynamic email accounts here? How I pass the email address there?</p>]]></content>
			<author>
				<name><![CDATA[sangeeta.arora]]></name>
				<uri>http://www.iredmail.org/forum/user32180.html</uri>
			</author>
			<updated>2012-11-16T07:30:24Z</updated>
			<id>http://www.iredmail.org/forum/post19104.html#p19104</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Piping Script with iRedAdmin]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post19072.html#p19072" />
			<content type="html"><![CDATA[<p>Reference: <a href="http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Pipe.Incoming.Email.For.Certain.User.To.External.Script">http://www.iredmail.org/wiki/index.php? … nal.Script</a></p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2012-11-14T12:03:56Z</updated>
			<id>http://www.iredmail.org/forum/post19072.html#p19072</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Piping Script with iRedAdmin]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post19071.html#p19071" />
			<content type="html"><![CDATA[<p>==== Required information ====<br />- iRedMail version: 0.8.2<br />- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL<br />- Linux/BSD distribution name and version: <br />- Related log if you&#039;re reporting an issue: <br />==== </p><p>Hi,</p><p>I am developing a web project where I am creating dynamic email accounts and as a email comes to these newly created email accounts, I need to perform some db operations. I am using postfix. But the issue is that how can I set my piping script? </p><p>A little help is really appreciable.</p><p>Thanks.</p>]]></content>
			<author>
				<name><![CDATA[sangeeta.arora]]></name>
				<uri>http://www.iredmail.org/forum/user32180.html</uri>
			</author>
			<updated>2012-11-14T07:51:31Z</updated>
			<id>http://www.iredmail.org/forum/post19071.html#p19071</id>
		</entry>
</feed>
