[rt-users] (ab)use of --extension with rt-mailgate

Carl Vincent c.a.vincent at newcastle.ac.uk
Thu Aug 19 11:42:29 EDT 2010


I've had a situation for a while where mail sent to several addresses all goes to the same queue, but I'd like to set ownership automatically based on which address it was actually sent to. Also I'd like to keep the address->owner mapping out of RT, ideally in the aliases file where the address->queue mapping is.

When looking to see if I could hack on rt-mailgate to enable this to happen, I found the code for the --extension parameter could put stuff into the X-RT-Mail-Extension header of the message. It only seems to be documented for certain values, but it will allow anything to go into the header.

So I've implemented a solution where my aliases file says:

bob: "|/path/to/rt/bin/rt-mailgate --queue Main --action correspond --url http://rt.example.org/ --extension for-bob"

And an on-create scrip that checks for the header and if it matches /^for-(\w+)/, try and give ownership to the matched value as a username.

Since this isn't a documented use of this feature, I'd like some community feedback. So is it one or more of the below:

a) That's stupid - there's an easier way to do that which is...

b) That's gonna break if you upgrade to a future version (We're currently on 3.8.2)

c) That's a massive security hole

d) That's pretty neat, can you put it up in the wiki?



     Carl Vincent             http://www.netskills.ac.uk/ (URL)
     Systems Manager                       0191 222 5003 (voice)
     Netskills, Newcastle University       0191 222 5001  (fax)
                 Netskills is a JISC Advance service
        Training  -  Development  -  Research  -  Innovation

More information about the rt-users mailing list