[Mimedefang] filter feedback desired
Kevin A. McGrail
kmcgrail at pccc.com
Tue Dec 30 22:08:50 EST 2003
I would disagree. Opening the HEADERS file to get information that is very
easily already in a variable seems very redundant. While your mailserver
might be small, this is just pure evil (tm).
Additionally, your test below would fail in the case of something like:
Trying to match bert at bob.com
email from robert at bob.com would match as well.
Though David did point out you would have to do something akin to a better
regular expression since the $Recipients can be in the Format akin to
"Isaiah" <zoratu at zoratu.com>. Someone on this list has got to have a quick
sanitize routine to extract the email address from the header since I don't
have one handy that is tested.
Regards,
KAM
----- Original Message -----
From: "Isaiah" <zoratu at zoratu.com>
To: <mimedefang at lists.roaringpenguin.com>
Sent: Tuesday, December 30, 2003 9:37 PM
Subject: Re: [Mimedefang] filter feedback desired
> Given the information you provided, it seems it would be much easier to
do:
>
> if (open(HDRS, "<./HEADERS")) {
> while(<HDRS>) {
> if (/^From.*email\@address/i) {
> $TAG = 1;
> last;
> } else {
> $TAG = 0;
> }
> }
> close(HDRS);
> }
> if ($TAG) {
> action_add_header("X-Orig-Rcpts", join(", ",
@Recipients));
> foreach $recip (@Recipients) {
> delete_recipient($recip);
> }
> add_recipient('email at address');
> }
>
> Thanks for all the helpful information; you guys are great!
>
> David F. Skoll wrote:
> > On Tue, 30 Dec 2003, Kevin A. McGrail wrote:
> >
> >
> >>#Change Sender case to all lower case to confirm the check is absolute a
1:1
> >>check
> >>if (lc($Sender) eq "email at address") {
> >
> >
> > You need to check for angle-brackets also. And Perl will not like
> > "email at address"; try 'email at address' instead.
> >
> > --
> > David.
> > _______________________________________________
> > Visit http://www.mimedefang.org and http://www.canit.ca
> > MIMEDefang mailing list
> > MIMEDefang at lists.roaringpenguin.com
> > http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
> >
>
> _______________________________________________
> Visit http://www.mimedefang.org and http://www.canit.ca
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>
More information about the MIMEDefang
mailing list