WARNING – this topic is very specific to a particular rare use case and is likely not what you should be doing. Refer to the first two links, below, for the recommended setup.
I searched the forum for a clear article on how to setup a ticket system using Discourse and found some brilliant topics:
- Configure incoming email to create new topics or group messages
- Use Discourse as a Private Support/Ticket System
Unfortunately, I am not enough familiar with some mail server features, and I don’t know how to configure the support of
email@example.com. How does it work at all, omg?
How can I use multiple emails assigned to different categories? How does it work if the forum settings support only one email address?
Yes, it works perfectly. Based on those two howtos I understood the principles of incoming emailing and proper forum settings. As previously mentioned, the main in mail server’s forwarding feature.
For those who want to setup a zero-cost mail server I recommend iRedMail
- Here it is an article to setup a mail server based on ubuntu + postfix + iredmail in English
- here the same for centos in Russian
After a default installation, you get mail server ready to connect to Discourse. Follow steps 1 and 2 above and next steps how to use mail aliases in iRedMail.
For example, you created mailbox
firstname.lastname@example.org and two categories:
feature feature -> internal [private]
You need to use your mailbox credentials in pop polling settings.
Connect to your server shell, use user postgres and connect to the database (I use postgres):
ssh email@example.com sudo su - postgres psql
Then switch to
vmail schema and create two aliases:
postgres=# \c vmail postgres=# INSERT INTO alias (address, domain, active) VALUES ('firstname.lastname@example.org', 'server.com', 1); postgres=# INSERT INTO alias (address, domain, active) VALUES ('email@example.com', 'server.com', 1);
Next step you create forwardings:
postgres=# INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_list, active) VALUES ('firstname.lastname@example.org', 'email@example.com', 'server.com', 'server.com', 1, 1); postgres=# INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_list, active) VALUES ('firstname.lastname@example.org', 'email@example.com', 'server.com', 'server.com', 1, 1); postgres=# \q OR CTRL+D to exit
You may check two tables, aliases and forwardings in your favorite DB manager:
Pay attention to active key, it must be 1.
Assign email aliases to categories and sent email from the email of your registered user. If necessary, you may allow anonymous emailing and auto-creating staged users by the following settings:
- Accept emails from anonymous users with no accounts (optional, category setting)
- enable staged users (if true, check
approve unless stagedas well )
- pop3 polling enabled = true
- pop3 polling host (your host FQDN)
- pop3 polling port (usually 995)
- pop3 polling username (
- pop3 polling password
- pop3 polling delete from server (optional, I leave as disabled to have the original message in my mail client)
- log mail processing failures (optional, because you can monitor all events at Emails tab)
- email in = true
- email in min trust (I use 0 at first after starting my forum, also check
clean up inactive users after days)
- email prefix (optional, if your site title has CAPSED name, it may add spam score to auto-replies)
- enable forwarded emails (optional, it is still BETA in 2.4.0beta2, sometimes it cannot find email body)
Send emails to your aliases and check:
Now all emails sent both to
firstname.lastname@example.org, email@example.com OR firstname.lastname@example.org will put into one mailbox
email@example.com. The difference is - mails sent to
feat@ will be processed by
feature category, mails sent to
staff@ will be processed by
Ensure that new topics have appeared!
- Even you assign primary email
master@to some public or private category, all emails will be processed in the right way (no duplicates, no reveal privacy)
- The setting
min topic title lengthdoes not affect the length of email subject.