Unit 10 - Email - Linux Flashcards
What is sendmail?
- Old but common MTA
- Many redundant features
- Prone to ‘hack-attacks’
What is the name of processing method that sendmail uses?
- Forking Method
Describe the processing method of sendmail.
- Parent process forks a child process to handle a message received.
- If message can not be placed into a /var/spool/mqueue then it is placed into a queue.
- The parent process forks a new process to manage the messages in the queue.
- Any message that can not be delivered has the process handling it terminated.
What do aliases do?
They link recipient envelope address to a local user or action.
Where is the aliases found? And what is the syntax used for programs, files and users?
In a folder called /etc/aliases.
- Programs use a pipe ( | )
- Files use a slash ( / )
- Users use a comma between them if there is multiple of them.
The normal syntax is as follows:
UserName :
What is the issue with the aliases file and how is this overcome? What command must be run to make changes work?
The issue with the file is that it can become very large and therefore traversing using linear search will take up a lot of time (order N)
Instead a hashed version can be created alongside original plain text version. Any changes that are made to plain text must have command ‘newaliases’ run to commit them to hashed version.
How can a user that is not root have an alias file and what is the danger of using one and how do you overcome this danger?
- .forward file
- Each line treated as alias for user, so for each user a copy of the message is also sent to them.
- Danger: Stuck in iteration loop.
- Solution: Put slash in front of it.
Where are the config files for ‘sendmail’ found and describe its contents?
/etc/mail
- Consists of .mc and .cf files.
- .mc files are MACRO level commands which build .cf files
- .cf files are parsed by sendmail.
- Run ‘make’ in directory to convert .mc files into .cf files.
Describe structure of sendmail.mc file.
- OSTYPE( )
- FEATURE( )
- MAILER () -> Example: MAILER( mail )
- dnl
- define( ) -> Takes 2 parameters (variable name, value )
What is masquerading and why is it an issue? Also what command is used to implement it?
- Identity of machine sending email is disguised.
- Can be used to cause a machine to become spammed with return emails.
- MASQUERADE_AS(‘SERVER_NAME’)
What is relaying and the issue associated with it? Where is the file for relaying stored?
- Relaying is where by an email is passed to another domain which delivers it somewhere else.
- This can be used by people trying to spam others but blame you for it instead.
- There are some accepted domain names. These are found in /etc/mail/relay-domains.
What is virtual hosting (receiving) and what is the issue with it? Also what is the command used for this process as well as the file location?
- Virtual hosting is where emails received can be sent to another email depending on weather it matches an entry.
- The entries are found in /etc/mail/virtusertable
- Wild cards can be used.
- FEATURE(virtualusertable)
What is virtual hosting (sending) and what is the issue with it? Also where is the file for this stored and the command used to implement it?
- Virtual hosting is when an email being sent if it matches the user in column 1 will appear to be sent from email address in column 2.
- Feature(genericstable)
- Entries found in /etc/mail/genericstable
How can you fight spam and how does this process work?
Use an SPF (Security Policy Framework)
MTA does a DNS look-up on source email address looking for a TXT record.
If it finds one starting with v=spf1, then additional checks are carried out.
If checks are not satisfied then action after ~ or - is carried out.
The ‘a’ indicates that if there is an ‘A’ record for the domain that can be accepted as well.
In aliases where would you direct emails for a user who is no longer apart of the organisation? (Delete emails using alias)
In the aliases file you would put /dev/null.