On 8/2/2011 9:31 AM, Jason Gauthier wrote:
> Greetings,
> 
> Due to a new business requirement, I need to make a change with postfix that 
> I am not certain how to handle.
> First, I use postfix as a relay only system.  It does not do local delivery.  
> Once it does it's tasks it passes the email to a backend email system.
> On the frontend, postfix handles several domains, and will bounce unknown 
> email by using relay_recipients:
> relay_recipient_maps = hash:/etc/postfix/relay_recipients
> 
> relay_recipients is populated from backend from legitimate email addresses.  
> These makes the postfix system a nice 'bouncer' for unknowns :)
> 
> Now, my requirements have changes.  I have acquired a domain, we'll call it 
> xyz.com.   I don't host it, and never have.  Therefore, I do not know what 
> email addresses are valid.  I would like to capture *any* email address sent 
> to xyz.com and accept it, and deliver it somehow.
> 
> I'm not sure how to accomplish this task yet, and looking for ideas.  One 
> inchoate idea I have, is translating all the email address to 'xyz.com' to an 
> existing, valid, email address.
> 

[We use the term "reject" rather than "bounce".  Reject means your
server never accepts the undeliverable mail, which is good.  Bounce
means you accept the mail and then return it to the (frequently
forged) sender address, which is bad.  Bouncing undeliverable mail
will clog up your mail server with undeliverable messages and will
eventually get you blacklisted.]



First, to accept mail for that domain add the new domain to
relay_domains.
# main.cf
relay_domains =
   ... exiting domains ...
   xyz.example


Since you don't have a list of valid recipients for that domain, add
a wildcard for that domain to relay_recipient_maps and use recipient
address verification.
http://www.postfix.org/postconf.5.html#relay_recipient_maps
http://www.postfix.org/ADDRESS_VERIFICATION_README.html#recipient

# relay_recipient
... existing entries ...
@xyz.example   OK


# main.cf
smtpd_recipient_restrictions =
  permit_mynetworks
# permit_sasl_authenticated
  reject_unauth_destination
  check_recipient_access hash:/etc/postfix/verify_xyz
  ... other existing stuff ...

# verify_xyz
xyz.example  reject_unverified_recipient



Finally, to direct the accepted mail to the proper server, use a
transport_maps entry
http://www.postfix.org/postconf.5.html#transport_maps
http://www.postfix.org/transport.5.html

# main.cf
transport_maps = hash:/etc/postfix/transport

# transport
xyz.example  relay:[ip.add.re.ss]



  -- Noel Jones

Reply via email to