Comment on page

Enabling Email Notifications

Get Email notifications with the completion status of backup jobs by pointing Zmanda to your SMTP server.

Prerequisite - SMTP Server

You must have an operational SMTP server as well as its credentials. Zmanda, itself, will not act as the SMTP server.
If you aren't sure where to start, see this article on how to set up an SMTP server using Gmail.
You will use the SMTP server information to configure the mailx/postfix tools in the following steps.

RHEL Based Systems

  1. 1.
    Install mailx package using yum or dnf
sudo dnf install mailx
  1. 2.
    Create a soft link to mailx from mail.
ln -s /bin/mailx /bin/mail
  1. 3.
    Update the /etc/mail.rc configuration as below:
//append the following line in mail.rc
//set smtp=smtp://smtp.server.tld:<port_number>
//tell mailx that it needs to authorise
set smtp-auth=login
set smtp-use-starttls
//set the user for SMTP
set [email protected] //user account
set [email protected] //user account
//set the password for authorization
set smtp-auth-password= <PASSWORD of user account>
set nss-config-dir=/etc/pki/nssdb/
set ssl-verify=ignore
  1. 4.
    Test to make sure that everything works as expected:
echo "Your message" | mail -s "Message Subject" [email protected]

Debian Based Systems
Edit section

  1. 1.
    Install the utility
apt-get install postfix mailutils
  1. 2.
    In /etc/postfix/, append the following lines. Use a text editor tool like vi or nano. eg. vi /etc/postfix/
relayhost = []:25
mynetworks =
inet_interfaces = loopback-only
smtp_use_tls = yes
smtp_always_send_ehlo = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
smtp_generic_maps = hash:/etc/postfix/generic
  1. 3.
    Configure the postfix SASL credentials by appending the following info within /etc/postfix/sasl_passwd:
[]:25 user@domainname:password
  1. 4.
    A Postfix lookup table must now be generated from the sasl_passwd text file by running the following commands.
postmap /etc/postfix/sasl_passwd
//Change permissions and ownership for this file
chown root:postfix /etc/postfix/sasl_passwd
chmod 640 /etc/postfix/sasl_passwd
  1. 5.
    Next, we need to configure generic file in order to be able to send emails as a valid user (this is required for Office365). vi or nano into /etc/postfix/generic and append the following info:
  1. 6.
    Save and exit the file and run the following commands.
chown root:root /etc/postfix/generic
chmod 0600 /etc/postfix/generic
postmap /etc/postfix/generic
  1. 7.
    Now Change alias root to your email address. Use vi or nano to make the following changes to /etc/aliases
mailer-daemon: postmaster
postmaster: root
  1. 8.
    Save and exit, and run the newaliases command for the changes to take effect.
systemctl restart postfix.service
  1. 8.
    Send a test email using the command below:
echo "This is the body of the email" | mailx -s "This is the subject line" [email protected] -a "FROM: [email protected]"