----- Original Message ----- From: "Mxsmanic" <[EMAIL PROTECTED]> To: "Barry Byrne" <[EMAIL PROTECTED]>; "FreeBSD Questions" <[EMAIL PROTECTED]> Sent: Wednesday, December 18, 2002 7:19 PM Subject: Re: Getting Perl scripts to work as mail filters
> Heck, it's so simple I can list it here: > > --- > #!/usr/bin/perl > > while ($inputline = <STDIN>) > { > $inputline =~ s/18 Dec 2002/29 Dec 2013/; > print STDOUT $inputline; > } > --- A bit too simple, perhaps. :) STDOUT is irrelevant to sendmail here; because, as far as sendmail is concerned, your message has already been delivered, namely to the alias "mymail". And your log says so: "to="|/usr/home/mymail/mailman", ctladdr=mymail (1/0)" Indicating that the "controlling address" (ctladdr) is "mymail". If your recipient ("mymail") decides to output something, good for him, but sendmail is long since done with the delivery. If you want to use filters, more or less like you describe, have a look at: Sendmail::Milter > get deposited in my mailbox on the server. From what I can understand of > how this works, some program actually receives the messages from sendmail > (?) and deposits them in my /usr/home/$USER mailbox For that to happen, in a set-up where the alias is to deliver mail for "variable" users, you might, for instance, take a look at the "plussed users" facility in sendmail. But why re-invent the wheel? A program like procmail will more than likely do what you want. But even procmail, run from a .forward scheme, suffers from having difficulty extracting the intended recipient. Only if you define a Perl mailer can you solve that problem entirely, as you can parse sendmail variables like $f and $u to your delivery agent. - Mark To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message