diff --git a/fhem/FHEM/75_MSG.pm b/fhem/FHEM/75_MSG.pm index a8f58c93e..b3a0e1e7a 100755 --- a/fhem/FHEM/75_MSG.pm +++ b/fhem/FHEM/75_MSG.pm @@ -134,6 +134,18 @@ s/^[\s\t]*([a-z,]*!?(screen|light|audio|text|push|mail)[a-z,!|]*)[\s\t]+// $types = $1; } + # programatic exception: + # e.g. recipients were given automatically from empty readings + if ( $msg =~ s/^[\s\t]*([!]?(([A-Za-z0-9%+._-])*@([,\-:|]+)))[\s\t]+// ) { + Log3 $globalDevName, 4, + "msg: recipient '$1' contains special characters like" + . " ',-:|' so message won't be sent. This might be okay, e.g. if you are" + . " using something like a reading from RESIDENTS/ROOMMATE/GUEST to" + . " address present or absent residents and this list is simply empty" + . " at this time. ($msg)"; + return; + } + # check for given recipients if ( $msg =~ s/^[\s\t]*([!]?(([A-Za-z0-9%+._-])*@([%+a-z0-9A-Z.-]+))[\w,@.!|:]*)[\s\t]+//