The mail server is set up so that we can host multiple domain names with one server. This is called Virtual Hosting. Mailman uses the same set up.
Basically, the virtusertable is how we host multiple domain names with one mail server.
Mail comes in, goes through /etc/mail/virtusertable
and then through /etc/mail/aliases
.
To set up an alias on moog, both /etc/mail/virtusertable
and /etc/mail/aliases
must be edited and commands need to be run.
/etc/mail/virtusertable
and add a section for the new alias. For example:
joyuen@e3s-center.org joyuen_e3s joyuen@e3s_center.org joyuen_e3s joyuen@e3scenter.org joyuen_e3s
/etc/mail/aliases
:
joyuen_e3s: joyuen@eecs.berkeley.edu(See also How do I create a group mailing list on a non-workgroup site?)
joyuen_e3s: marys@eecs.berkeley.eduThis makes it easier to test out the email alias below.
/etc/mail/virtusertable
:
cd /etc/mail make newaliases /usr/bin/pkill -HUP -x -u 0 sendmailNote that we have to run make so that
/etc/mail/virtusertable
is combined with other files. See Adjusting sendmail for backscatter
expn
command to expand the email alias.
expn emailaddress@host
. The alias should be expanded.
[root@moog ~]# telnet localhost 25 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 moog.eecs.berkeley.edu ESMTP Sendmail 8.14.4/8.14.4; Wed, 4 Sep 2013 23:55:09 -0700 expn e3sprograms@e3s-center.org 250 2.1.5 <lkmarlor@berkeley.edu> quit 221 2.0.0 moog.eecs.berkeley.edu closing connection Connection closed by foreign host.If the above does not work, edit
/etc/mail/sendmail.cf
, find the line that says:
O PrivacyOptions=authwarnings,novrfy,noexpn,restrictqrunremove
noexpn
, run
/usr/bin/pkill -HUP -x -u 0 sendmailand retry the telnet command.
sendmail.cf
and add noexpn
back and rerun /usr/bin/pkill -HUP -x -u 0 sendmail
/etc/mail/aliases
to point to the proper people,
newaliases
Note that for @truststc.org
aliases,
virtusertable
should use @trust.eecs.berkeley.edu
. I'm not sure why, but this was probably because trust.eecs was a cname in DNS instead of a MX and A record. Or, trust was not included in the sendmail.cw file.
For example:
reu-info@trust.eecs.berkeley.edu %1_trust securit-info@trust.eecs.berkeley.edu %1_trust wise-info@trust.eecs.berkeley.edu %1_trust