Bugzilla has an Inbound Email Interface but setting up is not documented, at least I couldn’t find it.

Here is how I did it

  • Make sure all of the optional E-mail/MIME perl modules are installed as listed by checksetup.pl
  • install procmail and MTA of your choice I used postfix
    apt-get install procmail
  • Create a user and added to apache group
    useradd -m -G www-data bug-mail
  • Create /home/bug-mail/.procmail as follows
    $cat /home/bug-mail/.procmail
    * ^To:.*bug-mail@yourdomain.com
    |/path/to/bugzilla/email_in.pl -vvv

    or specify some defaults in the config

    $cat /home/bug-mail/.procmail
    * ^To:.*bug-mail@yourdomain.com
    |/path/to/bugzilla/email_in.pl -vvv --default product=TestProduct --override version=2.5

How it works

I am not an expert but this is my understanding of how this works.

  • Procmail will invoke the .procmail file everytime an email is received for the user.
  • “:0:” means the first rule in the file and use a local lock file
  • “* ^To:.*bug-mail@yourdomain.com” this condition means match emails with the bug-mail@yourdomain.com in the To section
  • “|/path/to/bugzilla/email_in.pl” invoke the email_in.pl and pass the email content to it
  • email_in.pl will process the email content received

That’s it, happy bug creations!!!