newaliases(1) not doing anything?

I have updated my /etc/mail/aliases file and ran newaliases(1). However, I don't seem to be getting anything out. I noticed that /etc/aliases was a symlink to /etc/mail/aliases and the /etc/mail/aliases.db didn't seem to update at all. I finally removed the symlink and the db file but now I still get no output and the files aren't recreated. I've tried it without the last line, too, but that didn't seem to make a difference. I had read that * allows all uncaught entries to go there. I do notice that newaliases(1) finishes instantaneously. I am configured to use Dragonfly Mail Agent if that makes a difference (the one in base).

My /etc/mail/aliases is as follows with the email addresses being changed:

INI:
# $FreeBSD$
#    @(#)aliases    5.3 (Berkeley) 5/24/90
#
#  Aliases in this file will NOT be expanded in the header from
#  Mail, but WILL be visible over networks.
#
#    >>>>>>>>>>    The program "newaliases" must be run after
#    >> NOTE >>    this file is updated for any changes to
#    >>>>>>>>>>    show through to sendmail.
#
#
# See also RFC 2142, `MAILBOX NAMES FOR COMMON SERVICES, ROLES
# AND FUNCTIONS', May 1997
#     http://tools.ietf.org/html/rfc2142

# Pretty much everything else in this file points to "root", so
# you would do well in either reading root's mailbox or forwarding
# root's email from here.

root: admin@mydomain.tld
russell: russell@mydomain.tld

# Basic system aliases -- these MUST be present
MAILER-DAEMON: postmaster
postmaster: root

# General redirections for pseudo accounts
_dhcp: root
_pflogd: root
auditdistd: root
bin: root
bind: root
daemon: root
games: root
hast: root
kmem: root
mailnull: postmaster
man: root
news: root
nobody: root
operator: root
pop: root
proxy: root
smmsp: postmaster
sshd: root
system: root
toor: root
tty: root
usenet: news
uucp: root

# Well-known aliases -- these should be filled in!
# manager:
# dumper:

# BUSINESS-RELATED MAILBOX NAMES
# info:
# marketing:
# sales:
# support:

# NETWORK OPERATIONS MAILBOX NAMES
abuse: root
# noc: root
security: root

# SUPPORT MAILBOX NAMES FOR SPECIFIC INTERNET SERVICES
ftp: root
ftp-bugs: ftp
# hostmaster: root
# webmaster: root
# www: webmaster

# NOTE: /var/msgs and /var/msgs/bounds must be owned by sendmail's
# DefaultUser (defaults to mailnull) for the msgs alias to work.
#
# msgs: "| /usr/bin/msgs -s"

# bit-bucket: /dev/null
# dev-null: bit-bucket

*: root
 
Code:
sendmail   /usr/libexec/dma
send-mail  /usr/libexec/dma
mailq      /usr/libexec/dma
newaliases /usr/libexec/dma
rmail      /usr/libexec/dma
hoststat   /usr/bin/true
purgestat  /usr/bin/true
Seem pretty simple, but maybe that's the key?
 
Oh! This is probably relevant, but I have been "replacing" files. To try to make sure I keep my setups easier to determine and replicate, I have been keeping changed config files in a git repo and symlinking them. However, I thought that could be an issue then removed the symlink and hard copied the files there but still can't get it going.

Currently:
Code:
lrwxr-xr-x  1 root  wheel  uarch 12 Sep  8 09:51 /etc/aliases@ -> mail/aliases
-rw-r--r--  1 root  wheel  uarch 1630 Sep  8 00:54 /etc/mail/aliases
lrwxr-xr-x  1 root  wheel  uarch 72 Sep  7 23:11 /etc/mail/mailer.conf@ -> symlink to file
 
Seem pretty simple, but maybe that's the key?
No, it looks fine. On 14.0 mailer.conf is even smaller.

Code:
# cat /etc/mail/mailer.conf
#
# mailer.conf for use with dma(8)
#
# If sendmail is configured, an example of mailer.conf that uses sendmail
# instead can be found in /usr/share/examples/sendmail.

sendmail        /usr/libexec/dma
mailq           /usr/libexec/dma
newaliases      /usr/libexec/dma

The important one, in this case, is the newaliases line. When people replace sendmail with something else they often forget to modify mailer.conf(5). If it wasn't updated properly it would try to run sendmail(8) instead of dma(8).
 
dma's newaliases seems a no-op
it does not need a db, it just uses the flat file
Code:
[21:18:10] [linsux!root]~#/usr/libexec/dma  foo  </dev/null
dma: invalid recipient `foo'
[21:18:15] [linsux!root]~#echo "*:root" >>/etc/aliases
[21:18:25] [linsux!root]~#/usr/libexec/dma  foo  </dev/null
 
okay, so the problem is though that when I send mail to "root" or "russell" it then goes out to SendGrid as "root@none" or "russell@none" instead of the email address I would expect. What am I missing? Seems like I'm looking in the wrong area. :)
 
Back
Top