File: patch.sendmail

package info (click to toggle)
sympa 2.6.1-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,940 kB
  • ctags: 1,069
  • sloc: perl: 8,446; makefile: 237; sh: 191; ansic: 172; lisp: 32
file content (22 lines) | stat: -rw-r--r-- 703 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
*** smtp.pm~	Tue Jun 29 17:21:03 1999
--- smtp.pm	Tue Sep 21 15:32:22 1999
***************
*** 67,72 ****
--- 67,83 ----
     my @t = $rcpt; \@t = $rcpt;
     do_log('debug2', '[smtpto] Msg from %s, %d rcpts',$from, $#t);
  
+    ## Escape "-" at beginning of recepient addresses
+    ## prevent sendmail from taking it as argument
+    if (ref($rcpt) eq 'SCALAR') {
+        $$rcpt =~ s/^-/\\-/;
+    }else {
+        my @emails = @$rcpt;
+        foreach my $i (0..$#emails) {
+ 	   $rcpt->[$i] =~ s/^-/\\-/;
+        }
+    }
+ 
     ## Check how many open smtp's we have, if too many wait for a few
     ## to terminate and then do our job.
     print STDERR "Open = $opensmtp\n" if ($main::opt_d);