rt-mailgate(1)

πŸ“¦
version 4.4.7 Β· 5 versions
, in ubuntu noble

✨ rt-mailgate(1) ✨

okay so bestie, you're looking at the manual page for rt-mailgate, from the Request Tracker Reference, and honestly? it's giving mail gateway energy and it's iconic. let's get into it πŸ’…


🌸 NAME 🌸

rt-mailgate β€” the mail gateway for Request Tracker. she's the go-between, the bridge, the girl who carries your emails into RT's DMs. fr fr πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

first up, the lil self-care invocation where she just tells you about herself:

rt-mailgate --help : this text

and then the main character version, the one your MTA actually runs:

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

the --action and --queue and --url bits are the ones that are not optional, bestie. everything in brackets is a vibe you can add but don't have to. 🌈


πŸ’– OPTIONS πŸ’–

  • --action β€” tells the gateway what actually happens to the email that lands on this alias. the basic actions are correspond and comment. but there's more, and which ones exist depends on your local @MailPlugins configuration β€” so like, take or resolve might be available, it's giving local config energy. <br> you can also stack actions on one single message by smushing them together with a - separated list. RT runs them in the order you listed them, no cap. so like, take-comment, correspond-resolve, or take-comment-resolve are all valid moves. ✨ <br> ⚠️ heads up: take and resolve ignore message text if used alone. so if you want RT to actually record the incoming message, you gotta include a comment or correspond action too. don't forget, bestie. <br> the default action is correspond.
  • --queue β€” this flag decides which queue the alias creates a ticket in if no ticket identifier is found. so if the email doesn't already know where it belongs, this is where it goes. 🎯
  • --url β€” this one tells the mail gateway where to find your RT server. and like, you should probably use the same URL that your users use to log into RT, because that's the whole point, right? <br> also! if you have a self-signed SSL certificate, you might need to pass --ca-file or --no-verify-ssl (both below πŸ‘‡).
  • --ca-file path β€” specifies the path to the public SSL certificate for the certificate authority that should be used to verify the website's SSL certificate. lowkey important: if your webserver uses a self-signed certificate, you should prefer this option over --no-verify-ssl, because it makes sure that the self-signed certificate the mailgate is seeing is the right self-signed certificate. it's the careful, responsible choice. πŸ’œ
  • --no-verify-ssl β€” this flag tells the mail gateway to trust all SSL certificates. all of them. regardless of if their hostname matches the certificate, and regardless of CA. it's giving trust issues but in reverse 😭 this is required if you have a self-signed certificate, or some other certificate which is not traceable back to a certificate your system ultimately trusts.
  • --extension OPTIONAL β€” okay so some MTAs will route mail sent to user-foo@host or user+foo@host to user@host and then present foo in the environment variable $EXTENSION. by specifying the value queue for this parameter, the queue this message should be submitted to will be set to the value of $EXTENSION. by specifying ticket, $EXTENSION will be interpreted as the id of the ticket this message is related to. and action will let the user specify either comment or correspond in the address extension. three flavors, pick your fave. πŸ“
  • --debug OPTIONAL β€” prints debugging output to standard error. she's loud, she's transparent, she's telling you everything. 🫢
  • --timeout OPTIONAL β€” configure the timeout for posting the message to the web server. the default timeout is 3 minutes (180 seconds). so like, 180 seconds of patience, and then she's done.

πŸ¦‹ DESCRIPTION πŸ¦‹

the RT mail gateway is the primary mechanism for communicating with RT via email. periodt.

this program simply directs the email to the RT web server, which handles filing correspondence and sending out any required mail. so rt-mailgate isn't doing the heavy lifting herself, she's the messenger, the girl in the group chat forwarding the screenshots.

it's designed to be run as part of the mail delivery process β€” either called directly by the MTA or by procmail, or dropped into a .forward or equivalent. very set-it-and-forget-it of her. πŸ’…


🌈 SETUP 🌈

so much of the set up of the mail gateway depends on your MTA and mail routing configuration. like, that's just the reality of it. πŸ€·β€β™€οΈ

you need to route mail to rt-mailgate for the queues you're monitoring. for instance, if you're using /etc/aliases and you have a bugs queue, you will 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 the best part? you don't have to run your RT server on your mail server, because the mail gateway will happily relay to a different machine. long-distance relationship but it works πŸ’–


⭐ 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. and note this: 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. so she does it automatically, no permission needed. πŸ‘‘


remember bestie: the vibe changes, the facts never do. every flag, every default, every path β€” all of it stays exactly where it is. πŸ’…

and that's the whole page, babe. πŸŽ€ this was perl v5.38.2, dated 2023-10-29, and it's the rt-mailgate(1) manual page from the Request Tracker Reference. mwah πŸ’‹

πŸ“¦ where this page comes from