Technology Insights

Send Mail Attachments Using mail Command From A Linux Shell

One thing that can be really helpful for Linux administrators is sending mail attachments via the Linux command line. It is fairly widely known that you can inject text files into email by piping the outputs of those files to the mail command however something that is less known is attaching files to an email sent via mail. The information below describes how to send mail from a Linux shell using the mail command.

Technology Errors

Postfix Error: cannot update mailbox /var/mail/root for user root. cannot create file exclusively: No such file or directory

While working on a project unrelated to Postfix on a CentOS server I noticed an error in the mail logs that indicated an issue with the root users mailbox. I have yet to locate the root cause of the problem however I was able to resolve the problem easily. Below I explain the error in more detail as well as how I was able to resolve the problem with sending email to the root users inbox.

Technology Errors

Ubuntu Exim Email Error: R=nonlocal: Mailing to remote domains not supported

While working on a clients computer yesterday I needed to send some of the logs from the computer to myself so I could analyze later on my computer. At first I had to install the Exim MTA which I will write an article on in the near future but once installed mail was still not being received. You won’t actually receive an error from the CLI when attempting to use the mail command from the CLI however after investigating the Exim logs located in /var/log/exim/ the below error was observed and resolving the issue was completed using the steps below.