Django MailΒΆ

According to the following description a service has been created for Django Mail Server.

  1. django-mail.service

    Script django-mail.service installed in directory /etc/systemd/system/. The Script starts the Django Mail Server on Debian Linux.

    Example of the script django-server.service:

    sudo nano /etc/systemd/system/django-mail.service
    

    Content:

    [Unit]
    Description=Handling of the Django Mail Server
    After=multi-user.target
    
    [Service]
    Type=simple
    ExecStart=/usr/local/logistics/Python/venv/django_webapps_fullstack/bin/python3 -m smtpd -n -c \
       DebuggingServer \
       localhost:1025
    Restart=on-abort
    
    [Install]
    WantedBy=multi-user.target
    

  1. Start and Stop of the Mail Server

    Reload Systemd to read the new service unit file:

    sudo systemctl daemon-reload
    

    Enable the service to start at boot:

    sudo systemctl enable django-mail
    

    Start of the Mail Server

    sudo systemctl start django-mail
    

    Stop of the Mail Server

    sudo systemctl stop django-mail
    

    Status of the Mail Server

    sudo systemctl status django-mail