LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sendmail >> Aliases >> where do you set the admin e-mail address? (https://www.linuxquestions.org/questions/linux-newbie-8/sendmail-aliases-where-do-you-set-the-admin-e-mail-address-622604/)

bskrakes 02-20-2008 05:31 PM

Sendmail >> Aliases >> where do you set the admin e-mail address?
 
Hi there,

I am not a total newb but I am new to the configuration of Sendmail and how the whole aliases setup works. I can view my aliases file in /etc/aliases but I want to know where you set the admin's e-mail. For example you might have admin@yourdomain.com set as the receiver of all mail from the server. Where can I find this setting, what file is it in and what directory? I may have missed it.

I did do a
Quote:

grep -lr "admin@yourdomain.com " *
on the /etc/aliases but nothing popped out at me, and anything that did didn't have the setting I was looking for.

Thanks!

gilead 02-20-2008 05:45 PM

Most administration mail on your box will end up being addressed to root. In the aliases file you will probably see that mailer-daemon's mail goes to postmaster and postmaster's mail goes to root. You'll also see a lot of system account names listed with their mail going to root.

To make reading root's mail easier, you can add an alias at the end of the file diverting root's mail to your account. If you do, you'll need to run the newaliases command afterwards to update the aliases database.

bskrakes 02-20-2008 05:51 PM

So would it be
Quote:

root: user@yourdomain.com
at the end of the aliases file? I noticed that on one of our servers this is commented out.... and yes I won't forget to run the newaliases.

Thank you!

gilead 02-20-2008 06:02 PM

Yes, that's right. That should send all of root's mail to user@yourdomain.com

bskrakes 02-21-2008 10:42 AM

The alaises file should look something like this one along with the addition of the user I want to send the e-mails to - then I want to run "newaliases," via the command line or a terminal, correct?

Quote:

#
# Aliases in this file will NOT be expanded in the header from
# Mail, but WILL be visible over networks or from /bin/mail.
#
# >>>>>>>>>> The program "newaliases" must be run after
# >> NOTE >> this file is updated for any changes to
# >>>>>>>>>> show through to sendmail.
#

# Basic system aliases -- these MUST be present.
mailer-daemon: postmaster
postmaster: root

# General redirections for pseudo accounts.
bin: root
daemon: root
adm: root
lp: root
sync: root
shutdown: root
halt: root
mail: root
news: root
uucp: root
operator: root
games: root
gopher: root
ftp: root
nobody: root
radiusd: root
nut: root
dbus: root
vcsa: root
canna: root
wnn: root
rpm: root
nscd: root
pcap: root
apache: root
webalizer: root
dovecot: root
fax: root
quagga: root
radvd: root
pvm: root
amanda: root
privoxy: root
ident: root
named: root
xfs: root
gdm: root
mailnull: root
postgres: root
sshd: root
smmsp: root
postfix: root
netdump: root
ldap: root
squid: root
ntp: root
mysql: root
desktop: root
rpcuser: root
rpc: root
nfsnobody: root

ingres: root
system: root
toor: root
manager: root
dumper: root
abuse: root

newsadm: news
newsadmin: news
usenet: news
ftpadm: ftp
ftpadmin: ftp
ftp-adm: ftp
ftp-admin: ftp
www: webmaster
webmaster: root
noc: root
security: root
hostmaster: root
info: postmaster
marketing: postmaster
sales: postmaster
support: postmaster


# trap decode to catch security attacks
decode: root

# Person who should get root's mail
#root: marc
root: user@yourdomain.com
Thanks Steve!

gilead 02-21-2008 04:45 PM

Yep - that's it :)


All times are GMT -5. The time now is 08:39 PM.