<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[iRedMail — change LDA]]></title>
	<link rel="self" href="http://www.iredmail.org/forum/feed-atom-topic479.xml" />
	<updated>2009-12-22T10:34:37Z</updated>
	<generator>PunBB</generator>
	<id>http://www.iredmail.org/forum/topic479-change-lda.html</id>
		<entry>
			<title type="html"><![CDATA[Re: change LDA]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post2146.html#p2146" />
			<content type="html"><![CDATA[<p>HI,</p><p>I guess I am a bit dense on this.&nbsp; I don&#039;t see how a user&#039;s procmailrc will get executed.&nbsp; Since iRedMail is virtual and the default user is vmail.&nbsp; the $HOME variables points to /var/vmail or whatever in the home directory of vmail.&nbsp; How come sieve mail filtering can&#039;t call a script?</p><p>Maybe I should use the SWITCHRC to read the .procmailrc in the user&#039;s home directory:<br />somewhere along the /etc/procmailrc:</p><p>SWITCHRC=&quot;`/usr/bin/getent passwd $USER | cut -d: -f6`/.promailrc&quot;.&nbsp; </p><p>The getent is to determine the user&#039;s home directory.&nbsp; Any better solution?&nbsp; maildrop? Thanks.</p><div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><div class="quotebox"><blockquote><p>Set transport of this user in your MYSQL/LDAP backend.<br />In MySQL backend, change value of &#039;transport&#039; column in vmail.mailbox table. set to &#039;procmail&#039; (this is what we defined in postfix master.cf).<br />In OpenLDAP backend, change value of &#039;mtaTransport&#039; attribute of this user.</p></blockquote></div><p>As i said, it&#039;s per-user setting. If per-user setting isn&#039;t available, it will use global setting instead.</p><div class="quotebox"><blockquote><p>How do I get procmail to read the user&#039;s home directory&#039;s .procmailrc?</p></blockquote></div><p>You should read procmail documentation.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[ze]]></name>
				<uri>http://www.iredmail.org/forum/user684.html</uri>
			</author>
			<updated>2009-12-22T10:34:37Z</updated>
			<id>http://www.iredmail.org/forum/post2146.html#p2146</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: change LDA]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post2142.html#p2142" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Set transport of this user in your MYSQL/LDAP backend.<br />In MySQL backend, change value of &#039;transport&#039; column in vmail.mailbox table. set to &#039;procmail&#039; (this is what we defined in postfix master.cf).<br />In OpenLDAP backend, change value of &#039;mtaTransport&#039; attribute of this user.</p></blockquote></div><p>As i said, it&#039;s per-user setting. If per-user setting isn&#039;t available, it will use global setting instead.</p><div class="quotebox"><blockquote><p>How do I get procmail to read the user&#039;s home directory&#039;s .procmailrc?</p></blockquote></div><p>You should read procmail documentation.</p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2009-12-22T06:05:23Z</updated>
			<id>http://www.iredmail.org/forum/post2142.html#p2142</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: change LDA]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post2141.html#p2141" />
			<content type="html"><![CDATA[<p>Hi,</p><p>Since I have users authenticate against the iredmail&#039;s usermail information.&nbsp; The procmail in the faq is for global setting.&nbsp; How do I get procmail to read the user&#039;s home directory&#039;s .procmailrc?&nbsp; &nbsp; Thank you.</p><br /><div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><div class="quotebox"><cite>ze wrote:</cite><blockquote><p>Thanks for the quick reply, what if I want to have both procmail and sieve?  Just procmail for that particular user.</p></blockquote></div><p>This is per-user setting.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[ze]]></name>
				<uri>http://www.iredmail.org/forum/user684.html</uri>
			</author>
			<updated>2009-12-22T06:02:06Z</updated>
			<id>http://www.iredmail.org/forum/post2141.html#p2141</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: change LDA]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post2059.html#p2059" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ze wrote:</cite><blockquote><p>Thanks for the quick reply, what if I want to have both procmail and sieve?  Just procmail for that particular user.</p></blockquote></div><p>This is per-user setting.</p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2009-12-11T03:10:51Z</updated>
			<id>http://www.iredmail.org/forum/post2059.html#p2059</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: change LDA]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post2056.html#p2056" />
			<content type="html"><![CDATA[<p>Hi,</p><p>Thanks for the quick reply, what if I want to have both procmail and sieve?&nbsp; Just procmail for that particular user.</p><p>Thanks.</p>]]></content>
			<author>
				<name><![CDATA[ze]]></name>
				<uri>http://www.iredmail.org/forum/user684.html</uri>
			</author>
			<updated>2009-12-11T02:33:52Z</updated>
			<id>http://www.iredmail.org/forum/post2056.html#p2056</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: change LDA]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post2055.html#p2055" />
			<content type="html"><![CDATA[<p>iRedMail supports procmail too.</p><p>Steps to use procmail instead of sieve LDA:</p><p>- Add below lines in postfix master.cf<br /></p><div class="codebox"><pre><code>procmail unix - n n - - pipe
  flags=DRhu user=vmail:vmail argv=/usr/bin/procmail -r -t SENDER=${sender} RECIPIENT=${recipient} DOMAIN=${nexthop} -m USER=${user} EXTENSION=${extension} /etc/procmailrc</code></pre></div><p>Tip: iRedMail ships a sample procmailrc under samples/ directory.</p><p>- Create log file if necessary:<br /></p><div class="codebox"><pre><code># touch /var/log/procmail.log
# chown vmail:vmail /var/log/procmail.log
# chmod 0700 /var/log/procmail.log</code></pre></div><p>- Set transport of this user in your MYSQL/LDAP backend.</p><p>In MySQL backend, change value of &#039;<strong>transport</strong>&#039; column in vmail.mailbox table. set to &#039;procmail&#039; (this is what we defined in postfix master.cf).<br />In OpenLDAP backend, change value of &#039;<strong>mtaTransport</strong>&#039; attribute of this user.</p><p>- Be CAREFUL, maildir generated by iRedMail is hashed, but seems procmail can&#039;t find them, so maybe you should change maildir related paths in SQL/LDAP of this user, so that it can receive mails.</p><p>e.g. In MySQL backend, you may want to change value of &#039;storagebasedirectory&#039; and &#039;maildir&#039; columns in vmail.mailbox table. In LDAP backend, you may want to change value of &#039;storageBaseDirectory&#039; and &#039;mailMessageStore&#039; attributes.</p><p>If you want to change these paths, it&#039;s a good idea to not mix procmail mailboxes and default LDA mailboxes, you may want to use /var/vmail/procmail01/ as storageBaseDirectory instead of /var/vmail/vmail01 which used by default LDA.</p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2009-12-11T02:07:21Z</updated>
			<id>http://www.iredmail.org/forum/post2055.html#p2055</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[change LDA]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post2054.html#p2054" />
			<content type="html"><![CDATA[<p>Hi,</p><p>Can sieve pipe into another shell script?&nbsp; We have some procmail that pipe into another script.<br />The following is an example of it.&nbsp; It is a procmail receipt.&nbsp; &nbsp;If sieve can&#039;t handle it, how easy is to configure iredmail to use procmail for only that user?&nbsp; Thank you.</p><p>0:<br />* ^TO_anita_offline<br />{<br />&nbsp; :0 c<br />&nbsp; IN-anita_offline</p><p>&nbsp; :0<br />&nbsp; |$HOME/bin/run_mhonarc.sh anita_offline<br />}</p>]]></content>
			<author>
				<name><![CDATA[ze]]></name>
				<uri>http://www.iredmail.org/forum/user684.html</uri>
			</author>
			<updated>2009-12-11T01:58:52Z</updated>
			<id>http://www.iredmail.org/forum/post2054.html#p2054</id>
		</entry>
</feed>
