I'm using Ubuntu 12.04 with postfix configured as satellite system that relays outgoing mail to Gmail. For sake of example, my registered domain is example.com I want root cronjobs' error output to be mailed to my real firstname.lastname@example.org inbox. I have this relay working correctly.
But these root cronjobs are set by default to email to email@example.com which isn't a real email address. I have in my
example.com isn't listed in postfix's main.cf's
mydestination so postfix doesn't think this mail is local. It bypasses processing via
/etc/aliases and tries to send to firstname.lastname@example.org.
A workaround is adding
MAILTO=david at the top of each cron file. But there are many. Another workaround is to setup email@example.com as a real inbox that forwards to firstname.lastname@example.org. Is there a better way? I.e. is there a way to relay emails that have local domains but still process their addressee with