Tag: Mail Server

  • .forward file

    Users can create a .forward file in their home directories that is used by mail servers like exim, sendmail used to redirect email to another email account.

    When mail is sent to a local user, the sendmail command checks for the $HOME/.forward file. The $HOME/.forward file can contain one or more addresses or aliases. If the file exists, the message is not sent to the user. The message is sent to the addresses or aliases in the .forward file.

    On Cpanel servers, /root/.forward contains the email address of the server administrator, so all emails to root get forwarded to the Server Admin email account.

    Example

    [root@server52 ~]# cat /root/.forward 
    [email protected]
    [root@server52 ~]# 
    

    To create a .forward file, you can run

    echo "[email protected]" > ~/.forward
    

    This will create a file $HOME/.forward with your email address inside it.

  • Cpanel Mail Server

    To see the current mail server setup on the Cpanel server, run

    [root@server78 ~]# /scripts/setupmailserver --current
    Current mailserver type: dovecot
    Current storage format: maildir or mdbox
    [root@server78 ~]#
    

    Cpanel Provide Following Mail servers

    SMTP: exim
    POP/IMAP: courier, dovecot
    

    Roundcube mail logs in Cpanel

    tail -f /var/cpanel/roundcube/log/errors
    

    See exim mail server, Cpanel Server

  • Install Open Source Zimbra Mail Server

    Install Open Source Zimbra Mail Server

    To install Zimbra, Download the latest version of “Zimbra Collaboration Open Source” form

    https://www.zimbra.com/downloads/

    At the time of this post, the latest version is 8.8.15 GA Release.

    System Requirments

    Zimbra recommends 8 GB of RAM. For detailed system requirements, see Zimbra System Requirements

    I have installed it on servers with 4 GB RAM without any problem. If you are installing on a server with 4 GB RAM, make sure you add swap in cause you run out of RAM.

    dd if=/dev/zero of=/swapfile bs=1M count=4096
    mkswap /swapfile
    chmod 0600 /swapfile
    swapon /swapfile
    echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
    

    Set Hostname

    Zimbra needs you to set the proper hostname for your server.

    hostnamectl set-hostname mail.yourdomain.com
    

    First, add an A record for your hostname and point it to your server IP.

    Now edit /etc/hosts and add an entry like

    IP_ADDR  mail.yourdomain.com mail
    

    Where mail.yourdomain.com is your FQDN.

    Set MX Record

    During installation Zimbra checks for MX records, so make sure you set MX record for your domain, point it to the server where you install Zimbra.

    Install Zimbra on Ubuntu 20.04

    Download the latest version of Zimbra from

    https://www.zimbra.com/downloads/zimbra-collaboration-open-source/

    To install Zimbra, run

    cd /usr/local/src
    wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954.tgz
    tar xvf zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954.tgz
    cd zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954
    ./install.sh
    

    It will ask some questions. For most questions, you can just press enter as that is the default option (Y).

    Once install is done, you will be asked to set an admin password.

    After the installation is done, you will be able to login to the Zimbra Admin area at

    https://mail.yourdomain.com:7071/zimbraAdmin/
    

    Webmail available at

    https://mail.yourdomain.com
    

    Zimbra