Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

we have an internal test-server that uses real, live mail addresses to send out status mails sometimes. We don't want these mails to end up with our users but for different reasons we can't use a catch_all solution and we only have the one available mail server. What we need is a way to forward incoming mail from any domain not specified in relay_domains to a specified mailbox.

share|improve this question
    
what MTA are we talking about? –  Greeblesnort Oct 22 '09 at 13:34
add comment

2 Answers 2

If the incoming mails to a specific user then you can add those guys to the relayed domains and set up a forwarding to each of them.

share|improve this answer
    
Thing is that the number of possible email domains is too large and all are unknown to us. So instead, we need to forward all mails, except for all mails to specific domains. –  Frode Svendsen Oct 22 '09 at 10:52
add comment

probably you can use recipient_canonical_maps.

Have a look here: http://www.postfix.org/rewrite.html

If there is no simply way adding relay domains negated into that map, you can build a large regular expression which contains all your relay domains negated to put into a special mailbox.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.