Creating tickets from mails without usercreation

I am running RT 3.8.4 on Debian under lighttpd and fast-cgi, connected
to a custom PostgreSQL database. That is working just fine, I even
tweaked the setup such that I have virtualised the RT setup.
I.e. I’m running multiple databases on multiple virtual webservers
to provide more RT instances.

If anyone is interested in the lighttpd setup, ask.

However, in trying to use it in the way I’d like to use it, I seem to
encounter some slight difficulties.

The intention is to use RT as the primary entry point for an info@
mailbox of an organisation. I tried looking this up on the RT-Wiki
and mailinglist, the descriptions were sketchy at best.

That means that:

  • There is going to be spam eventually (yes, we try to filter it out
    before reaching RT, but the filtering is bound to get worse over time).
  • I need the mails to go into RT as tickets immediately.
  • I would like to erase some tickets permanently from the repository and
    database (in case they are determined to be spam, keeping them in the
    database won’t work in the long run).
  • In order to keep database bloat to a minimum, the incoming mails should
    not create users automatically.
  • If creating users is inevitable on initial import of mails, then it should
    be possible for the user to be autoremoved again after the ticket which
    created them has been removed.
  • Ideally, at the time the tickets are moved (manually) from the incoming
    queue to a specific queue, a user should be created automatically (just
    like what happens currently), and the autoreply can be sent.
  • First receiving the mails in a separate mailbox and only then inserting
    the mails into the system one-by-one is not really an option
    because I have several persons which do the reading.

Is something like that possible without perl customisations?
If yes, how?
If no, any hints on where/how to implement it?
Sincerely,
Stephen R. van den Berg.

Mommy, what happens to your files when you die?

I am running RT 3.8.4 on Debian under lighttpd and fast-cgi, connected
to a custom PostgreSQL database. That is working just fine, I even
tweaked the setup such that I have virtualised the RT setup.
I.e. I’m running multiple databases on multiple virtual webservers
to provide more RT instances.

If anyone is interested in the lighttpd setup, ask.

However, in trying to use it in the way I’d like to use it, I seem to
encounter some slight difficulties.

The intention is to use RT as the primary entry point for an info@
mailbox of an organisation. I tried looking this up on the RT-Wiki
and mailinglist, the descriptions were sketchy at best.

That means that:

  • There is going to be spam eventually (yes, we try to filter it out
    before reaching RT, but the filtering is bound to get worse over time).
  • I need the mails to go into RT as tickets immediately.
  • I would like to erase some tickets permanently from the repository and
    database (in case they are determined to be spam, keeping them in the
    database won’t work in the long run).

erase using shredder

  • In order to keep database bloat to a minimum, the incoming mails should
    not create users automatically.
  • If creating users is inevitable on initial import of mails, then it should
    be possible for the user to be autoremoved again after the ticket which
    created them has been removed.

impossible, use shredder to erase spammers after.

  • Ideally, at the time the tickets are moved (manually) from the incoming
    queue to a specific queue, a user should be created automatically (just
    like what happens currently), and the autoreply can be sent.

you can disable autoreplies on main queue and send autoreplies when
ticket is moved to a queue.

  • First receiving the mails in a separate mailbox and only then inserting
    the mails into the system one-by-one is not really an option
    because I have several persons which do the reading.

Is something like that possible without perl customisations?
If yes, how?
If no, any hints on where/how to implement it?

Sincerely,
Stephen R. van den Berg.

Mommy, what happens to your files when you die?


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Best regards, Ruslan.

If anyone is interested in the lighttpd setup, ask.

If you could toss it up onto the Wiki, that’d be great. Searching the list for it would be second, if you decided to just email the instructions to rt-users. Updated, known-good info is always nice :slight_smile:

  • There is going to be spam eventually (yes, we try to filter it out
    before reaching RT, but the filtering is bound to get worse over time).

All incoming mail at our site is filtered by our mail server and has nothing to do w/our RT setup. I suppose you could add tighter, stricter filtering rules on top of your RT system but I think mail-filtering is best handled by your mail system.

But if you do decide to add additional filtering specifically for your RT system, we do it via procmailrc. Our mail system runs ClamAV and SpamAssasin (like most places.) It drops everything w/a Spam score of ## or more. I lower that threshold specifically for incoming RT tickets. You could further run a different spam filter (no sense running it through SpamAssasin twice), if you have a separate spam filter thing.

  • I need the mails to go into RT as tickets immediately.

