Issue with command by email extension

I’m using RT v3.6.3 and I have commandByEmail v0.05 installed. I’m having
some issues when someone forwards or replies to a message. They randomly get
an email back that has Permission Denied in it. I believe that it has to do
with the fact that when you forward or reply toa message it puts the old
heading in the message such as:From: this persons email

To: this persons email

Subject: this persons subject

How does commandByEmail know to ignore this? Or doesn’t it? And if not, what
can I do to prevent this from being a problem in the future?

Thanks,

-Jeff

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

NM. Sorry to bother the list with this. It was a simple permissions issue.
Users only had permission to create tickets. For some reason I jumped to
conclusions about it being an issue with CommandByEmail. My bad. LFrom: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jeff Platter
Sent: Thursday, June 28, 2007 12:04 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Issue with command by email extension

I’m using RT v3.6.3 and I have commandByEmail v0.05 installed. I’m having
some issues when someone forwards or replies to a message. They randomly get
an email back that has Permission Denied in it. I believe that it has to do
with the fact that when you forward or reply toa message it puts the old
heading in the message such as:

From: this persons email

To: this persons email

Subject: this persons subject

How does commandByEmail know to ignore this? Or doesn’t it? And if not, what
can I do to prevent this from being a problem in the future?

Thanks,

-Jeff

This message has been scanned for viruses and
dangerous content by http://www.mailscanner.info/ MailScanner, and is
believed to be clean.

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Jeff Platter wrote:
[snip]

How does commandByEmail know to ignore this? Or doesnÂ’t it? And if not,
what can I do to prevent this from being a problem in the future?

Thanks,

-Jeff
[snip]
CommandByEmail has a rather simpleminded approach to parsing. Any 2
words starting at the beginning of a line separated by a colon are
treated as a command.

To deal with I use the attached perl script to filter out colons to
mail coming to rt queues exposed to the outside world. This could
easily be modified to add exceptions, other munging of the message, etc.

Robert G. Werner (Network Systems Administrator)
rwerner@usscript.com

559.244.3734

colon_filter.pl (2.32 KB)

Robert G. Werner wrote:

Jeff Platter wrote:
[snip]

How does commandByEmail know to ignore this? Or doesn’t it? And if
not, what can I do to prevent this from being a problem in the future?

Thanks,

-Jeff
[snip]
CommandByEmail has a rather simpleminded approach to parsing. Any 2
words starting at the beginning of a line separated by a colon are
treated as a command.

To deal with I use the attached perl script to filter out colons to mail
coming to rt queues exposed to the outside world. This could easily be
modified to add exceptions, other munging of the message, etc.
[snip]
Oops, I needed to clarify my script’s use of SpamAssassin. I’m not
actually calling it in this script because all of my mail is already
checked on arrival at the gateway. That is why I can check the
X-Spam-Score header without ever creating a SA object.

Robert G. Werner (Network Systems Administrator)
rwerner@usscript.com

559.244.3734

colon_filter.pl (2.48 KB)

Robert G. Werner wrote:

To deal with I use the attached perl script to filter out colons to mail
coming to rt queues exposed to the outside world. This could easily be
modified to add exceptions, other munging of the message, etc.

Notice that AFAIK the regex you are using ‘s/^(\w+):(.*)$/${1}${2}/;’ will
not catch the command that is used to set custom field values.

CF.{customer}: MrEd

Because I use the interface to set custom fields, I check also against the
next one. Sure it will not catch everything, but it works for me.

elsif ( $_ =~ /(^CF.{.}):(.)/ ) {
$_ = ${1}.${2};
}

If someone knows a better way to catch really everything, please let me know.

Friendly,
Andreas

Andreas Ittgenshorst wrote:
[snip]

Because I use the interface to set custom fields, I check also against the
next one. Sure it will not catch everything, but it works for me.

elsif ( $_ =~ /(^CF.{.}):(.)/ ) {
$_ = ${1}.${2};
}

If someone knows a better way to catch really everything, please let me know.

Friendly,
Andreas
[snip]
Excellent catch, Andreas!!! I haven’t been using Custom Fields yet
so I haven’t hit that yet. But I probably will.

I’ll add your line to my script.

Robert G. Werner (Network Systems Administrator)
rwerner@usscript.com

559.244.3734