On 09/08/2010 10:16 AM, Peter Barton wrote:
I have seen the RT-Extension-MandatorySubject plugin and this isgreat foropening tickets via the web interface. However, my company opens atleast90% of its tickets via email. Is there anything out that can enforce mandatory subjects on tickets opened via email?How would you do that? Sending a bounce back? -- which is notconvenient?What you can do is write a scrip on create to look for empty subjectand then insert one based on whatever criteria you want, eg requestor / sender email>address or the first line of the content etc ..Regards; RoyI would actually like to bounce the email back notifying the sender that the subject is required.
Personally I don't see a problem with sending a bounce to a person who sent an email without a subject either. I think the original email without a subject is inconvenient, so they deserve a bounce.
We send all of our RT email through procmail for some additional filtering like this and this is the section of our procmail that checks for missing subjects. It sends a copy of their original email back to them, with a subject saying that their ticket was rejected because the subject was missing. It also adds a message to the email body, but unfortunately it is appended so they may not see it. I haven't bothered to try to figure out a way to prepend it. I Bcc the bounces to my email address also, so I know when people do this and I can check to see if they resent the email with a subject.
~Jason
# # Check for missing or empty subjects: # ERRORS_TO="my.em...@domain.com" SUBJECT=`formail -xSubject: | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'` :0 c: * SUBJECT ?? ^^^^ | formail -I "Status: R" >>${MAILDIR}/noSubject :0 A |( formail -brkt -I"From: RT Ticket System <ticket-addr...@domain.com>" \ -I"Bcc: $ERRORS_TO" \ -I"Subject: RT email ticket rejected - NO SUBJECT."; \ echo "-------- RT Message --------"; \ echo "Your email ticket request will NOT be processed without a subject."; \ echo "Please include a subject in your email message above and resend it." \ ) | $SENDMAIL -oi -t :0 c: * SUBJECT ?? \(no subject\) | formail -I "Status: R" >>${MAILDIR}/noSubject :0 A |( formail -brkt -I"From: RT Ticket System <ticket-addr...@domain.com>" \ -I"Bcc: $ERRORS_TO" \ -I"Subject: RT email ticket rejected - NO SUBJECT."; \ echo "-------- RT Message --------"; \ echo "Your email ticket request will NOT be processed without a subject."; \ echo "Please include a subject in your email message above and resend it." \ ) | $SENDMAIL -oi -t
smime.p7s
Description: S/MIME Cryptographic Signature
RT Training in Washington DC, USA on Oct 25 & 26 2010 Last one this year -- Learn how to get the most out of RT!