Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

TeaByte/catdns-mail

Repository files navigation

this code is shit! moved to https://github.com/TeaByte/catway-mail

Getting Started

Follow these steps to get started with CatDNS Mail:

  1. Clone the repository

    git clone https://github.com/TeaByte/catdns-mail
    cd catdns-mail
  2. Install dependencies

    npm install
  3. Domain configure

    # add MX record to your DNS
    # MX     10    mail.catdns.in
    
    # add A record to your DNS
    # A  0.0.0.0   mail.catdns.in
  4. Install and configure mail server

    sudo apt install postfix
    sudo apt install ufw
    sudo ufw allow 25/tcp
    sudo ufw allow 143/tcp
    sudo ufw allow 993/tcp
    sudo ufw reload
    
    sudo nano /etc/postfix/main.cf
    
    # Edit/Add (main.cf):
    # virtual_alias_maps = hash:/etc/postfix/virtual
    # myhostname = mail.catdns.in
    # mydomain = catdns.in
    # myorigin = catdns.in
    # mydestination = $myhostname, catdns.in, localhost.localdomain, localhost
    # smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    
    # Create or Edit /etc/postfix/virtual:
    @catdns.in  root
    
    sudo postmap /etc/postfix/virtual
    sudo systemctl restart postfix
  5. Start the server / mail parser

    # mailserver
    npm run mailserver
    
    # website
    npm build
    npm start