From: Daniele Davolio on
Seems strange but I need to route a local and unknown to DNS domain, to
an internal SMTP server.
Here the situation: I have an internal mail server running postfix 2.3.8
and Courier Imap. The server is the official MX record for our company
domains.
I have also a fax server and we implemented the email2fax feature. The
fax server has his own SMTP server (Exim) and if I send an email
directly to it, the email is processed and sent as a fax.
Now, I'd like to send my email(2fax) to the official SMTP server
(postfix) and I need this email routed to the fax server SMTP.
The email(2fax) RCPT-TO is like "user(a)dest-fax-number.fax", es.
management(a)0123456789.fax. Right now the postfix reject this destination
because "Host or domain name not found. Name service error for
name=123456789.fax type=A: Host not found".

I'm not a postfix guru but I'm reading the docs. I configured a
/etc/postfix/transport file like this:

..fax smtp:[192.168.0.1]

where 192.168.0.1 is the IP address of the faxserver..
I tried some permission/restriction on main.cf but I can't selectively
accept email for the domain "0123456789.fax", thinking also that the
number part always change. I think email is bounced before to be ready
for the "transport" instructions. It's ok for me to trust my local
network but also I don't want to transform our SMTP in an open relay for
the outside world.

Can someone point me in the right direction on how to solve this dilemma?

Here my postconf -n:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
anvil_rate_time_unit = 5
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
local_transport = virtual
mailbox_size_limit = 0
message_size_limit = 51200000
mydestination = example1.com, localhost, example2.com
myhostname = mail.example1.com
mynetworks = 127.0.0.0/8, 192.168.0.0/24, 192.168.100.0/24
myorigin = /etc/mailname
recipient_delimiter = +
relay_domains = $mydestination
relayhost =
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_sender_restrictions = reject_non_fqdn_sender
reject_unknown_sender_domain
smtpd_tls_cert_file = /etc/courier/imapd.pem
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_domains = example1.com, example2.com
virtual_gid_maps = static:5000
virtual_mailbox_base = /home
virtual_mailbox_limit = 0
virtual_mailbox_maps = ldap:mastermail
virtual_uid_maps = static:5000

Thanks!