diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm
index 344e71a898..8f60e70fa9 100644
--- a/C4/SIP/Sip/MsgType.pm
+++ b/C4/SIP/Sip/MsgType.pm
@@ -331,6 +331,19 @@ sub handle {
my $config = $server->{config};
my $self;
+ # Set system preference overrides, first global, then account level
+ # Clear overrides from previous message handling first
+ foreach my $key ( %ENV ) {
+ delete $ENV{$key} if index($key, 'OVERRIDE_SYSPREF_') > 0;
+ }
+ foreach my $key ( keys %{ $config->{'syspref-overrides'} } ) {
+ $ENV{"OVERRIDE_SYSPREF_$key"} = $config->{'syspref-overrides'}->{$key};
+ }
+ foreach my $key ( keys %{ $server->{account}->{'syspref-overrides'} } ) {
+ $ENV{"OVERRIDE_SYSPREF_$key"} =
+ $server->{account}->{'syspref-overrides'}->{$key};
+ }
+
#
# What's the field delimiter for variable length fields?
# This can't be based on the account, since we need to know
diff --git a/etc/SIPconfig.xml b/etc/SIPconfig.xml
index 7cf4dfadf7..687e6bb27c 100644
--- a/etc/SIPconfig.xml
+++ b/etc/SIPconfig.xml
@@ -61,6 +61,9 @@
+
+ 0
+
@@ -101,4 +104,13 @@ in our case "ILS".
retries="5" />
+
+
+
+ 0
+
+