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.

This is an internal server (lets call it tools) on the same network as a set of test servers (for web applications). I want emails coming out of the test servers to arrive in the qa@tools account (no matter what their actual destination was). I do not want tools to forward anything anywhere.

I've got postfix and squirrelmail configured, and I can send mail to qa@tools just fine. Right now if I set the mail_host to tools on the web apps (on the test servers) - and they send mail to user@example.com via tools - tools will say 'no forwarding' and reject them. Which is fine, except that QA staff can't then examine them because they're lost.

I tried adding always_bcc = qa@tools to my /etc/postfix/main.cf ... but that didn't get me copies of those rejected emails.

There must be a simple answer?

share|improve this question

2 Answers 2

You can use recipient_canonical_maps to map all recipients, regardless of their original destination, to an address.

In main.cf:

recipient_canonical_maps = pcre:/etc/postfix/recipient_canonical.pcre

In /etc/postfix/recipient_canonical.pcre:

/.*/ qa@tools.yourdomain.com
share|improve this answer

Sounds like postfix has been misconfigured?

Could you maybe check the list of domains that postfix will listen and accept mail for? If it is configured to accept all mail destined for @tools, it should not complain about forwarding it on to anyone else.

share|improve this answer
    
I've edited my question a little for clarity. I don't want anything forwarded through this server, that behavior is correct. mydestination=tools ... I just want all mail dumped into the qa@tools account. –  EMiller Jan 31 '11 at 16:36
    
But if you don't want mail to be forwarded and you send a mail to tools server destined for @example.com, the tools server can only forward it on, because it is not supposed to process mail for example.com. –  sybreon Feb 1 '11 at 10:26

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.