[Mimedefang] perl expression to catch bad recipient addresses?
Tony Nugent
tony at linuxworks.com.au
Fri Nov 23 18:44:19 EST 2001
Has anyone got a perl expression that is failsafe to catch a badly
malformed recipient email address? (ie, to check that an email
address is at least syntatically valid).
I'm asking here because I really need something failsafe and
watertight, legal characters, correct syntax etc. eg, I assume
that such a check would need to take into account if the
recipient has an unqualified (ie, locally deliverable) address?
It is a relatively simple thing that I want to achieve... quarantine
and then discard any email that has a bad email recipient address.
These emails would bounce anyway, this would cut out that
unnecessary step.
It would be nice to be able to remove only the bad/illegal
recipient addresses from a list when there are multiple, but my
understanding is that it is not possible to successfully re-write
the recipient address list from the defang filter itself.
Viruses in particular are notorious for generating bad recipient
addresses (often containing 8-bit characters), sometimes dozens at a
time from a single source (we are an ISP). Our preferred policy is
to allow the infected email through, but with the virus attachments
replaced with a warning -- but unfortunately they can generate a lot
of unnecessary mailer-daemon bounces.
Thanks.
Cheers
Tony
More information about the MIMEDefang
mailing list