root@ina:/etc/postfix # cat generic /^(.*)@ina\.leonerd\.org\.uk$/ $[email protected] root@ina:/etc/postfix # cat main.cf myhostname = ina.leonerd.org.uk myorigin = ina.leonerd.org.uk mydomain = leonerd.org.uk # Rewrite mailer-daemon -> postmaster -> root -> leo, etc. # TODO: Does this even do anything? alias_maps is for local delivery, of which we have none alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases relayhost = mail.leonerd.org.uk smtp_generic_maps = regexp:/etc/postfix/generic # No local delivery thus forcing all mail to go to relay mydestination = local_transport = error:local delivery is disabled inet_interfaces = loopback-only root@ina:/etc/postfix # mail root Subject: Test with regexp generic map Cc: Null message body; hope that's ok root@ina:/etc/postfix # tail /var/log/mail.log Oct 21 16:06:25 ina postfix/pickup[5945]: 3B7E7645F: uid=0 from=<root> Oct 21 16:06:25 ina postfix/cleanup[5950]: 3B7E7645F: message-id=<[email protected]> Oct 21 16:06:25 ina postfix/qmgr[5946]: 3B7E7645F: from=<[email protected]>, size=326, nrcpt=1 (queue active) Oct 21 16:06:25 ina postfix/smtp[5952]: 3B7E7645F: to=<[email protected]>, orig_to=<root>, relay=mail.leonerd.org.uk[81.187.167.226]:25, delay=0.56, delays=0.2/0.01/0.07/0.28, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as D04FF1BDC3) Oct 21 16:06:25 ina postfix/qmgr[5946]: 3B7E7645F: removed ###### Return-Path: <[email protected]> X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on cel.leo X-Spam-Level: X-Spam-Status: No, score=-2.9 required=4.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 X-Original-To: [email protected] Delivered-To: [email protected] Received: from ina.leonerd.org.uk (ina.leo [192.168.42.27]) by cel.leonerd.org.uk (Postfix) with ESMTP id D04FF1BDC3 for <[email protected]>; Fri, 21 Oct 2011 16:06:16 +0100 (BST) Received: by ina.leonerd.org.uk (Postfix, from userid 0) id 3B7E7645F; Fri, 21 Oct 2011 16:06:25 +0100 (BST) To: [email protected] Subject: Test with regexp generic map Message-Id: <[email protected]> Date: Fri, 21 Oct 2011 16:06:25 +0100 (BST) From: root <[email protected]>