0

I'm using postfix and a mail dns mail.mydomain.org

But now I am adding another virtual domain and I would like a mail dns for that as well, e.g. mail.mydomain.org and mail.newdomain.org.

I have added the mx records already for this new mail domain - but I don't know what I would change in my postfix config for both to work as mail.mydomain.org already occupies the space in the directives:

Here is an output of postconf -n:

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
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
mydomain = mydomain.org
myhostname = mail.mydomain.org
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_client_restrictions = permit_sasl_authenticated, reject_unauth_destination
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
soft_bounce = no
unknown_local_recipient_reject_code = 550
virtual_alias_domains = 
virtual_alias_maps = hash:/etc/postfix/virtual

Am I able to have multiple variables added for mydomain and myhostname?

1 Answer 1

1

You may want to look at the Postfix Virtual Domain Hosting Howto. You can use virtual_alias_domains to setup postfix to accept mails for multiple domains.

2
  • I see. That has helped a bit. I've added my 2 domains to this directive. But when I use the alias domain as a mail server, what comes up in the output returned from postfix is that it using whatever I list under the directive for myhostname. e.g. bounces are not returned by the alias domain, but by the myhostname. So if you send with mail.thisdomain.org (the virtual alias) it bounces with mail.myhostname.org - which isn't great. Any ideas? Sep 22, 2013 at 16:47
  • 1
    The best practice would be to prevent bounces at all and reject the mail right away. If the FROM address in the spam mail you are bouncing was forged you may spam someone else. I assume you bounce emails if the recipient is unknown on your system. This can be checked at receiving time with the config option smtpd_recipient_restrictions = reject_unverified_recipient. See postfix.org/ADDRESS_VERIFICATION_README.html
    – deflomu
    Sep 22, 2013 at 18:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .