 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
barefootguru
Joined: 10 Aug 2007 Posts: 195
|
|
E-mails with empty subject being eaten |
|
I have an e-mail trigger job with Subject=* and Body=*
Everything works as expected except when a user sends an e-mail with an empty subject or body--then it's deleted from the mailbox but the job is never triggered. So it seems '*' is trying to match one-or-more rather than zero-or-more (per regular expressions).
In the meantime I've instructed users to always supply a subject and body but would be nice to have this apparent bug fixed in a future release.
24x7 MultiPlatform 4.1 273, JVM 1.4.2_16-b05
Cheers
|
|
Wed Oct 15, 2008 5:16 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7952
|
|
|
|
I checked this issue and can confirm that your observation is correct. "*" mask doesn't work against empty subjects. It means basically 1 or more characters.
However there is a way to deal with empty subjects too. In place of the mask you can enter a regular expression that would validate both an empty text and any text as good. The syntax for regular expressions used in email filters is the same as for regular expressions used in file masks for file-watch jobs.
Please see http://www.softtreetech.com/support/phpBB2/viewtopic.php?t=22235&highlight=regex for more info
|
|
Thu Oct 16, 2008 11:50 am |
|
 |
barefootguru
Joined: 10 Aug 2007 Posts: 195
|
|
|
|
I can't get a regular expression to work with a null subject either. For the subject and body I used
 |
 |
@REGEX:.* |
Which should match any character zero or more times...
|
|
Thu Oct 16, 2008 3:23 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7952
|
|
|
|
If the subject is null, I don't think anything can be done to "match" it. However if the subject is an empty string or string with spaces, it can be matched using something like
@REGEX:.?
Here ? makes the previous character optional. This will work for both empty and non empty subjects (but not for nulls). By 'null subject' I mean cases when subject line is not present in the message header. Most email clients generate that line automatically regardless of whether the subject is empty or not.
Hope this helps, yet I haven't specifically tested the suggested solution.
|
|
Thu Oct 16, 2008 7:47 pm |
|
 |
barefootguru
Joined: 10 Aug 2007 Posts: 195
|
|
|
|
By null I meant no subject typed in rather than a missing 'Subject:' line in the raw message.
I couldn't get @REGEX:.? to work. It processed an empty subject and single character ('a') subject, but ate a longer one--which is to be expected from '?' as it matches one or zero times...
We'll stick with training our users and hopefully the '*' will be changed to match empty subject/body in a future release.
|
|
Thu Oct 16, 2008 10:09 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|