Hello list,

I'm trying to figure out how case sensitivity works in a check_recipient_access regexp table (Postfix 2.6.6).
This is my main.cf:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_min_user = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
disable_vrfy_command = yes
html_directory = no
inet_interfaces = 10.1.1.1
inet_protocols = ipv4
local_recipient_maps =
local_transport = error:local delivery is disabled
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 27962028
mydestination =
mydomain = domain.tld
myhostname = mx.domain.tld
mynetworks =
    127.0.0.0/8,
    10.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
parent_domain_matches_subdomains =
    debug_peer_list,
    fast_flush_domains,
    mynetworks,
    permit_mx_backup_networks,
    qmqpd_authorized_clients
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relay_domains = domain.tld
relay_recipient_maps =
relay_transport = relay:[10.1.1.2]
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP Service Ready
smtpd_discard_ehlo_keywords = dsn
smtpd_helo_required = yes
smtpd_recipient_restrictions =
    reject_non_fqdn_sender,
    reject_non_fqdn_recipient,
    reject_unknown_sender_domain,
    reject_unauth_destination,
check_recipient_access regexp:/etc/postfix/check_recipient_access.regexp,
    check_client_access cidr:/etc/postfix/check_client_access.cidr,
    reject_rbl_client zen.spamhaus.org=127.0.0.[2;3;4;5;6;7]
unknown_local_recipient_reject_code = 550


/etc/postfix/check_recipient_access.regexp:
    /^test@domain\.tld$/i    REJECT wrong format


I run a 'postmap check_recipient_access.regexp' and 'service postfix reload' every time the file changes.

I've read manpages at http://www.postfix.org/regexp_table.5.html about the use of the 'i' flag, but I'm surely missing something.
Expectations:

inbound mail, recipient: t...@domain.tld -> "Recipient address rejected: wrong format" inbound mail, recipient: t...@domain.tld -> (accepted, because of the 'i' flag that toggles case sensitivity ON, from the default OFF)

Reality:

inbound mail, recipient: t...@domain.tld -> "Recipient address rejected: wrong format" inbound mail, recipient: t...@domain.tld -> "Recipient address rejected: wrong format"


Is there a way to get the result I desire, that is filtering with a regexp that takes into account the case of the recipient address?


Thank you very much.

Fabio

Reply via email to