How to configure Inbound e-mail using just IMAP

Hello everybody! :slight_smile:

I needed to configure an inbound e-mail and, following the Phabricator inbound e-mail documentation, I’ve seen that actually the only supported local way (I mean without using an additional third parts service) is through a local MTA using Sendmail (that sadly is quite difficult to configure, and it’s not anyway suitable for every environment, because maybe you already have a mailserver on that host, etc.).

I think that there is a simpler approach. The idea is:

  • Everybody have an IMAP mailbox
  • Everybody could provide these IMAP credentials in Phabricator
  • Phabricator could process these e-mails

The good news is that I tried to develop it on top of the PHP IMAP extension and… it works!

If someone brave want to test this proof-of-concept:

  1. Clone this somewhere (just one file): https://gitpull.it/source/php-imap-spooler/
  2. Clone this somewhere (just two files): https://gitpull.it/source/phabricator-inbound-imap-spooler/
    2.1 Fill the config-example.php and save it as config.php
  3. Run bot.php
  4. Have fun! but do not use it in production! :stuck_out_tongue:

Maybe some Phabricator developers may be interested in exploring this solution. I don’t know very well Phabricator and TBH I’m just playing with its features, so even if it works, I wanted to discuss about it, do some tests and improvements, etc. because I think this is a somehow attractive feature that maybe deserve some more work on it.

What do you think about? Thank you :smiley:

1 Like