I don’t know how immediate things are. But the delay for us has always been outside the RT system and is in the mail system. If our mail system gets bogged down for whatever reason, then that obviously slows email delivery to our RT system. But once it makes it to our RT system, it’s “immediate”.

  • I would like to erase some tickets permanently from the repository and
    database (in case they are determined to be spam, keeping them in the
    database won’t work in the long run).

As mentioned above, we score incoming tickets for spam. Anything with 10 and higher, we drop silently and it never makes it into our system. Anything over 7 gets re-routed to a “spam” queue, no autoreply. Anything under 7 makes it into the queue as normal. We do that, just-in-case a ticket gets scored high for some reason.

Anything in the spam queue automatically gets deleted after 72hours. Any spam/ticket that makes it into the real queue gets manually moved over by one of our staff into the spam queue (and then deleted after 72hours automatically.)

  • In order to keep database bloat to a minimum, the incoming mails should
    not create users automatically.
  • If creating users is inevitable on initial import of mails, then it should
    be possible for the user to be autoremoved again after the ticket which
    created them has been removed.

I don’t think you can NOT create a user/requestor. But you can delete all unprivileged users from the database, that have no tickets or anything else “related” to them. I think it’s built-in to RT 3.8.5 (maybe 384).

See http://www.gossamer-threads.com/lists/rt/users/87446

Use rt-shredder (part of RT now, no need for the RTx::Shredder thing anymore) via a cron job (or manually from the web GUI.)

  • Ideally, at the time the tickets are moved (manually) from the incoming
    queue to a specific queue, a user should be created automatically (just
    like what happens currently), and the autoreply can be sent.

This you can do. Get rid of the autoreply template for the incoming info@ queue. That way, nothing gets sent out on initial email receipt/ticket creation. Then, when you move a ticket from the info@ queue to the “real” queue, then set a Scrip to send a reply.

  • First receiving the mails in a separate mailbox and only then inserting
    the mails into the system one-by-one is not really an option
    because I have several persons which do the reading.

I’m guessing “separate mailbox” means a different email address, and “into the system” is referring to the RT system. I realize you say this isn’t the way you wanna do it, but it’s do-able. Have your mail incoming email address just be a normal mailbox. Have all your several staff people all IMAP into it and they can delete as they see fit, and then “bounce” that email into the RT system.

As for how immediate that would be, would depend on how quickly your staff work. I think this level of delay would be similar to the email going directly into the RT system and then waiting to be moved to the correct queue (and then getting the autoreply and presumably gets worked on.)

If no, any hints on where/how to implement it?

I think manually deleting the ticket out of the system if it’s a bad ticket, or moving it to the real queue if it’s a good ticket is best. Then delete unprivilged users that have no tickets associated with them.

PH

Paul Hirose : pthirose@ucdavis.edu : Sysadm Motto: rm -fr /MyLife
1034 Academic Surge : Programmer/Analyst : Backup Motto : rm -fr /
One Shields Avenue : Voice (530) 752-7181 : Robot, n.: Univ. Admin
Davis, CA 95616-8770 : Fax (530) 752-4465 : rec.pets.cat.anecdotes

  • If creating users is inevitable on initial import of mails, then it should
    be possible for the user to be autoremoved again after the ticket
    which created them has been removed.
    I agree: http://rt3.fsck.com/Ticket/Display.html?id=13758
    We have several special system users, and a user having no tickets
    is not an adequate filter for cleaning out lusers with Shredder, and it
    doesn’t offer appropriate limits so we have to be careful to manually
    uncheck each of them when shredding users.

Is something like that possible without perl customisations?
If yes, how?
If no, any hints on where/how to implement it?
http://wiki.bestpractical.com/view/SpamFiltering

Covers plenty of ways to handle SPAM. I just cleaned it up a bit
so it should be a bit easier to follow now.
Cambridge Energy Alliance: Save money. Save the planet.

  • If creating users is inevitable on initial import of mails, then it should
    be possible for the user to be autoremoved again after the ticket
    which created them has been removed.
    I agree: http://rt3.fsck.com/Ticket/Display.html?id=13758
    We have several special system users, and a user having no tickets
    is not an adequate filter for cleaning out lusers with Shredder, and it
    doesn’t offer appropriate limits so we have to be careful to manually
    uncheck each of them when shredding users.

