Route tickets to queues based on TO email address

I would like to be able to route tickets to different queues based on
the “to” address in the headers of the incoming emails. Right now I
have one mailbox (ithelp@company) with several aliases (qa@company and
po@company). I would like to route incoming messages to different
queues based the “to” address. I want to avoid setting up multiple
mailboxes because we will have about a dozen of these aliases and don’t
want to spend the extra money to support the additional mailboxes.

Currently fetchmail is handling the incoming mail with this config:

poll mail.xxxxxx.net protocol imap username “ithelp” password
“xxxxxxxxxxx” mda “/usr/bin/rt-mailgate --queue general --action
correspond --url http://localhost/rt/” no keep

I’ve done some research into this and have seen multiple possibilities
on how to handle this issue, but frankly I don’t have a lot of
experience dealing with email backends, especially on Linux. My options
seem to be:

  1. Use fetchmail to direct the messages to some sort of intermediary MDA
    that parses the header and forwards to rt-mailgate passing the correct
    queue variable

  2. Re-write rt-mailgate to direct to correct queues (after staring at
    the code for a while I’m still not sure how to even start)

  3. Have a script on my “general” queue that moves messages to the
    correct queue, similar to this
    http://requesttracker.wikia.com/wiki/EmailRouting (but there doesn’t
    seem to be a variable I can use here to pull the “to” address)

Does anyone have any experience dealing with this? I don’t need a step
by step tutorial, but a better idea of how to handle this would be much
appreciated!

Thanks,

Stephen De Vight

Health Solutions Network

Stephen,

We do something like this. We have a “Triage” Queue that receives email for
a large support group that supports 8 different applications, hence 8
possible “support” Queues for the ticket to be created in. We use a scrip in
the “Triage” queue to evaluate the incoming Email and based on the results
of that evaluation, create the ticket in the correct “support” Queue
ORleave it in the “Triage” Queue for further scrutiny.

For us, it’s easy because we installed “CommandByMail” and therefore any
incoming Email will include a Custom Field value (based on a template we
gave our users) that is used in the scrip to determine where to create the
new ticket.

If you have “CommandByMail” installed, I’d be more than happy to send you a
version of our scrip.

Kenn
LBNLOn Thu, Jan 27, 2011 at 4:01 PM, Stephen De Vight Stephen@healthsol.netwrote:

I would like to be able to route tickets to different queues based on the
“to” address in the headers of the incoming emails. Right now I have one
mailbox (ithelp@company) with several aliases (qa@company and po@company).
I would like to route incoming messages to different queues based the “to”
address. I want to avoid setting up multiple mailboxes because we will have
about a dozen of these aliases and don’t want to spend the extra money to
support the additional mailboxes.

Currently fetchmail is handling the incoming mail with this config:

poll mail.xxxxxx.net protocol imap username “ithelp” password
“xxxxxxxxxxx” mda “/usr/bin/rt-mailgate --queue general --action correspond
–url http://localhost/rt/” no keep

I’ve done some research into this and have seen multiple possibilities on
how to handle this issue, but frankly I don’t have a lot of experience
dealing with email backends, especially on Linux. My options seem to be:

  1. Use fetchmail to direct the messages to some sort of intermediary MDA
    that parses the header and forwards to rt-mailgate passing the correct queue
    variable

  2. Re-write rt-mailgate to direct to correct queues (after staring at the
    code for a while I’m still not sure how to even start)

  3. Have a script on my “general” queue that moves messages to the correct
    queue, similar to this http://requesttracker.wikia.com/wiki/EmailRouting
    (but there doesn’t seem to be a variable I can use here to pull the “to”
    address)

Does anyone have any experience dealing with this? I don’t need a step by
step tutorial, but a better idea of how to handle this would be much
appreciated!

Thanks,

Stephen De Vight

Health Solutions Network