On Wed, Jun 20, 2018 at 11:44:23AM -0400, Ruben Safir wrote:
> On Wed, Jun 20, 2018 at 09:54:54AM -0400, Wietse Venema wrote:
> > Ruben Safir:
> > > Hello
> > > 
> > > I have a new domain on my server and I want certain accounts to 
> > > be sent out with the new domain, rather than the default.  I have it
> > > set up at the moment so that any domain that you try to send though
> > > get rewritten to the default, mrbrklyn.com.  But I'd like this new
> > > domain to be allowed through.
> > 
> > What you ask for is Postfix default behavior: don't rewrite addresses
> > when forwarding email. So whatever you did to force Postfix to
> > always rewrite, you'd have to make an exception. The details of
> > making that exception depend on what you are doing now.
> > 
> 
> Well, there are two parts to this
> 
> The first part is for incoming email.  If I get email to a specific
> user, c...@newcorp.com , it should be accepted and the MTA should relay
> it a user ceo or an alias mysuer.  It should reject anything other than 
> newcorp.com or mrbrklyn.com on the incoming mail
> 
> On the outgoing mail, I want it to continue to default all outgoing mail
> to be from mrbrklyn.com regardless of the host it comes from within the
> network.  But I want certain accounts to turn over to newcorp.com (again
> regardless of the host from within the network it is sent from).  No
> other domains should go through other than mrbrklyn.com or newcorp.com
> 
> and obviously it shouldn't relay email.
> 
> relavent settings in main.cf that I have I think are
> 
> mydomain = mrbrklyn.com
> unknown_local_recipient_reject_code = 550
> local_recipient_maps = unix:passwd.byname $alias_maps
> 
> 
> masquerade_domains = mrbrklyn.com, mrbrklyn.com
> masquerade_exceptions = root
> mydestination = www.mrbrklyn.com, www2.mrbrklyn.com, home.mrbrklyn.com,
> mrbrklyn.com, nylxs.com, brooklyn-living.com, freedon_it.com
> myhostname = mrbrklyn.com
> mynetworks_style = subnet
> relayhost = 
> 
> alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
> canonical_maps = hash:/etc/postfix/canonical
> relocated_maps = hash:/etc/postfix/relocated
> sender_canonical_maps = hash:/etc/postfix/sender_canonical
> transport_maps = hash:/etc/postfix/transport
> 
> 
> mailbox_command = /usr/bin/procmail
> 
> strict_rfc821_envelopes = yes
> smtpd_helo_required = yes
> 
> smtpd_client_restrictions = reject_rbl_client dnsbl.sorbs.net
> 
> smtpd_helo_restrictions = permit_mynetworks, reject_invalid_hostname,
> regexp:/etc/postfix/helo.regexp, permit
> 
> 
> smtpd_sender_restrictions = hash:/etc/postfix/access,
> reject_unknown_sender_domain
> 
> smtpd_recipient_restrictions = 
>    check_client_access hash:/etc/postfix/helo_client_exceptions
>    check_sender_access    hash:/etc/postfix/sender_checks,
>    reject_invalid_hostname,
>    reject_non_fqdn_hostname,
>    reject_non_fqdn_sender,
>    reject_non_fqdn_recipient,
>    reject_unknown_sender_domain,
>    reject_unknown_recipient_domain,
>    permit_mynetworks,
>    reject_unauth_destination,
>    permit_mynetworks, reject_unauth_destination, 
>    reject_invalid_hostname,
>    reject_non_fqdn_hostname,
>    reject_non_fqdn_sender,
>    reject_non_fqdn_recipient,
>    reject_unknown_sender_domain,
>    reject_unknown_recipient_domain,
>    reject_rbl_client zen.spamhaus.org, 
>    reject_rbl_client bl.spamcop.net
>    reject_rbl_client cbl.abuseat.org,
>    permit
> 
> virtual_alias_domains = hash:/etc/postfix/virtual
> virtual_alias_maps = hash:/etc/postfix/virtual
> 
> ~~~~~~~~~~~~~~~~~~~~`
> 
> /etc/postfix/virtual is empty
> /etc/postfix/canonical is empty
> /etc/postfix/relay is empty
> 


I get this when sending email to the new domain

2018-06-20T12:10:14.319765-04:00 www2 postfix/smtpd[13841]: NOQUEUE:
reject: RCPT from l2mail1.panix.com[166.84.1.75]: 454 4.7.1
<ru...@newcorp.com>: Relay access denied;
from=<mrbrk...@panix.com> to=<ru...@newcorp.com> proto=ESMTP
helo=<l2mail1.panix.com>

Reply via email to