Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] Regualr expression in greylist.conf

2006-11-09 by Oliver Fromme

> I use milter greylist 3.0 rc7.
 > I have a problem to find the best regular expression for
 > french sub domain ( xxx.fr)
 > acl whitelist from /.*@.*\.fr/

You cannot use backslashes in regular expressions.
(Well, at least in milter-greylist 2.x, but I think
it didn't change in 3.x.)

 > For example the follow domain match with this ACL
 > home5353.freeserve.co.uk
 > 
 > I try this one, but it's the same:
 > acl whitelist from /.*@.*\.fr$/

As explained above, you should remove the backslash.
No other TLD ends with "fr", so it should be OK.
If you're paranoid, you can use /.*[.]fr$/ because
the "." loses its special meaning inside "[]".

Note that it is not recommended to match by sender email
addresses, because they can be easily forged (and in fact
they _are_ forged in many -- if not most -- cases of
spam).

If you want to check the TLD of the sending MTA, you
should better just write:

acl whitelist domain fr

The "domain" keyword performs a suffix match on the domain
name of the connecting MTA (as resolved by sendmail).

Best regards
   Oliver

PS:  Please don't post HTML-only messages to technical
public mailing lists.  You'll get more replies when using
plain text instead of HTML.

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"I invented Ctrl-Alt-Delete, but Bill Gates made it famous."
        -- David Bradley, original IBM PC design team

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.