[rt-users] Mandatory Subject - EMail

Kenneth Marshall ktm at rice.edu
Wed Sep 8 10:48:03 EDT 2010


On Wed, Sep 08, 2010 at 10:41:32AM -0400, Jason A. Smith wrote:
> On 09/08/2010 10:16 AM, Peter Barton wrote:
>>>>
>>>> I have seen the RT-Extension-MandatorySubject plugin and this is
>> great for
>>>> opening tickets via the web interface.  However, my company opens at
>> least
>>>> 90% 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 not
>> convenient?
>>> What you can do is write a scrip on create to look for empty subject
>> and then insert one based on whatever criteria you want, eg requestor /
>> sender email>address or the first line of the content etc ..
>>
>>> Regards;
>>> Roy
>>
>> I 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.email at 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-address at 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-address at 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
> 
> 

In principle, an informative bounce is okay. Unfortunately, it can
be taken advantage of by unscrupulous mailers to send SPAM messages
to other E-mail addresses with the consequent impact to your mail
reputation and ability to send E-mail from your domain to others.
If you restrict such bounces to local authenticated E-mail, then
you can minimize the risk through the use of accountability.

Cheers,
Ken



More information about the rt-users mailing list