[Avcheck] Scan only mails for some domains?
Karsten Dambekalns
k.dambekalns@tu-bs.de
Tue, 6 Nov 2001 21:57:57 +0100
On Tue, Nov 06, 2001 at 09:51:27PM +0300, Michael Tokarev wrote:
> Karsten Dambekalns wrote:
> [Do you subscribed to avcheck list? (to stop sending
> you duplicates)...]
Yes, I am subscribed.
> > arrays), heh! Thanks :-) I changed the case to use egrep, to have case
> > insensitivity.
>
> This is tricky to done correctly. If you'll write e.g.
> echo "$i" | egrep ...
> then it is possible to have bad effects. Postfix *usually* not allows
> you to have recipients that starts with `-' (allow_min_users=no), but if
> you'll change this setting in the future... This is why `case' is more
> safe than echo|egrep.
Hmmm. What would happen if the recipient would start with '-' in
such a case?
OK, my other solution would have been the use of tr (echo "$i" | tr
[A-Z] [a-z]). Would this suffer from the same problem as the above
mentioned egrep soultion?
> ;). Look into avcheck manpage. Avcheck will set $SENDMAIL to point
> to whatether (re)injection path was configured in master.cf -- so yes,
> this is $SENDMAIL.
Ah. I see.
> > OK, we didn't remove the stuff which should not be checked, did we? I
> > mean, $* still has all the addresses, including the ones sorted out
> > above. Or am I wrong here? Shouldn't there be a part removing the
> > recipients that don't want their mail checked...
> ...
> set -- "${check_rcpt[@]}"
Ha! Learnt something again! :o)
> (Note here and in any other place. Both quotes and usage of `@' instead
> of `*' is essential -- this way you can safly deal with any (strange)
> recipients you'll ever have.).
Yup, figured that.
> Remember -- the example `infected' scripts are examples only (while
> them are ready to run) -- I'm shure them are required to be changed
> to suit any particular needs (or even rewritten from scratch).
I adapted them quite a lot already, changing the messages, etc. But I
would say they are very functional "out of the box". Which is a Good
Thing (tm), by the way.
Thanks for the quick and enlightening help!
Regards,
Karsten
--
Why do we have to hide from the police, daddy?
Because we use emacs, son. They use vi.
-----------------------------
mailto:k.dambekalns@tu-bs.de wł: http://www.k-fish.de/
gpg: http://www.k-fish.de/mykeys.gpg