Link to home
Start Free TrialLog in
Avatar of Doug Poulin
Doug PoulinFlag for Canada

asked on

Need help configuring postfix correctly

Having problems getting postfix set up correctly.
In my case the server has several virtual domains. I have a system API that sends out emails and I want any bouncebacks to come to it.  It's not the primary domain for the server.

Assuming abc.com is the primary domain and def.com is the one I need work, I have the following entries in various configuration files:

local-host-names:
def.com

access:
def.com OK

virtual
mail_notifier@def.com mail_notifier@localhost
(I've also tried)
mail_notifier@def.com mail_notifier

I can't use the primary domain because we use office 365 and the mail MX record points to microsoft not our server.  This is also our web server, so I can't mess with the primary domain address.

The error I get back is
Recipient address rejected. User unknown in virtual alias table.

All I want to do is collect the bouncebacks from the mail_notifier account so I can automate handling for the end users.  Any help is appreciated.
Avatar of Doug Poulin
Doug Poulin
Flag of Canada image

ASKER

Here's the content of postconf -n (if this helps)
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
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
html_directory = no
inet_interfaces = all
inet_protocols = all
local_recipient_maps = unix:passwd.byname $alias_maps
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
myhostname = host1.abc.com
mynetworks = 209.217.75.192/28, 209.217.83.48/29, 10.10.0.0/24
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
virtual_alias_domains = def.com


Also here';s the result from the postmap query

postmap -q mail_notifier@def.com virtual        
mail_notifier
ASKER CERTIFIED SOLUTION
Avatar of Doug Poulin
Doug Poulin
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial