1

I'm not recieving error messages from my server, because they get bounced by my email provider for having an invalid "To:" address.

I have a working mail setup - I can use mail to send email addresses as root or myself, and they appear in my inbox from the address specified in /etc/email-addresses. It's a basic Debian smarthost setup.

root@statler:/etc/exim4# cat /etc/aliases
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: [personalemailaddress]
sandy: [personalemailaddress]

root@statler:/etc/exim4# cat /etc/email-addresses
# This is /etc/email-addresses. It is part of the exim package
...
root: [personalemailaddress]
sandy: [personalemailaddress]

root@statler:/etc/exim4# exim -brw root@statler
  sender: [personalemailaddress]
    from: [personalemailaddress]
      to: root@statler
      cc: root@statler
     bcc: root@statler
reply-to: [personalemailaddress]
env-from: [personalemailaddress]
  env-to: root@statler

How can I get exim to apply these aliases so the mail gets a valid address?

I'm using Debian bullseye.

sandyscott
  • 213
  • 3
  • 7
  • 1
    Related [answer](https://serverfault.com/a/916292/250204) on rewriting headers afterwards vs. avoiding producing inappropriate ones in the first place. – anx Jun 02 '23 at 19:37
  • "for having an invalid address" - so why not address that hostname/domain configuration directly, *before* it is written into messages then inappropriate for internet mail exchange? – anx Jun 02 '23 at 19:40
  • @anx Thanks for that link, that's helpful. However, I think my problem was caused by a typo, so I feel somewhat silly now. As for the question of why I'm doing it - it's basically the case described in that answer - It's a webserver (ie. not a mailserver) and if **any** bit of software sends a message to `root@host` I want to get it in my inbox, ideally without having to embed my email address in every config file. – sandyscott Jun 05 '23 at 20:35

0 Answers0