1

Topic: Subaddressing question

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

Hello,

We have a helpdesk system where it uses POP to retrieve messages from a specific mailbox (let's call it "sales" mailbox) and creates tickets, so the customer can reply back and forth via email with a ticket number associated with their question - As you know, a very standard feature used by almost all ticketing systems out there.

-> A visitor sends an email to sales@mydomain.com
-> Ticket system logs onto sales@mydomain.com mailbox, retrieves the message and creates a new ticket. If the message received has a ticket number associated with it, then the ticketing system retrieves the message and it simply appends it as a new message to the existing ticket
- The 'reply to' address on responses received by the visitor is always set to 'sales@mydomain.com'

The above works great *without* sub-addressing enabled on the ticketing system.

Now, we enable the *sub-addressing" feature within the ticketing system (we have to have this option enabled if we want to take advantage of a specific feature that they offer):

-> A visitor sends an email to sales@mydomain.com
-> Ticket system logs onto sales@mydomain.com mailbox, retrieves the message and creates a new ticket.
-> Agent replies back to visitor's ticket.
-> When visitor wants to reply back to the ticket, the 'reply to' address now has some random email address like  - sales+39383731313537@mydomain.com   (good, we know the subaddressing is working so far)
- > Visitor goes ahead and replies back to the ticket using the above random email address
-> No responses logged on the ticket.

To investigate further we log onto sales@mydomain.com mailbox and noticed a new folder called "39383731313537" and indeed the new message is sitting within that folder. However, the ticketing system knows nothing about that sub-folder because it only retrieves the messages from the default "Inbox" folder.

So, we are half way through with getting the sub-addressing working. we know iRedMail can support sub-address because it just received the above message without any bounce backs or anything.

However, how do I make it (if there is any way), so all emails received using sub-addressing also goes directly into the main "Inbox" folder instead of their own sub-folders?

----

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

2

Re: Subaddressing question

purathal wrote:

-> When visitor wants to reply back to the ticket, the 'reply to' address now has some random email address like  - sales+39383731313537@mydomain.com   (good, we know the subaddressing is working so far)

This is called address extension, '+' is the delimiter.

With default iRedMail settings, email will be stored in a NEW IMAP FOLDER called "39383731313537". If you prefer storing in INBOX instead of sub-folder "INBOX.39383731313537", try this:

*) Open file /etc/postfix/master.cf, find transport 'dovecot' like below:

# Use dovecot's `deliver` program as LDA.
dovecot unix    -       n       n       -       -      pipe
    flags=DRh ... -f ${sender} -d ${user}@${domain} -m ${extension}

*) Remove "-m ${extension}".
*) Reload or restart Postfix service.

Note: this change will apply to ALL users hosted on your iRedMail server.

Another way to solve this issue is using a per-user transport which can handle the incoming email. FYI:
http://www.iredmail.org/docs/pipe.incom … cript.html

[Personally, i think this per-user transport might be better, but it's up to you. smile ]

3

Re: Subaddressing question

ZhangHuangbin wrote:

*) Open file /etc/postfix/master.cf, find transport 'dovecot' like below:

# Use dovecot's `deliver` program as LDA.
dovecot unix    -       n       n       -       -      pipe
    flags=DRh ... -f ${sender} -d ${user}@${domain} -m ${extension}

*) Remove "-m ${extension}".
*) Reload or restart Postfix service.

Note: this change will apply to ALL users hosted on your iRedMail server.

Hello,

Thanks for your assistance.

I tried enabling the server wide setting as you suggested above. First of all, under my current /etc/postfix/master.cf file, I did not find a 'dovecot' transport like the one you listed above. However, I decided to add the above configuration manually to the end of the master.cf file (without the "-m ${extension}"), restarted the Postfix service.  Did a quick test and the emails with address extension (+) are still ending up within their own IMAP sub-folder of the respective mailboxes.

Any idea if I missed something?

4

Re: Subaddressing question

purathal wrote:

First of all, under my current /etc/postfix/master.cf file, I did not find a 'dovecot' transport like the one you listed above.

*) "dovecot" is ALWAYS present on a iRedMail server. Why doesn't yours? i'm confused.
*) Which transport / LDA do you use to deliver local email? iRedMail uses 'dovecot' by default.

5

Re: Subaddressing question

ZhangHuangbin wrote:
purathal wrote:

First of all, under my current /etc/postfix/master.cf file, I did not find a 'dovecot' transport like the one you listed above.

*) "dovecot" is ALWAYS present on a iRedMail server. Why doesn't yours? i'm confused.
*) Which transport / LDA do you use to deliver local email? iRedMail uses 'dovecot' by default.

Please ignore my previous post completely... I was really being stupid (long day) and looking for those settings under a different postfix box! Made the necessary changes (this time on the right node) and it appears to be working as expected.