1

Topic: active directory & forwarding messages

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.8.5
- Linux/BSD distribution name and version: CentOS release 6.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Active Directory
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====
I want to forward the messages of some accounts to external addresses. Can I use an empty active directory value from these accounts to set it as the forward address and configure postfix to forward messages there?
Thank you in advance for your help.

2

Re: active directory & forwarding messages

You're free to add a new ldap query in Postfix setting 'virtual_alias_maps' to query the mail forwarding accounts you want.

stocton12 wrote:

- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Active Directory
- Manage mail accounts with iRedAdmin-Pro? Yes

I'm confused here, iRedAdmin-Pro doesn't work with Active Directory, why you have both?

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

3

Re: active directory & forwarding messages

At first I was not using AD. I implemented that later.

So let's say that I add the forwarding addresses in the "pager" attribute of the users.
Then I want a query that checks the existence of a value in the "pager" and gives as result attribute the "pager" value?

And a second question. When a user sets forwarding to another address from the webmail (Settings->Filters->etc), is it written somewhere so I can check it?

4

Re: active directory & forwarding messages

I created a new file "forward.cf" with a query

query_filter = (mail=%s)
result_attribute = mail, pager

and add the file name in "mail.cf" in the line "virtual_alias_maps".
Forwarding in the external address is now working. But is there a way not to deliver the mail in the local address?

5

Re: active directory & forwarding messages

I changed the "result_attribute" in pager only and now I think it works.

6

Re: active directory & forwarding messages

stocton12 wrote:

And a second question. When a user sets forwarding to another address from the webmail (Settings->Filters->etc), is it written somewhere so I can check it?

It's written to sieve file on file system. Default path is:
/var/vmail/vmail1/<domain>/<x>/<y>/<z>/xyz-<timestamp>/sieve/dovecot.sieve

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee