Email Catch All Solution / Proper Method

Evening all,

I appreciate there’s a feature request in place and the developers are looking into / adding the feature but has anyone managed to get a working ‘catch all’ email solution in place (in the mean time / temporary solution until a CyberPanel feature is added) within the CyberPanel configuration?

I’ve followed a few guides and have tried to mash it together with the CyberPanel installation but i’m getting nowhere unfortunately.

Currently i’ve created a catch all table, e_catchall with the structure and data like -

| id |    source     |    destination     | enabled |
|  1 | | |       0 |
|  2 | | |       1 |
|  3 | | |       1 |

And then have a Postfix config, file as follows -

`user = USERNAME
password = PASSWORD
dbname = cyberpanel
query = SELECT destination FROM e_catchall WHERE source = CONCAT('@','%d') AND enabled = 1
hosts = localhost`
  • used ‘%d’ as i found ‘%s’ would usually pull in the full email address rather than just the domain; although i have noticed ‘%d’ sometimes equals the senders domain (??).

And i’ve changed the alias maps line within to -

`virtual_alias_maps = proxy:mysql:/etc/postfix/, mysql:/etc/postfix/, mysql:/etc/postfix/`

In theory, certainly in my head, this should work but Postfix is throwing 554 5.7.1 Relay access denied; errors.

I’ve attached a link to a Pastebin of the full (not standard, used on other production servers) in case it helps but does anyone have a reason why my implementation doesn’t work or have a proper/better solution that works?

This is about the only thing that’s stopping me using CyberPanel properly on my productions servers so any help will be greatly appreciated! :slight_smile: -

Bit of a bump as i’m still unable to get a catch-all working correctly; anyone have any ideas other than wait to have dev’s implement a solution?

I do catchall by simply adding the mappings to the e_forwardings table…
But I don’t suppose that would relate to the “Relay access denied” error

Does exist any other plugin solution or easiest ?

OLD Thread
please create new thread

@die2mrw007 @asma @nick.chomey : i think thie thread too old, should be locked