0

I'm setting up sendmail on a machine with hostname 'foo', and FQDN 'foo.example.com'. My /etc/aliases contains

webmaster: me
me: me@somewhere-else.com

If I now try to send a test email, from 'foo', to 'webmaster', I find that:

  1. To: webmaster@example.com fails (the log output shows that sendmail does not attempt to do an aliases look-up)
  2. To: webmaster@foo.example.com succeeds (the email arrives at 'me@somewhere-else.com')
  3. To: webmaster succeeds (sendmail expands this to 'webmaster@foo.example.com', and does a lookup)

Is there some setting in sendmail.mc that will let me use form 1, ie. the alias without the hostname?

AnFi
  • 6,103
  • 1
  • 14
  • 27
QF0
  • 183
  • 1
  • 7

1 Answers1

2

Sendmail by default does aliases lookups for email in local email domains.
Most likely example.com is not treated/configured as local email domain.

To get list of configured and autoconfigured local email domains as root execute:

echo '$=w' | sendmail -bt

You can configure example.com as local email domain by adding it to /etc/mail/local-host-names file (one domain per line). Sendmail daemon requires restart or reload (sending it HUP signal) to notice the change.

AnFi
  • 6,103
  • 1
  • 14
  • 27