Category: Mail

  • Where Mailwizz configuration file located?

    Mailwizz configuration file located at

    apps/common/config/main-custom.php
    

    When you migrate a MailWizz installation, you need to update this file and change Database credentials.

    See Mailwizz

  • How to find Zimbra version

    How to find Zimbra version

    To find the Zimbra version, log in to the server using SSH, then run the following commands.

    Switch to the user “zimbra”

    su - zimbra

    Run the command zmcontrol -v, which will display the version of Zimbra you are using.

    zmcontrol -v

    Example

    [zimbra@correo ~]$ zmcontrol -v    
    Release 8.8.15_GA_3829.RHEL7_64_20190718141144 RHEL7_64 FOSS edition, Patch 8.8.15_P23.
    [zimbra@correo ~]$ 

    Using Zimbra Admin

    Login to the Zimbra Admin area at

    https://your-domain-here:7071/zimbraAdmin/
    

    On the Dashboard, you will see the Zimbra version displayed. On the right top side, you will see the “Help” menu. Click on it, then select “About Zimbra”, this will show a popup with the Zimbra version and the build and release date.

    How to find Zimbra mail server version

    See Zimbra

  • Flush exim mail queue

    To flush the mail queue, run the command

    exim -q

    Force another queue run

    exim -qf

    Force another queue run and attempt to flush the frozen message

    exim -qff

    See exim

  • Microsoft 365

    Exchange admin center URL

    https://outlook.office365.com/ecp/ (old)
    https://admin.exchange.microsoft.com/#/homepage (new)

    Login to webmail

    https://outlook.office365.com

    Admin Area

    https://admin.microsoft.com

    Domain DNS settings (MX/SPF)

    https://admin.microsoft.com/Adminportal/Home#/Domains

    SPF record for Microsoft 365

    v=spf1 include:spf.protection.outlook.com -all

    Host DNS with Microsoft

    https://portal.office.com/Adminportal/Home/#/Domains/Details/YOURDOMAIN.TLD

    Setup DKIM

    https://security.microsoft.com/dkimv2

    How to open support request with Microsoft 365

  • Roundcube add generic message in footer

    Add message to footer of outgoing mails.

    Edit config/defaults.inc.php

    Add

    $config['generic_message_footer'] = 'message_footer.txt';
    $config['generic_message_footer_html'] = 'message_footer.txt';
    

    Now in root folder of roundcube, create a file message_footer.txt

    Add

    
    -----------------------------
    Get Free [email protected] email address.
    
    ---
     config/defaults.inc.php |    2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
     create mode 100644 message_footer.txt
    
    diff --git a/config/defaults.inc.php b/config/defaults.inc.php
    index ffce8e7..ba429fd 100644
    --- a/config/defaults.inc.php
    +++ b/config/defaults.inc.php
    @@ -427,7 +427,7 @@ $config['include_host_config'] = false;
     
     // path to a text file which will be added to each sent message
     // paths are relative to the Roundcube root folder
    -$config['generic_message_footer'] = '';
    +$config['generic_message_footer'] = 'message_footer.txt';
     
     // path to a text file which will be added to each sent HTML message
     // paths are relative to the Roundcube root folder
    diff --git a/message_footer.txt b/message_footer.txt
    new file mode 100644
    index 0000000..e69de29
    -- 
    1.7.9.5
    

    See Roundcube

  • Roundcube disable multiple identities

    Edit

    config/main.inc.php
    

    Find

    // Set identities access level:
    // 0 - many identities with possibility to edit all params
    // 1 - many identities with possibility to edit all params but not email address
    // 2 - one identity with possibility to edit all params
    // 3 - one identity with possibility to edit all params but not email address
    $rcmail_config['identities_level'] = 3;
    

    Setting value of identities_level disallow users to change from email address.

    See Roundcube

  • Enable debug mode in Roundcube webmail

    To enable debug mode in roundcube webmail, edit file

    /config/main.inc.php
    

    Update the vairable

    $rcmail_config['imap_debug']
    

    See Roundcube

  • Install PowerMTA

    Install the requirments

    yum install unzip net-tools telnet git gdb -y
    

    If you already have a mail server remove it.

    yum remove postfix -y
    

    If you want to keep current mail server, you can run PowerMTA on a port other than 25.

    cd /root/PMTA/
    unzip PowerMTA5.0r1.zip
    cd /root/PMTA/PowerMTA5.0r1
    yum install PowerMTA-5.0r1-201909161531.x86_64.rpm
    service pmta stop
    service pmtahttp stop
    rm -f /usr/sbin/pmtad
    rm -f /usr/sbin/pmtahttpd
    cd  /root/PMTA/PowerMTA5.0r1/usr/sbin
    cp * /usr/sbin
    chmod -R 755 /usr/sbin/pmta
    chmod -R 755 /usr/sbin/pmtad
    chmod -R 755 /usr/sbin/pmtahttpd
    cp /root/PMTA/PowerMTA5.0r1/license /etc/pmta
    

    Restart PowerMTA

    service pmta start
    service pmtahttp start
    

    If you get any error, run powermta in debug mode

    pmtad --debug
    

    To customoize your PowerMTA install, edit config file

    vi /etc/pmta/config
    

    After editing config file, you need to restart PowerMTA

    service pmta restart
    

    Or reload, which is faster

    service pmta reload
    

    See PowerMTA

  • PowerMTA test using telnet

    To test PowerMTA using telnet, run

    telnet localhost 25
    

    Now paste following content

    ehlo localhost
    mail from: [email protected]
    rcpt to: [email protected]
    data
    Subject: Testing
    
    This is text email.
    .
    quit
    

    To see logs

    tail -f /var/log/pmta/pmta.log
    

    To see PowerMTA queue, run

    pmta show queues
    

    See PowerMTA

  • PowerMTA IP Rotation

    To setup IP rotation in PowerMTA, configure multiple IP on the server. Setup rDNS for each of these IP, point a sub domain to these IPs same as the reverse DNS entry.

    Here is an exable

    First we need to edit DNS records. Add folowing A records.

    pmta1.sevrerok.in    A       176.123.8.12
    pmta2.sevrerok.in    A       176.123.8.13 
    pmta3.sevrerok.in    A       176.123.8.17
    

    Set up rDNS (reverse DNS/PTR Record) with your server provider.

    176.123.8.12 > pmta1.sevrerok.in
    176.123.8.13 > pmta2.sevrerok.in
    176.123.8.17 > pmta3.sevrerok.in
    

    Edit PowerMTA config file

    vi /etc/pmta/config
    

    Find your virtual-mta configuration, replace it with

    
        smtp-source-host 176.123.8.12 pmta1.sevrerok.in
        domain-key default,*,/etc/pmta/default.sevrerok.in.pem
        
        max-msg-rate 400/h
        
    
    
    
        smtp-source-host 176.123.8.13 pmta2.sevrerok.in
        domain-key default,*,/etc/pmta/default.sevrerok.in.pem
        
        max-msg-rate 400/h
        
    
    
    
        smtp-source-host 176.123.8.17 pmta3.sevrerok.in
        domain-key default,*,/etc/pmta/default.sevrerok.in.pem
        
        max-msg-rate 400/h
        
    
    
    
        virtual-mta pmta1
        virtual-mta pmta2
        virtual-mta pmta3
    
    

    See PowerMTA

  • PowerMTA route mails through another SMTP server for a domain

    If you want to route emils from PowerMTA though another SMTP server, you can use following config.

    In this example, all outgoing emails to @outlook.com domain will get routed through Amazon SES.

    Edit PowerMTA config file

    vi /etc/pmta/config
    

    Add folowing

    
        queue-to amazon-ses.route
    
    
    
        auth-username USER_NAME_HERE
        auth-password PASSWORD_HERE
        route email-smtp.us-west-2.amazonaws.com:587
        use-starttls yes
        require-starttls yes
    
    

    Restart PowerMTA

    systemctl restart pmta
    

    See PowerMTA