Secondary email addresses

Is there a way to add a second email address to RT Right now I have one email address itsupport@…
would like to add a second one example like testsupport@… Is this possible?


Typically you just edit the /etc/aliases file which maps addresses to RT queues and you should be good to go

You could have a different email setup, but thats the most common

You can also add these email addresses to the list RT knows it can send from and then add them to the individual queues too, so not only do you get multiple incoming email addresses going to different queues, but the correspondance/comments being emailed out from tickets in different queues can come from different email addresses.

Hi Green
Thanks for the response How would I go about doing that

First in your local config file (eg /opt/rt5/local/etc/ you need to have a line setting the configuration option $RTAddressRegexp that includes a pattern that matches all the addresses you’ll be sending out from RT. This is so that RT can recognise address it uses itself and help stop mail loops. This can be a Perl regular expression pattern. If you’re not familiar/comfortable with these there’s some some help in the RT wki to make a pattern from a simple list of email addresses. Once you’ve got this set up, flush the Mason cache and restart the web server as you do normally when making a config change.

Then as an admin user you can edit the individual queues (Admin->Queues->Select) and put the appropriate email address in for each of them. You can have different email addresses for correspondence and comments (though here we tend to use the same address for such queues). As long as your mail transfer agent knows how to send email from the address (which is outside of the scope of setting up RT and will depend heavily on your local mail system setup) then you should be ready to go.

Don’t forget that you still need to add the incoming entries as @knation pointed out - this is just to get outgoing email from queue based email addresses to work. You also need to make sure that your RT server can send from those addresses before you start changing the RT config. If your email system isn’t set up to accept traffic from the RT server then all of the above is worthless. Check first! :wink:

Hi GreenJimII
Thanks for all your help so far Have been able to receive emails from both addresses and they go into the correct queue Problem how is just sending out replies from the emails I am thing the problem lies with the $RTAddressRegexp I just think I am setting it up wrong as I really don’t understand the whole thing any way you can help have looked also at the wiki and just am lost on it Sorry hope you can help the 2 email addresses are as follows and

Thasnks in advance for all your help

If you go to one of your queues in Admin->Queues->Some queue you can see there is an entry for “reply address” that will set the reply-to header for outgoing emails from that queue

Update your local to have something like this in the $RTAddressRegexp:

Set($RTAddressRegexp , 'qr{^(?:(?:test123|support)\@jonhabbot\.qc\.ca)$}i);

You might need to flush your Mason cache and/or restart your webserver for the change to take effect.

Then if you want to add other ones with the same domain part in the future, just add them after support with vertical bar delimiters. For example if you wanted “” to be added, you’d use:

Set($RTAddressRegexp , 'qr{^(?:(?:test123|support|helpdesk)\@jonhabbot\.qc\.ca)$}i);

Note that the i in the regular expression means that this is case insensitive too.

there is also a tool that is just okay that you can use:

1 Like

Thanks, Guys for all your help so far but when I put in the RTAddressRegexp the site went down couldn’t access it any move when removed it site went back up not sure what went wrong there any ideas?


Try this - I think there was a rogue quote in there:

Set($RTAddressRegexp, qr{^(?:(?:test123|support)\@jonhabbot\.qc\.ca)$}i);

Thanks That looks like it fixed that problem both of you for your help on this matter

Thanks Again