Tryied to "whitelist" a SUN ILOM interface sending non-compliant mails
like this:

May 18 18:19:24 root1 postfix/smtpd[9998]: connect from mail1[80.XXX.XXX.XXX]
May 18 18:19:25 root1 postfix/smtpd[9998]: warning: Illegal address syntax from 
mail1[80.XXX.XXX.XXX] in MAIL command: <ilom-alert@192.168.250.110>
May 18 18:19:25 root1 postfix/smtpd[9998]: warning: Illegal address syntax from 
mail1[80.XXX.XXX.XXX] in MAIL command: <ilom-alert@192.168.250.110>
May 18 18:19:25 root1 postfix/smtpd[9998]: disconnect from mail1[80.XXX.XXX.XXX]


Clearly, the [] around the IP are missing.

So I added resolve_numeric_domain=yes to a specific smtpd listening on
port 10026 - since I don'T want to allo the []-less form globally:

localhost:10026
          inet  n       -       -       -        -      smtpd
          -o smtpd_client_restrictions=
          -o smtpd_helo_restrictions=
          -o smtpd_sender_restrictions=
          -o smtpd_recipient_restrictions=permit_mynetworks,reject
          -o smtpd_end_of_data_restrictions=
          -o mynetworks=127.0.0.0/8
          -o smtpd_authorized_xforward_hosts=127.0.0.0/8
          -o smtpd_authorized_xclient_hosts=127.0.0.0/8
          -o syslog_name=reinjection
          -o receive_override_options=no_unknown_recipient_checks
          -o content_filter=
          -o strict_rfc821_envelopes=no
          -o resolve_numeric_domain=yes
                                         
And then I tried:

root@mail2:/etc/postfix# telnet localhost 10026
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail2.charite.de ESMTP
HELO foo
250 mail2.charite.de
MAIL FROM:<ilom-alert@192.168.250.110>
501-5.1.7 Bad sender address syntax
501 5.1.7 Contact your postmaster/admin for technical assistance. Or send a fax 
to: +49 (0)30 450 7570600 containing: time (May 20 18:25:56), client 
(127.0.0.1) and server (mail2.charite.de).
quit
221 2.0.0 Bye
Connection closed by foreign host.

I was able to "fix" this using smtpd_command_filter like this:
/^MAIL FROM:<(.*)@([0-9.]+)>/           MAIL FROM:<$1@[$2]>

But why does resolve_numeric_domain=yes for port 10026 not work?

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein

Reply via email to