How does rt-mailgate work?

Hi all,

On debian woody we have managed to get fetchmail to pop our support
account and believe it is passing e-mails to the rt-mailgate script.
But alas the tickets are not being created in RT.

Our .fetchmailrc config file in /root looks like this:

poll pop.clear.net.nz
proto pop3
user “support”
pass “password”
keep
mda “/usr/bin/rt-mailgate --queue general --action correspond
–url path.to - a really cool domain parked on Park.io

What does the rt-mailgate script do?
How does it get the contents of the email (from, to, subject and body)
into a ticket in the correct format?
Does the rt-mailgate script connect directly to mysql to add data to the
ticket table or does it do it via http?

Best Regards
Dave

Support wrote:

Hi all,

On debian woody we have managed to get fetchmail to pop our support
account and believe it is passing e-mails to the rt-mailgate script.
But alas the tickets are not being created in RT.

Our .fetchmailrc config file in /root looks like this:

poll pop.clear.net.nz
proto pop3
user “support”
pass “password”
keep
mda “/usr/bin/rt-mailgate --queue general --action correspond
–url path.to - a really cool domain parked on Park.io

What does the rt-mailgate script do?
It reads STDIN for MIME email content.
How does it get the contents of the email (from, to, subject and body)
into a ticket in the correct format?
mailgate skip this task, RT do it. mailgate is only gate.
Does the rt-mailgate script connect directly to mysql to add data to the
ticket table or does it do it via http?
http.

Best Regards
Dave
There is several steps(places) for debug.

  1. Maillogs.
  2. RT by default write log to SysLog, but can write to separate file.
  3. pipe email to rt-mailgate with ‘–debug’ option.
  4. search for archives

Support wrote:

Does the rt-mailgate script connect directly to mysql to add data to the
ticket table or does it do it via http?

rt-mailgate uses http and submits data as if it were a user via the
NoAuth SelfService pages.