Directing subaddresses back to the Inbox

So you’ve used subaddressing for a while, and now have decided to stop. Maybe you want to switch back to POP3 for some reason and want to route all mail to the Inbox rather than to folders. Lucky you, there is an alias trick to make that happen too!

mailbox+*@example.com = [email protected]

Note that you may need to disable subaddressing for this account before this alias works.

Hopefully a few more aliasing and subaddressing tricks soon.

A subaddressing introduction

I’d like to introduce everyone to one of MDaemon’s newer features, a potentially powerful one that is woefully under-utilized. Here is the entry from the release notes:

  * [6182] SUBADDRESSING *
  
    Added support for subaddressing.  Subaddressing is a system for including 
    a folder name in an email address.  Replies or emails sent to that email 
    address will pull the folder from the address and move the message into 
    folders automatically without the need to setup filtering rules.
    
    The syntax is: "mailbox+folder@domain".  So, for example, the email
    address "[email protected]" would route messages directly into 
    [email protected]'s "ietf" IMAP folder (assuming that folder exists).  
    Nested folders can be specified using period characters.  For example, 
    "[email protected]" would route messages directly into 
    [email protected]'s "industry\ietf" IMAP mail folder (again, assuming that
    folder exists).  Underscores are used for spaces in folder names.  For
    example, "[email protected]" would route messages 
    directly into [email protected]'s "my friends\frank" IMAP mail folder.
      
    The folder must exist prior to being used with subaddressing.  Otherwise, 
    the address will be treated as unknown.  This is necessary to prevent
    abuse.

Oh, and good to know, you need to turn this feature on before you can use it:

    A new switch has been added to the Filters tab within the account editor
    which will allow you to enable/disable subaddressing on a per account
    basis.  As a result of the need to delimit using the + character this 
    feature will be unavailable to accounts which include + in their email
    address local-part (mailbox).
    
    This feature can be shut down globally irrespective of individual account
    configuration via a new switch on the Misc Options|Misc UI.  By default,
    each account has this feature disabled individually.

Okay, so with that out of the way, what can you do with this feature?

Well, say you’re a IMAP or WorldClient user most of the time, but want to use a cellphone that doesn’t support uploading sent messages to IMAP. No problem, have your phone automatically BCC mail to [email protected] (assuming you’re [email protected], of course).

Another example would be to route mail you only want to receive for a short period of time directly to a specific folder, but then once you’re done with that fake address, delete the folder and instantly stop receiving mail.

I’ll have a few more goodies that build on subaddressing shortly, stay tuned.

Aliases and domain-side wildcards

A quick heads up, if you create an alias like postmaster@* = [email protected], MDaemon will follow that instruction literally, and alias postmaster@ every single domain whether or not you host it.

If one of your users were to try emailing [email protected] the mail would hit [email protected]

Instead of using postmaster@* you should use the $LOCALDOMAIN$ macro instead. Create an alias of postmaster@$LOCALDOMAIN$ = [email protected] to route the postmaster@ address for each of your domains, but no non-local domains, to your local administrator bob.