— door Evert Mouw
How to send to both local users (like
root
) from cronjobs, and to outside addresses with a default domain added that actually also passes SPF checks.
Related problems / information:
- Set up postmaster using Postfix
- Get postfix to forward root’s mail
- postfix /etc/mailname
- Postfix address masquerading
/etc/hosts
1 |
127.0.0.1 localhost mercurius mercurius.spacedomain.net |
/etc/mailname
1 |
mercurius.spacedomain.net |
/etc/aliases
1 2 |
postmaster: root root: explorer@moonbase.org |
/etc/postfix/main.cf
1 2 3 4 5 6 7 |
myorigin = mercurius.spacedomain.net masquerade_domains = spacedomain.net append_dot_mydomain = no myhostname = mercurius.spacedomain.net alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = $myhostname, localhost, localhost.localdomain |
TEST
1 |
echo test | mail -s test root |