Ok I installed and set that up. Is there a way to change the configuration in case I messed something up? Should I be using 'sendmail' or the 'mail' command(s) and how do I use them properly?
I have a firewall that only allows traffic from our email filter as well via a specific IP and port so I'll probably have to allow mail from this server as well.
I believe I found the config file located in /etc/postfix/main.cf, so that answers my first question.
The config is setup as follows:
<domain> and <server> are commented out
myhostname = Squid
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = <domain>.local, Squid, localhost.localdomain, localhost
relayhost = <server>.<domain>.local
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
I'm a little confused as to what the domain names are supposed to be set as. Should it be the same as the domain for my email, i.e. firstname.lastname@example.org, or would it be the domain of my network?
Should I also alter the /etc/aliases folder to add my exchange user?
The reason I'm asking all this is because trying to send a message from the terminal using either 'sendmail' or 'mail' doesn't seem to work although it doesn't error out. Makes me think nothing is wrong with my ubuntu configs but rather my firewall blocking them. That makes me wonder how the email gets sent? Does it go through the internet or directly from exchange?
# See man 5 aliases for formatpostmaster: root