Discussion:
Recipient_canonical_maps problem
(too old to reply)
m***@gmail.com
2013-12-13 16:07:54 UTC
Permalink
Hello,

I have a problem with my recipient_canonical_maps; I m using a fax service by mail, and my users will use printers to send fax by mail only with fax number.

Printers are configured to use SMTP proxy (postfix), and I configured recipient canonical_maps, to rewrite fax number with the domain of the fax service.

For this test, I have created a script who send a mail with fax number recipient only (without domain).

you can check my config here :

--- Main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no
append_at_myorigin = yes

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

resolve_numeric_domain = yes
readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
transport_maps = hash:/etc/postfix/transport
myhostname = vd-smtp
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = vd-smtp , localhost
# relayhost =
mynetworks = 127.0.0.0/8
[::ffff:127.0.0.0]/104
[::1]/128
172.16.0.0/20
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4

recipient_canonical_maps = regexp:/etc/postfix/rcpt_canonical

--- rcpt_canonical
/^([0-9][1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])$/ $(1)@example.com

--- POSTMAP Result :
postmap -q 0666666666 regexp:/etc/postfix/rcpt_canonical
***@exemple.com

All things seems to be OK, but when i am sending a mail with a fax number recipient I have this error :

vd-smtp postfix/smtpd[27092]: connect from unknown[172.16.10.206]
vd-smtp postfix/smtpd[27092]: 2627C4BE7A: client=unknown[172.16.10.206]
vd-smtp postfix/smtpd[27092]: warning: Illegal address syntax from unknown[172.16.10.206] in RCPT command: <>
vd-smtp postfix/smtpd[27092]: disconnect from unknown[172.16.10.206]

So i need you help for resolution of that ? if it possible...

Thank & Regards

Mickael.
Lemat
2013-12-23 11:07:13 UTC
Permalink
Post by m***@gmail.com
Hello,
I have a problem with my recipient_canonical_maps; I m using a fax service by mail, and my users will use printers to send fax by mail only with fax number.
Printers are configured to use SMTP proxy (postfix), and I configured recipient canonical_maps, to rewrite fax number with the domain of the fax service.
For this test, I have created a script who send a mail with fax number recipient only (without domain).
--- Main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
append_at_myorigin = yes
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
resolve_numeric_domain = yes
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
transport_maps = hash:/etc/postfix/transport
myhostname = vd-smtp
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = vd-smtp , localhost
# relayhost =
mynetworks = 127.0.0.0/8
[::ffff:127.0.0.0]/104
[::1]/128
172.16.0.0/20
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
recipient_canonical_maps = regexp:/etc/postfix/rcpt_canonical
--- rcpt_canonical
postmap -q 0666666666 regexp:/etc/postfix/rcpt_canonical
vd-smtp postfix/smtpd[27092]: connect from unknown[172.16.10.206]
vd-smtp postfix/smtpd[27092]: 2627C4BE7A: client=unknown[172.16.10.206]
vd-smtp postfix/smtpd[27092]: warning: Illegal address syntax from unknown[172.16.10.206] in RCPT command: <>
vd-smtp postfix/smtpd[27092]: disconnect from unknown[172.16.10.206]
It seems that your fax is trying to send email to empty recipient.
Loading...