Don't corrupt manual entries in smtpd_recipient_restrictions
authorJamie Cameron <jcameron@webmin.com>
Sun, 10 Jul 2011 00:00:01 +0000 (17:00 -0700)
committerJamie Cameron <jcameron@webmin.com>
Sun, 10 Jul 2011 00:00:01 +0000 (17:00 -0700)
postfix/save_sasl.cgi

index c2c9067..8f4f2e2 100755 (executable)
@@ -38,13 +38,13 @@ if (!$in{'login_none'}) {
 %newrecip = map { $_, 1 } split(/\0/, $in{'sasl_recip'});
 foreach $o (&list_smtpd_restrictions()) {
        if ($newrecip{$o}) {
-               push(@recip, $o);
+               push(@recip, $o) if (&indexof($o, @recip) < 0);
                }
        else {
                @recip = grep { $_ ne $o } @recip;
                }
        }
-&set_current_value("smtpd_recipient_restrictions", join(" ", &unique(@recip)));
+&set_current_value("smtpd_recipient_restrictions", join(" ", @recip));
 
 # Save SSL options
 if ($postfix_version >= 2.3) {