How to email subadressing?

First of all, I found this topic: Plus Addressing Email like Gmail
I tested some configuration changes but I doent work.

What I want?

My mail adress is: [email protected]
Now I will sent a mail to [email protected]

I activated these (see below) lines but nothing happend (Mail delivery failed: returning message to sender)

/etc/dovecot/conf.d/15-lda.conf:

# Delimiter character between local-part and detail in email address.
recipient_delimiter = +

# Header where the original recipient address (SMTP's RCPT TO: address) is taken
# from if not available elsewhere. With dovecot-lda -a parameter overrides this. 
# A commonly used header for this is X-Original-To.
#lda_original_recipient_header =

# Should saving a mail to a nonexistent mailbox automatically create it?
lda_mailbox_autocreate = yes

# Should automatically created mailboxes be also automatically subscribed?
lda_mailbox_autosubscribe = yes

lmtp_save_to_detail_mailbox = yes

So how to configure plus/sub email addressing?

1 Like

I sent a few test emails from outside to my account. This works. The e-mail server receives e-mails to a subaddress, like [email protected].

You just can’t send email on your own server from account1 to account2.

grafik

2 Likes

Let me know what you come up with @turbopixel I have been wanting to do this too. We have a support@domain email with a folder called alerts in the inbox folder and we would like to use [email protected] for RMM Agent alerts.

I have manage sieve working although the + tags from external email provider are not working. I set the config details you have listed there @turbopixel and rebooted the server, is there anything that you didnt include there?

What OS are you running im on ubuntu 20.04

Not the best solution: I did not get the subadressing configured. However, I receive the emails due to enabled catchall. For this reason, I cannot send emails to [email protected] internally, i.e. from the same server.

(My Server runs on Debian 11)

Oh I see , I do not have a catch all on. Im afraid it would flood my server with garbage, well let me know if you come up with anything, i’ll do the same

Hey @turbopixel and @johnny, after a lot of research/trial and error/headaches, I have figured it out.

Note: I have only tested suffix based ([email protected]), but I believe prefix based ([email protected]) should work the same, just change suffix to prefix below. These changes enable subaddressing globally, across all domains. I’m not sure if it can be done on a per domain basis. I might try figuring that out some other time, maybe, probably not.

/etc/exim4/exim4.conf.template

In the “localuser” router definition, add the following:

  local_part_suffix = +*
  local_part_suffix_optional

The entire section will look similar to this:

localuser:
  driver = accept
  transport = local_delivery
  local_part_suffix = +*
  local_part_suffix_optional
  condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}{true}{false}}
1 Like

Nice work @icorbitt This would make a nice pull request on the project as well. I don’t see a reason why not to enable this by default when managesieve is enabled seems like an all win and no con.

Discussed before here. How to allow mail acconts with tag?

As you figured out, if you configure for “suffix”, then the email needs to be username+whatever@, not whatever+username@

1 Like

I find the alias feature very handy, which can be configured when editing an email address in HestiaUI. Moreover I believe aliases are better, because I can completely remove them at any time, if I find that some senders start misbehaving. Sending from alias address is also possible (I don’t have a need for it though), but I need to configure it in Roundcube first.

I understand that my approach may not be closely related to what you’re trying to achieve. I’m just giving another perspective :grin:

2 Likes

I do agree it should never be enabled by default.

And I don’t see the need for adding it as a part of Hestia.

Information on how to config it in the Docs off course…

2 Likes

I politely disagree. The use of the + symbol is standard and it shouldn’t interfere with the panel.

Of course this feature should not be a deal-breaker for almost anyone.

If it is standard, why it isnt enabled in exim’s default config? So I would disagree here the disagree, it isnt standard at all :slight_smile:.

The setup of email tags should at least be described in the HestiaCP documentation.

email tagging or subadressing is always enabled in some mail server images like mailcow or mail-in-a-box. Mailcow users can also customize email tagging: mailcow.github.io/mailcow-dockerized-docs/manual-guides/mailcow-UI/u_e-mailcow_ui-tagging

1 Like

Please submit a Pull Request to GitHub - hestiacp/hestiacp-docs: Hestia Control Panel Documentation | Want to contribute? Pull requests are welcome!

2 Likes

how can i configure the email subadressing!

please send the setup steps

See above. If you want more guidance it is available via DM for 100 euro / hour (min 30min)

Hestia documation showing 404 error

Above but where ,:joy:

and for “.” “-” "" suffix
it will be local_part_suffix = +* : .* : -* : *

do not write it as :arrow_down: multiple times
local_part_suffix = +*
local_part_suffix = [whatever]*



Step1 : nano /etc/exim4/exim4.conf.template
Step2 : ctrl+w enter “localuser:” keyword to find section
Step3 : add below lines after " transport = local_delivery" line

++for single suffix

local_part_suffix = +*
local_part_suffix_optional

++ for multiple suffix

local_part_suffix = +* : [whatever]* : [whatever]*
local_part_suffix_optional

Step 4: sudo update-exim4.conf
Step 5: sudo service exim4 restart
Step 6 [Optional]: systemctl status exim4.service


i will not recommend “-" prefix because I will disable catch all mail feature. OR maybe I have been added more then 2 prefix that’s why it is happening. I don’t know but "+ and .*” will work fine and its enough. which is also enabled in gmail.