Hi, newbie here, apologies in advance.
I have a virtual setup with a virtual domain (example.com), users and aliases working well. Recent experimentation using shell "mail" from mailutils on the local system has presented me the following problem.

Mail sent to external addresses, like gmail, has the sender listed as w...@example.com—good because a reply will be delivered to my virtual mailbox and not to the local inbox. Mail sent to a virtual address also has the sender listed as w...@example.com—also good. Mail sent to a local user (such as r...@host.example.com), too, has the sender listed as w...@example.com—not good, because a reply will be directed to my virtual inbox and not my local inbox. What I would is for the sender to be w...@host.example.com, in this case.

I am using masquerade_domains to get the effect of rewriting the sender fqdn from host.example.com to just example.com, but I don't want this rewriting to occur for mail between local mailboxes. I have tried smtp_generic_maps instead which for me will rewrite the sender for mail to gmail.com but not mail to a virtual address.

Postconf below. Thanks and will gladly provide any more details.

broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
dovecot_destination_recipient_limit = 1
home_mailbox = .maildir/
html_directory = no
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_domains = $mydomain
myhostname = host.example.com
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
relayhost = mail.isp.com
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem
smtpd_tls_key_file = /etc/ssl/private/postfix.pem
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = dovecot


Reply via email to