3

Is there a way to make a global alias in Sendmail so it would send email to all users? I tried to create an alias and included the list of all my users, but when I try to process it by m4, I receive an error that the line is too long.

Alec T
  • 463
  • 1
  • 9
  • 20

1 Answers1

2

The sendmail FAQ would be a good start. (and was the first hit one Googling "sendmail all users" ...)

There is no magic short-cut for this. But it is not hard to set up: create an aliases entry in /etc/aliases

alluser: :include:/etc/mail/allusers

Don't forget to run newaliases. Then list your users, one per line, in the file /etc/mail/allusers. You might be able to do that with

awk -F: '$3 > 100 { print $1 }' /etc/passwd > /etc/mail/allusers

HBruijn
  • 72,524
  • 21
  • 127
  • 192