postfix on loxcal network - smtpd_sender_restrictions problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

postfix on loxcal network - smtpd_sender_restrictions problem

jcdole
Helo.

I am testing sender address syntax with :

smtpd_sender_restrictions = check_sender_access
pcre:/etc/postfix/sender_syntax.pcre, reject

And the file /etc/postfix/sender_syntax.pcre contains :

/^([a-zA-Z0-9.\-_]+)@troll-hathor.nwk$/   OK

/^\@/ REJECT 510 Invalid address format.

/[!%\@].*\@/ REJECT 511 This server disallows weird address syntax.

/.*/                   REJECT You can't send E-Mails from this server.

When I test the lookup table with :
postmap -q [hidden email]@example.com
pcre:/etc/postfix/sender_syntax.pcre

I got this :
REJECT 511 This server disallows weird address syntax.

Which I am expecting.

But when I send a mail via telnet :
telnet my_mailsrv.my_domain.com  25
EHLO MY_ASUS.my_domain.com
MAIL FROM:[hidden email]@my_domain.com
rcpt to:[hidden email]
DATA
Subject: TELNET  FULLSMTP PORT 25 - Mon, 24 Sep 2018 19:27:18 +0200 - to
[hidden email]

This is a test mailing with TELNET on PORT 25 from
[hidden email]@my_domain.com to [hidden email]

fullsmtp : 'mailsrv.my_domain.com'  25
fullname : '[hidden email]@my_domain.com'  -->  '[hidden email]'
.

The mail is send.
But it should be rejected with : REJECT 511 This server disallows weird
address syntax.

Looking at systemd logs, it seems that [hidden email]@my_domain.com is
convert to  "[hidden email]"@my_domain.com    and truncated to  
[hidden email]

postfix/smtpd[13269]: check_mail_access: [hidden email]@my_domain.com
............
postfix/smtpd[13269]: rewrite_clnt: local:
"[hidden email]"@my_domain.com -> "[hidden email]"@my_domain.com
...........
postfix/smtpd[13269]: rewrite_clnt: local:
"[hidden email]"@my_domain.com -> "[hidden email]"@my_domain.com
..........
postfix/smtpd[13269]: dict_pcre_lookup: /etc/postfix/sender_syntax.pcre:
[hidden email]
...........
postfix/smtpd[13269]: maps_find: pcre:/etc/postfix/sender_syntax.pcre:
pcre:/etc/postfix/sender_syntax.pcre(0,lock|fold_fix|utf8_request):
[hidden email] = OK
...........
postfix/smtpd[13269]: mail_addr_find: [hidden email] -> OK
............
postfix/smtpd[13269]: check_table_result:
pcre:/etc/postfix/sender_syntax.pcre OK [hidden email]

What am i missing ?

Any help is welcome.





-----
Thank you for helping
________
Opensuse Leap 15
--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Thank you for helping
________
Opensuse Leap 15