1

Topic: regex in postfix helo_access.pcre

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
====

Had email rejected from a verizon mail server:

2014-01-07T13:22:03.751839-05:00 linux01 postfix/smtpd[15742]: connect from unknown[206.46.173.5]
2014-01-07T13:22:03.861794-05:00 linux01 postfix/smtpd[15742]: NOQUEUE: reject: RCPT from unknown[206.46.173.5]: 554 5.7.1 <vms173005pub.verizon.net>: Helo command rejected: Go away, bad guy; from=<xxxxxxxx@verizon.net> to=<blah@blah.com> proto=ESMTP helo=<vms173005pub.verizon.net>
2014-01-07T13:22:03.934627-05:00 linux01 postfix/smtpd[15742]: disconnect from unknown[206.46.173.5]

I believe it was rejected because of this line in  /etc/postfix/helo_access.pcre

/^[0-9.]+$/     REJECT Go away, bad guy (not RFC compliant).

because the sending mailserver had numbers in it's name: helo=<vms173005pub.verizon.net>

i've changed this line in helo_access.pcre to one that should only catch actual IP addresses in teh helo

/\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4}\b/  REJECT Go away, bad guy (not RFC compliant).

thoughts?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: regex in postfix helo_access.pcre

I believe it was rejected by this one:

/verizon\.net$/             REJECT Go away, bad guy

Regular express '/^[0-9.]+$/' matches all digital numbers.

3 (edited by AshcorTech 2014-01-08 18:54:50)

Re: regex in postfix helo_access.pcre

ZhangHuangbin wrote:

I believe it was rejected by this one:

/verizon\.net$/             REJECT Go away, bad guy

Regular express '/^[0-9.]+$/' matches all digital numbers.

I didn't even see that verizon regex.  I'll have to look again.

Why would you set it to reject all verizon.net email?  They are a major ISP in the US.

4

Re: regex in postfix helo_access.pcre

AshcorTech wrote:

Why would you set it to reject all verizon.net email?  They are a major ISP in the US.

It was totally my fault, sorry about this trouble. It was fixed in iRedMail-0.8.6.

5

Re: regex in postfix helo_access.pcre

Not a problem, it was an easy fix.  Thanks for the fast response!