Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Posts
    60

    allowing mail with "undisclosed-recipients"?

    Hi all,
    How can I set up my server (FreeBSD 5.2 + Cpanel) to allow mail addresses only in the Bcc field? If I compose a message with the To: field empty and the Bcc: field populated, my server refuses to send the mail, yet if I use the same format and send through Google's SMTP servers, the message is sent and the receipients see
    To: undisclosed-recipients:;
    in their message.

    Any ideas?
    Cheers and hope you all had/are having a great holiday

  2. #2
    Join Date
    Aug 2005
    Location
    Make a guess
    Posts
    67
    examine /etc/exim.pl and if you know perl you should be able to make the changes you need for yourself.
    Shashank Wagh.
    Systems Administrator.
    http://www.shashank.net

  3. #3
    Join Date
    Jan 2005
    Posts
    60
    My perl is passable, but not great, but I figured out the matches are being made here
    Code:
       my ($receivedfor);
       my @RECPS;   
       my @HEADERS = split(/\n/, $headers);
       my ($header,$email);
       foreach $header (@HEADERS) {
          if ($header =~ /^to:/i) {
             my $line = $header;
             $line =~ s/^to: //ig;
             my @TRECPS = split(/[\,\;]/, $line);
             foreach(@TRECPS) { push(@RECPS,$_); }
          }
          if ($header =~ /^bcc:/i) {
             my $line = $header;
             $line =~ s/^to: //ig;
             my @TRECPS = split(/[\,\;]/, $line);
             foreach(@TRECPS) { push(@RECPS,$_); }
          }
          if ($header =~ /^cc:/i) {
             my $line = $header;
             $line =~ s/^to: //ig;
             my @TRECPS = split(/[\,\;]/, $line);
             foreach(@TRECPS) { push(@RECPS,$_); }
          }
          if ($header =~ /\tfor\s([^\;]+)/i) {
             $receivedfor = $1;
          }
       } 
    
       for(my $i=0;$i<=$#RECPS;$i++) {
          if ($RECPS[$i] =~ /\<(\S+)\>/) {
             $RECPS[$i] = $1
          } elsif ($RECPS[$i] =~ /\((\S+)\)/) {
             $RECPS[$i] = $1;
          }
       }
    
    
       my $matchdomain = 0;
       my $matchrecv = 0;
       foreach my $ldomain (@LD) {
          $ldomain =~ s/\n//g;
          next if ($ldomain !~ /\./);
          foreach my $recp (@RECPS) {
             if ($recp =~ /\@${ldomain}$/) {
                $matchdomain = 1;
             }
          }
          if ($receivedfor =~ /\@${ldomain}$/) {
             $matchrecv = 1;
          }
    
       }
    The thing is, as I see it, it's matching "to" and "bcc" and "cc" all in one (RECPS) and so it shouldn't matter if "to" is empty, so long as a valid address is in one of those fields. I'm probably wrong, but if so, why is it rejecting the message?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •