1 (edited by tom_tav 2019-08-06 18:02:28)

Topic: Deliver mail to folder

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  0.9.9 PGSQL
- Deployed with iRedMail Easy or the downloadable installer? DOWNLOAD
- Linux/BSD distribution name and version: CENTOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): NGINX
- Manage mail accounts with iRedAdmin-Pro? NO
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello! Im trying out iRedMail (non pro) to replace my mailserver.

I would need to have mail address aliases to mailbox folders (so a mail to some alias address gets delivered into some users imap folder)

In postfix i would do normally that:

main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual_custom

virtual_custom:
aliasaddress@domain.xy   mailusername+foldername


How to do this with iRedmail server? I could ignore the pgsql tables and add above to main.cf, but then i didnt find a valid username in the vmail tables (the full address xy@domain.com+foldername is not working as target)

Thanks a lot!


P.S. Sieve filter doesnt help (imho). I need to forward several mail addresses from different domains to one mailuser into different imap folders. So it would be more complicated then above solution

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by tom_tav 2019-08-06 19:11:56)

Re: Deliver mail to folder

Update: I managed to get it working with the hash method.

The trick is to use the full target email address and add the folder after the user

virtual_custom:

alias@domain.xy      user+folder@domain.zz

3

Re: Deliver mail to folder

You don't need this "virtual_custom" file, default iRedMail configuration works fine for this.
Please follow this tutorial to create mail alias account:
https://docs.iredmail.org/sql.create.mail.alias.html

During creation, just replace the destination address to "user+folder@domain.zz".