Catch all mail adres

Sorry for not following the script but I just want to create a catchall mail address how to?

1 Like

@Aleks ?

You don’t, there’s no such mechanism yet

Or maybe if you read Catch-All address · Issue #557 · YunoHost/issues · GitHub there seem to be some manual hacks described

2 Likes

You should differently consider you know, it’s a handy dandy tool to have if u need a temp email adress or custom address tied to one real-one so you don’t have to add a user all the time. so i.e. *@domain.com forwards to maillog@domain.com

so to get a clean answer cause this dates back to 20long time ago :wink:

I first have to;

@yunohost-bot

Author

yunohost-bot commented Jul 18, 2017

Original Redmine Comment

Author: tw

Below the working command line to add a catch all. I hope you guys can integrate this into the webgui somehow.

first create a text file catchall.txt with content below. Replace xyz.nohost.me with your domain

#setting up ou for aliases
dn: ou=aliases,dc=yunohost,dc=org
objectClass: organizationalUnit
objectClass: top
ou: aliases

#catchall for xyz.nohost.me
DN: uid=xyz.nohost.me,ou=aliases,dc=yunohost,dc=org
objectClass: mailAccount
objectClass: inetOrgPerson
cn: catchall@xyz.nohost.me
sn: catchall@xyz.nohost.me
mail: @xyz.nohost.me
maildrop: dropmail
uid: xyz.nohost.me

then execute via shell

ldapadd -x -D "cn=admin,dc=yunohost,dc=org" -W -f catchall.txt

add the dropmail alias to the account which shall receive all mails.

And then;

SilverViper commented Apr 5, 2020

edited

For anyone relying on this to have catchall on their system and upgraded their systems to Yunohost 3.7 with the new permission system and realizing their catchall does no longer work, here is a quick and dirty fix:

change in /etc/postfix/ldap-aliases.cf, from:
query_filter = (&(objectClass=mailAccount)(mail=%s)
(permission=cn=mail.main,ou=permission,dc=yunohost,dc=org))

into:
query_filter = (&(objectClass=mailAccount)(mail=%s))

and reload postfix (sudo yunohost service reload postfix).

Not entirely sure why there is a filter on the permissions for aliases as there is also one for accounts? You probably will not create aliases for users you do not want to have email? And would the filter on ldap accounts block the email anyway?

Right?!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.