1 (edited by prrpp 2019-12-11 16:47:08)

Topic: catch all doesn't work

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): iRedMail-1.0-beta2
- Deployed with downloadable installer
- Linux/BSD distribution name and version: debian 10
- Store mail accounts in which backend PGSQL
- Web server Nginx
- Manage mail accounts with iRedAdmin-Pro? no
====

Hello, i try to configure a catch all as described here https://docs.iredmail.org/sql.create.catch-all.html But it doesn't work as expected with smtp error "Recipient address rejected: Unknown user".
Also adding an entry in database table alias_domain doesn't help.

command:

postmap -q foo@mydomain.com proxy:pgsql:/etc/postfix/pgsql/catchall_maps.cf

gives the correct catch all email address (with entry in alias_domain), but sending mails to foo@mydomain.com gives error above.

Anybody knows what is missing in newer iredmail versions since iRedMail-0.9.7?

best regards

----

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

2

Re: catch all doesn't work

Could you please compare all files under /etc/postfix/pgsql/ with our sample config files below?
https://github.com/iredmail/iRedMail/tr … tfix/pgsql

Just compare the "query =" line.

3 (edited by prrpp 2019-12-11 17:06:55)

Re: catch all doesn't work

Thanks for your fast response. I didn't find any differences.
The queries seems to work which i checked with the postmap command.
To get postmap command with all entries from virtual_alias_maps in /etc/postfix/main.cf working, i had to run following insert before:

INSERT INTO alias_domain (alias_domain, target_domain, active) VALUES ('mydomain.com', 'mydomain.com', 1);

Full postmap command looks like:

postmap -q foo@mydomain.com proxy:pgsql:/etc/postfix/pgsql/domain_alias_catchall_maps.cf proxy:pgsql:/etc/postfix/pgsql/domain_alias_maps.cf proxy:pgsql:/etc/postfix/pgsql/catchall_maps.cf proxy:pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf

and returns exactly the catch all email address. But forwarding emails to it doesn't work.

Should i use mydomain.com as address or @mydomain.com for catch all insert statement?
Did you reproduce this behavior in a fresh installation?

best regards

4

Re: catch all doesn't work

Fixed in this post:
https://forum.iredmail.org/post71917.html#p71917

5

Re: catch all doesn't work

thank you very much, it works with the mentioned fix. Without need of additional inserts.