Signal9Signal9 — home
online
back to labs

Postfix: Relay Through a Smarthost, Stamp Origin, Alias Root

MediumNetworking15-25 min
The brief

This host should hand all outbound and system mail to the site smarthost instead of delivering it directly, stamp its mail with the org's origin domain, and forward root's mail to a real admin. Your assignment is in /root/case/assignment.env (RELAY_HOST, ADMIN_USER, ORIGIN_DOMAIN).

Edit /etc/postfix/main.cf and /etc/aliases:

1. Relay — relayhost = [RELAY_HOST] (brackets skip the MX lookup; a :port is fine).

2. Origin — myorigin = ORIGIN_DOMAIN (or mydomain = ORIGIN_DOMAIN + myorigin = $mydomain).

3. Alias — add root: ADMIN_USER to /etc/aliases (then newaliases).

Grading reads the config files (Postfix need not be running). See /root/case/brief.txt.

What you'll do
  • Relay outbound mail through the assigned smarthost
  • Set the outbound origin domain
  • Forward root's mail to a real administrator
  • Know the main.cf vs /etc/aliases split

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.