Here's how I did it:
virtual_transport = regex:/etc/postfix/virtual
root@testmailm01:/etc/postfix# cat virtual
/system/ SystemsLog@example.com ###this allows you to send outbound logs to another server
/*/ webtest ###catch everything and drop it in the webtest mailbox
Our alpha test servers point to this box directly as their mail servers so that the developers can experiment with email addresses. In addition, our main SMTP servers have a transport directive:
[adminuser@smtpserver01 adminuser]$ cat /etc/postfix/transport
This allows the developers to test certain things in beta & prod environments by changing the @ to @testing.example.com, which redirects anything with that suffix to the above "test" mail server.
Hope that helps.
did you configure the transport_maps setting? standard "help me" information for postfix problems is the output from "postconf -n" and "cat /etc/postfix/transport". Additionally, if you can locate the full conversation with the error, that would help a lot.
if you can find one of the lines ("grep 'web58007.mail.re3.yahoo.com' /var/log/maillog" or possibly /var/log/mail.log)
Jul 26 21:30:01 fjdx421.example.cfx postfix/qmgr: 2FBBF17B433: to=<firstname.lastname@example.org>, relay=none, delay=0, status=deferred (delivery temporarily suspended: connect to oram101.example.cfx[172.18.52.101]: Connection refused)
the odd looking alphanumeric is the pseudo-unique identifier for that conversation, do a "grep 2FBBF17B433 /your/mail/logfile" and post that output as well
first off, I apologize...I was referencing transport maps previously and what you need to define is "virtual_alias_maps". It was correct in my first response but then, for some reason, my brain attached itself to transport_maps...getting old I guess.
Looking at your postconf output, you need to define:
postconf -e virtual_alias_maps = hash:/etc/postfix/virtual
postconf -e recipient_canonical = hash:/etc/postfix/recipient_canonical
then, edit /etc/postfix/virtual:
and then reload postfix with
Once that is done, you need to make sure you're correctly attaching to this mail server as it is likely not listed as an MX record anywhere. The easiest method of testing is to:
telnet <mail.server.addy> 25
A sample conversation with mostly bogus info:
Connected to testmailm01.example.cfx.
Escape character is '^]'.
220 testmailm01 ESMTP Postfix
mail from: email@example.com
250 2.1.0 Ok
rcpt to: firstname.lastname@example.org
250 2.1.5 Ok
354 End data with <CR><LF>.<CR><LF>
bla bla blah
250 2.0.0 Ok: queued as 9B4E820E249
The log entries from this conversation:
root@testmailm01:/etc/postfix# grep 9B4E820E249 /var/log/mail.log
Jul 27 08:37:17 testmailm01 postfix/smtpd: 9B4E820E249: client=someuser.example.cfx[172.18.47.102]
Jul 27 08:37:25 testmailm01 postfix/cleanup: 9B4E820E249: message-id=<20100727133717.9B4E820E249@testmailm01>
Jul 27 08:37:25 testmailm01 postfix/qmgr: 9B4E820E249: from=<email@example.com>, size=359, nrcpt=1 (queue active)
Jul 27 08:37:25 testmailm01 postfix/local: 9B4E820E249: to=<firstname.lastname@example.org>, orig_to=<email@example.com>, relay=local, delay=17, delays=17/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Jul 27 08:37:25 testmailm01 postfix/qmgr: 9B4E820E249: removed
I also have virtual_transport configured, although I'm not sure, after re-reading the description, why. Just in case it's required (try the above first, then add this if it's still not working). This box is semi-production, so I can't just go mucking about with the config to test stuff:
postconf -e virtual_transport = regex:/etc/postfix/virtual
The virtual file remains unchanged, although you always need to make sure you've postmap'd any files that are using the hash: statement with:
according to this:
Jul 28 20:17:18 rabbits postfix/smtpd: NOQUEUE: reject: RCPT from mail-wy0-f182.google.com[220.127.116.11]: 554 5.7.1 <firstname.lastname@example.org>: Relay access denied; from=<email@example.com> to=<firstname.lastname@example.org> proto=ESMTP helo=<mail-wy0-f182.google.com>
you're sending email to amamun.info, but your mydestination contains:
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = test.com
myhostname = rabbits.test.com
without a virtual, there's nothing in there that I can see that would allow your server to pickup email destined for @amamun.info. Depending on what you're wanting to do with the email, you need to either add that domain to your mydestination list, relay_domains, or as a virtual.