Furor Teutonicus blog | over | volg | teuto | lyme | archief | doneer | todo
🕰️
  ⬩  
✍️ Evert Mouw
  ⬩  
⏱️ 0 min

Sending to localhost aliases and outside addresses with default a domain name using Postfix on Debian; working config

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:

postfix

/etc/hosts

127.0.0.1 localhost mercurius mercurius.spacedomain.net

/etc/mailname

mercurius.spacedomain.net

/etc/aliases

postmaster:     root
root:   explorer@moonbase.org

/etc/postfix/main.cf

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

echo test | mail -s test root

Deze blogpost werd in december 2022 overgezet van WordPress naar een methode gebaseerd op Markdown; het is mogelijk dat hierbij fouten of wijzigingen zijn ontstaan t.o.v. de originele blogpost.