Posts: 7

Topic: change LDA

Hi,

Can sieve pipe into another shell script? We have some procmail that pipe into another script.The following is an example of it. It is a procmail receipt. If sieve can't handle it, how easy is to configure iredmail to use procmail for only that user? Thank you.

In MySQL backend, change value of 'transport' column in vmail.mailbox table. set to 'procmail' (this is what we defined in postfix master.cf).In OpenLDAP backend, change value of 'mtaTransport' attribute of this user.

- Be CAREFUL, maildir generated by iRedMail is hashed, but seems procmail can't find them, so maybe you should change maildir related paths in SQL/LDAP of this user, so that it can receive mails.

e.g. In MySQL backend, you may want to change value of 'storagebasedirectory' and 'maildir' columns in vmail.mailbox table. In LDAP backend, you may want to change value of 'storageBaseDirectory' and 'mailMessageStore' attributes.

If you want to change these paths, it'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.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

Re: change LDA

Hi,

Since I have users authenticate against the iredmail's usermail information. The procmail in the faq is for global setting. How do I get procmail to read the user's home directory's .procmailrc? Thank you.

ZhangHuangbin wrote:

ze wrote:

Thanks for the quick reply, what if I want to have both procmail and sieve? Just procmail for that particular user.

Re: change LDA

Set transport of this user in your MYSQL/LDAP backend.In MySQL backend, change value of 'transport' column in vmail.mailbox table. set to 'procmail' (this is what we defined in postfix master.cf).In OpenLDAP backend, change value of 'mtaTransport' attribute of this user.

As i said, it's per-user setting. If per-user setting isn't available, it will use global setting instead.

How do I get procmail to read the user's home directory's .procmailrc?

You should read procmail documentation.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

Re: change LDA

HI,

I guess I am a bit dense on this. I don't see how a user's procmailrc will get executed. Since iRedMail is virtual and the default user is vmail. the $HOME variables points to /var/vmail or whatever in the home directory of vmail. How come sieve mail filtering can't call a script?

Maybe I should use the SWITCHRC to read the .procmailrc in the user's home directory:somewhere along the /etc/procmailrc:

SWITCHRC="`/usr/bin/getent passwd $USER | cut -d: -f6`/.promailrc".

The getent is to determine the user's home directory. Any better solution? maildrop? Thanks.

ZhangHuangbin wrote:

Set transport of this user in your MYSQL/LDAP backend.In MySQL backend, change value of 'transport' column in vmail.mailbox table. set to 'procmail' (this is what we defined in postfix master.cf).In OpenLDAP backend, change value of 'mtaTransport' attribute of this user.

As i said, it's per-user setting. If per-user setting isn't available, it will use global setting instead.

How do I get procmail to read the user's home directory's .procmailrc?