---
name: "Mail::Milter::Module::HeloRegex"
section: "3pm"
platform: "linux"
package: "libmail-milter-perl"
version: "0.07-2"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/Mail::Milter::Module::HeloRegex"
---

# Mail::Milter::Module::HeloRegex(3pm)

milter to accept/reject connections with certain HELO values

## NAME

Mail::Milter::Module::HeloRegex - milter to accept/reject connections with certain HELO values

## SYNOPSIS

```
    use Mail::Milter::Module::HeloRegex;
    my $milter = new Mail::Milter::Module::HeloRegex('^foo\.com$');
    my $milter2 = &HeloRegex('^foo\.com$'); # convenience
```

## DESCRIPTION

This milter module rejects entire SMTP connections if the connecting client issues a HELO command matching user-supplied regular expressions.  Note that only the initial word of the HELO string is tested; any EHLO parameters are not checked by the regexes.

## METHODS

new(REGEX\[, ...\])

Accepts one or more regular expressions, as strings or qr// precompiled regexes.  They are tested in sequence, and the first match terminates checking.

set\_message(MESSAGE)

Sets the message used when rejecting messages.  This string may contain the substring `%H`, which will be replaced by the matching HELO parameter.

This method returns a reference to the object itself, allowing this method call to be chained.

## AUTHOR

Todd Vierling, \<tv@duh.org\> \<tv@pobox.com\>

## SEE ALSO

Mail::Milter::Object

## POD ERRORS

Hey! **The above document had some coding errors, which are explained below:**

- Around line 69:

  You can't have =items (as at line 81) unless the first thing after the =over is an =item
