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 email@example.com inbox. I have this relay working correctly.
But these root cronjobs are set by default to email to firstname.lastname@example.org 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 email@example.com.
A workaround is adding
MAILTO=david at the top of each cron file. But there are many. Another workaround is to setup firstname.lastname@example.org as a real inbox that forwards to email@example.com. Is there a better way? I.e. is there a way to relay emails that have local domains but still process their addressee with