From Fedora Project Wiki

No edit summary
m (added tip for ending the message using mailx)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{QA/Test_Case
{{QA/Test_Case
|description=This test case tests if the Postfix is enabled by default and able to send emails.
|description=This test case tests if the Postfix is running and able to send emails.
|setup=
|setup=
# Ensure that {{package|postfix}} package is installed.
# Ensure that {{package|postfix}} package is installed.
# Ensure that other MTAs like: {{package|sendmail}} and {{package|exim}} are not running.
# Ensure that other MTAs like: {{package|sendmail}} and {{package|exim}} are not running.
# Make Postfix the default MTA using: {{command| alternatives --config mta}}
|actions=  
|actions=  
<ol>
<ol>
<li> Switch to root user: {{command | su -}} </li>
<li> Switch to root user: {{command | su -}} </li>
<li> Check if postfix service is running and enabled at boot: {{command| systemctl status postfix.service}} </li>
<li> Check if postfix service is running: {{command| systemctl status postfix.service}} </li>
<li> Install '''mail''' utility: {{command| yum install mailx}}</li>
<li> Install '''mail''' utility: {{command| yum install mailx}}</li>
<li> Try to send email to root user:  
<li> Try to send email to root user:  
{{admon/tip | Ending the Message | EOT is inserted into the terminal after ending the message with ctrl+D}}
<pre>
<pre>
# mail root@localhost
# mail root@localhost

Latest revision as of 22:27, 2 August 2011

Description

This test case tests if the Postfix is running and able to send emails.

Setup

  1. Ensure that postfix package is installed.
  2. Ensure that other MTAs like: sendmail and exim are not running.
  3. Make Postfix the default MTA using: alternatives --config mta

How to test

  1. Switch to root user: su -
  2. Check if postfix service is running: systemctl status postfix.service
  3. Install mail utility: yum install mailx
  4. Try to send email to root user:
    Ending the Message
    EOT is inserted into the terminal after ending the message with ctrl+D
    # mail root@localhost
    Subject: test
    test
    EOT
    
  5. Check if root has received the test email: mail
  6. Expected Results

    1. Postfix must be running and active at boot, the output of systemctl should be like:
      # systemctl status postfix.service
      postfix.service - LSB: start and stop postfix
      	  Loaded: loaded (/etc/rc.d/init.d/postfix)
      	  Active: active (running) since Sat, 02 Jul 2011 13:07:21 +0100; 10s ago
      	 Process: 3454 ExecStart=/etc/rc.d/init.d/postfix start (code=exited, status=0/SUCCESS)
      	Main PID: 3531 (master)
      	  CGroup: name=systemd:/system/postfix.service
      		  ├ 3531 /usr/libexec/postfix/master
      		  ├ 3533 pickup -l -t fifo -u
      		  └ 3534 qmgr -l -t fifo -u
      
      
    2. root user should receive the test email and the output of mail should be like:
      # mail
      Heirloom Mail version 12.5 7/5/10.  Type ? for help.
      "/var/spool/mail/root": 1 message 1 new
      >N  1 root                  Sat Jul  2 12:46  20/766   "test"
      &