RT-MAILGATE(1)

πŸ“¦
version 5.0.10 Β· 4 versions
, in fedora 43

πŸ¦‹ rt-mailgate β€” the manual, but make it make sense ✨

okay bestie, welcome to RT-MAILGATE(1) πŸ’– this is a User Contributed Perl Documentation page, and I'm about to explain the whole thing to you like we're texting at 2am. no cap, every flag is still in here. let's go 🌸


πŸ’Œ NAME

rt-mailgate β€” the mail interface to RT. it's literally the bridge between your inbox and RT, periodt.


πŸŽ€ SYNOPSIS

want the help text? say less:

rt-mailgate --help : this text

and here's how you'd usually get invoked (from the MTA, iykyk):

rt-mailgate --action (correspond|comment|...) --queue queuename
            --url http://your.rt.server
            [ --debug ]
            [ --extension (queue|action|ticket) ]
            [ --timeout seconds ]

✨ OPTIONS ✨

  • --action β€” this controls what actually happens to the email that lands on this alias. the basic actions available are correspond and comment. but heads up, there might be extra actions like take or resolve depending on your local @MailPlugins configuration πŸ‘‘

you can run ✨two or more✨ actions on a single message by smushing them together in a - separated list. RT runs them in the order you listed them. so like, take-comment, correspond-resolve, or take-comment-resolve are all valid little combos.

real talk though: take and resolve will straight up ignore the message text if you use them alone 😭. if you want RT to record the incoming message, you gotta include a comment or correspond action in there too.

the default action is correspond.

  • --queue β€” this flag decides which queue the alias should create a ticket in, but only if no ticket identifier was found. so it's the fallback, bestie πŸ’…
  • --url β€” tells the mail gateway where your RT server lives. you should probably use the same URL your users use to log into RT. like, just do that.

also, if you've got a self-signed SSL certificate, you might need to pass --ca-file or --no-verify-ssl (both below, don't worry) 🫢

  • --ca-file path β€” here you give the path to the public SSL certificate for the certificate authority that should be used to verify the website's SSL certificate. so if your webserver uses a self-signed certificate, pls pls pls reach for this option before --no-verify-ssl β€” it makes sure the self-signed certificate the mailgate is seeing is the right self-signed certificate. it's giving responsible.
  • --no-verify-ssl β€” this tells the mail gateway to trust all SSL certificates. regardless of whether their hostname matches the certificate, and regardless of CA. it's the chaotic option ngl. you need this if you have a self-signed certificate, or some other certificate that isn't traceable back to a certificate your system ultimately trusts.
  • --extension OPTIONAL β€” some MTAs will route mail sent to user-foo@host or user+foo@host over to user@host and then hand you foo in the environment variable $EXTENSION. so:
    • set this parameter to queue, and the queue your message gets submitted to becomes the value of $EXTENSION
    • set it to ticket, and $EXTENSION gets interpreted as the id of the ticket this message is related to
    • set it to action, and the user can specify either comment or correspond in the address extension 🌈
  • --debug OPTIONAL β€” prints debugging output to standard error. that's it, that's the whole vibe.
  • --timeout OPTIONAL β€” configures the timeout for posting the message to the web server. the default timeout is 3 minutes (180 seconds) ⏰

πŸ’œ DESCRIPTION

the RT mail gateway is the primary mechanism for communicating with RT via email. this program just directs the email over to the RT web server, and that server handles filing correspondence and sending out any required mail. iconic division of labor honestly.

it's designed to be run as part of the mail delivery process β€” either called directly by the MTA or procmail, or dropped into a .forward file or equivalent πŸŽ€


🌸 SETUP

ngl, a lot of the setup depends on your MTA and your mail routing configuration. no universal answer, sorry bestie 😭

the thing you do need: route mail to rt-mailgate for the queues you're monitoring. for instance, if you're using /etc/aliases and you've got a bugs queue, you'd want something like this:

bugs:         "|/usr/bin/rt-mailgate --queue bugs --action correspond
          --url http://rt.mycorp.com"

bugs-comment: "|/usr/bin/rt-mailgate --queue bugs --action comment
          --url http://rt.mycorp.com"

and plot twist 🫒 β€” you do not have to run your RT server on your mail server. the mail gateway will happily relay to a different machine. slay.


🌈 ENVIRONMENT

EXTENSION

some MTAs will route mail sent to user-foo@host or user+foo@host to user@host, and present foo in the environment variable EXTENSION. mailgate adds the value of this variable to the message in the X-RT-Mail-Extension field of the message header πŸ’Œ

see also the --extension option above. and note this one: the value of the environment variable is always added to the message header when it's not empty β€” even if the --extension option is not provided. sneaky but true πŸ‘‘


okay that's the whole page, you're officially certified πŸŽ“βœ¨ this was perl v5.42.3, dated 2026-07-20 β€” catch you on the next manual bestie, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from