Related to this automatic creation, I’m having a problem with people
thinking that they should log in with their username portion of their
email address. This leads to users having two accounts: one with and one
without the domain. I would like to enforce username == emailaddress.
How can I do this?

Note: I’m expecting the RT book to arrive any day, so if it’s in the book,
please kindly say what page.

David Griffith
dgriffi@cs.csubak.edu

Related to this automatic creation, I’m having a problem with people
thinking that they should log in with their username portion of their
email address. This leads to users having two accounts: one with and one
without the domain. I would like to enforce username == emailaddress.
How can I do this?

Note: I’m expecting the RT book to arrive any day, so if it’s in the book,
please kindly say what page.

How are you authenticating your users such that you’re letting them log
in with two names? You might want to look at WebCanonicalizeInfo in
lib/RT/Web.pm.

Related to this automatic creation, I’m having a problem with people
thinking that they should log in with their username portion of their
email address. This leads to users having two accounts: one with and one
without the domain. I would like to enforce username == emailaddress.
How can I do this?

Note: I’m expecting the RT book to arrive any day, so if it’s in the book,
please kindly say what page.

How are you authenticating your users such that you’re letting them log
in with two names? You might want to look at WebCanonicalizeInfo in
lib/RT/Web.pm.

I haven’t touched that file (lib/RT/Interface/Web.pm, by the way). The
problem with having two names is that Joe Bloggs’s account is “jbloggs”.
When Joe emails in a trouble ticket, RT attempts to make a new account
"jbloggs@foo.com". This is complicated by the fact that all the other
services in this company recognize users by their email only. Is the
solution simply to manually make sure that the username and email address
are the same?

David Griffith
dgriffi@cs.csubak.edu

I haven’t touched that file (lib/RT/Interface/Web.pm, by the way). The
problem with having two names is that Joe Bloggs’s account is “jbloggs”.
When Joe emails in a trouble ticket, RT attempts to make a new account
"jbloggs@foo.com".
That’s because your users are not configured properly. Set the user jbloggs’
email address to jbloggs@foo.com and RT will do the right thing and recognize
the message as being from jbloggs. There’s no need to have two accounts.

This permits, for instance, RT receive email on behalf of root from
blargle@example.com. Username and email address need have no
substring relationship as long as RT knows of both.

This is complicated by the fact that all the other services in this company
recognize users by their email only. Is the solution simply to manually
make sure that the username and email address are the same?
Convention is that privileged users have domainless usernames,
and unprivileged users have email addresses as usernames.

This is relied upon in simple search i.e; search for username gives ticket
owned by a user vs. search for addresses yield tickets requested by address.
etc. etc.

I haven’t touched that file (lib/RT/Interface/Web.pm, by the way). The
problem with having two names is that Joe Bloggs’s account is “jbloggs”.
When Joe emails in a trouble ticket, RT attempts to make a new account
"jbloggs@foo.com".
That’s because your users are not configured properly. Set the user jbloggs’
email address to jbloggs@foo.com and RT will do the right thing and recognize
the message as being from jbloggs. There’s no need to have two accounts.

This permits, for instance, RT receive email on behalf of root from
blargle@example.com. Username and email address need have no
substring relationship as long as RT knows of both.

I see. This leads me to another question: How do I delete a user?

David Griffith
dgriffi@cs.csubak.edu

I see. This leads me to another question: How do I delete a user?
Within the user’s profile you can disable it so that it does not accessible.

If you want to wipe the user from existence you have to twiddle the db
via Shredder in Admin>Tools. it’s a powerful tool though, be sure to
heed what
documentation is available. Also check the wiki.

Cambridge Energy Alliance: Save money. Save the planet.

I see. This leads me to another question: How do I delete a user?
Within the user’s profile you can disable it so that it does not accessible.

If you want to wipe the user from existence you have to twiddle the db
via Shredder in Admin>Tools. it’s a powerful tool though, be sure to
heed what documentation is available. Also check the wiki.

I’ve been fiddling with Shredder for the past hour. I can’t get anything
besides “executed plugin successfuly\nplugin returned empty list”.

David Griffith
dgriffi@cs.csubak.edu

A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?