On Thu, Sep 18, 2014 at 06:53:29PM +0200, Ray Davis wrote: > A customer wants a mail relay for testing to SAP applications. > It should take all relayed email and save it to a local mailbox > (or forward it to another email address) - but it should not actually > send the emails further to the recipient.
Does it have to be a "mailbox"? How do they intend to access the data? Another option might be to just "HOLD" the mail. > I know that sender_bcc_map can take car of saving the emails, > but how can I keep the server from sending the mail further? I > need an all_emails_from_sender_go_to_dev_null option? ;) If sender_bcc_maps generates an address with an inaccessible domain (foo@virtual.invalid, or some such), and that domain is in routed via transport_maps to the virtual(8) delivery agent (though virtual_mailbox_domains remains empty), then you can set: mydestination = virtual_mailbox_domains = virtual_mailbox_maps = ... address to mailbox table ... ... configure virtual uid and git ... local_transport = error:5.1.2 Mailbox unavailable virtual_transport = error:5.1.2 Mailbox unavailable relay_transport = discard:silently default_transport = discard:silently This assumes that all mail is to be handled this way. If for just specific recipient domains, then route just those domains to the discard transport: transport: virtual.invalid virtual example.com discard:silently -- Viktor.