0

I try to Configure MTA for the Debian Jessie (8) and followed the procedure,

A. Exim4 is installed by default on Debian installations, but not configured.

Execute this command:

dpkg-reconfigure exim4-config

It opens a box where there are 4 options listed and I choose the 1st one tells Internet site: the mail is sent and received directly by SMTP

B. Make sure to create a working configuration. Send a test e-mail to yourself to make sure that the configuration works:

mail me@example.org
Subject: email test

test test
.
Cc: 

Afterwards, I sent a test email as mentioned above and the command executes OK. I have also tried the command,

echo "test message" | mail -s "test message" user@domain.com

This goes also fine.

C. Check /var/log/exim4/mainlog to see the results of your test.

How would I check the /var/log/exim4/mainlog to see the result of the test? I can open the file using the command of, sudo gedit /var/log/exim4/mainlog though.

2

Any way that allows you to see the file's contents will work. Unix/Linux log files are generally plain ASCII text files.

Your solution of sudo gedit /var/log/exim4/mainlog is valid, although overkill if you don't actually plan editing the log. You might use something like sudo less /var/log/exim4/mainlog instead.

  • Thanks a lot. What is the command to see the last email in Debian? – U2m Dec 17 '17 at 8:11
  • 1
    If you mean the log entries created by the mail, the most recent ones will be at the end of the file: each new log entry is appended to the end of the file. Reading the actual email is best done with your MUA of choice: the most bare-bones way would be to start mail without any arguments, then select the most recent message by typing its number and "p". – telcoM Dec 17 '17 at 8:55
  • Could you please give the command? Not very familiar with Linux and started only today :) – U2m Dec 17 '17 at 9:03
  • Type mail and press Enter. it will display its version number, then the location of the mailbox file (typically /var/mail/<your username>) and the total number of emails in it. Then it displays a list of emails in your mailbox. On the last line, there will be a & prompt. If you want the latest email, type the same number as the number of messages in your inbox (on the 2nd line of mail command output) and press Enter. The email will be displayed one screenful at a time, press space to see more. Once you see the & prompt again, type x and Enter to exit the mail command. – telcoM Dec 17 '17 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.