FTP POP3 IMAP Offline

Discussion in 'Installation/Configuration' started by LAKSHA, Mar 11, 2016.

  1. LAKSHA

    LAKSHA Member

    Data from: 2016-03-11 10:25
    Web-Server: Online
    FTP-Server: Offline
    SMTP-Server: Online
    POP3-Server: Offline
    IMAP-Server: Offline
    DNS-Server: Online
    mySQL-Server: Online



    Chain INPUT (policy DROP)
    target prot opt source destination
    fail2ban-postfix-sasl tcp -- anywhere anywhere multiport dports smtp
    fail2ban-pureftpd tcp -- anywhere anywhere multiport dports ftp
    fail2ban-dovecot-pop3imap tcp -- anywhere anywhere multiport dports pop3,pop3s,imap2,imaps
    fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh
    DROP tcp -- anywhere loopback/8
    ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
    ACCEPT all -- anywhere anywhere
    DROP all -- base-address.mcast.net/4 anywhere
    PUB_IN all -- anywhere anywhere
    PUB_IN all -- anywhere anywhere
    PUB_IN all -- anywhere anywhere
    PUB_IN all -- anywhere anywhere
    PUB_IN all -- anywhere anywhere
    DROP all -- anywhere anywhere

    Chain FORWARD (policy DROP)
    target prot opt source destination
    ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
    DROP all -- anywhere anywhere

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    PUB_OUT all -- anywhere anywhere
    PUB_OUT all -- anywhere anywhere
    PUB_OUT all -- anywhere anywhere
    PUB_OUT all -- anywhere anywhere
    PUB_OUT all -- anywhere anywhere

    Chain INT_IN (0 references)
    target prot opt source destination
    ACCEPT icmp -- anywhere anywhere
    DROP all -- anywhere anywhere

    Chain INT_OUT (0 references)
    target prot opt source destination
    ACCEPT icmp -- anywhere anywhere
    ACCEPT all -- anywhere anywhere

    Chain PAROLE (16 references)
    target prot opt source destination
    ACCEPT all -- anywhere anywhere

    Chain PUB_IN (5 references)
    target prot opt source destination
    ACCEPT icmp -- anywhere anywhere icmp destination-unreachable
    ACCEPT icmp -- anywhere anywhere icmp echo-reply
    ACCEPT icmp -- anywhere anywhere icmp time-exceeded
    ACCEPT icmp -- anywhere anywhere icmp echo-request
    PAROLE tcp -- anywhere anywhere tcp dpt:ftp-data
    PAROLE tcp -- anywhere anywhere tcp dpt:ftp
    PAROLE tcp -- anywhere anywhere tcp dpt:ssh
    PAROLE tcp -- anywhere anywhere tcp dpt:smtp
    PAROLE tcp -- anywhere anywhere tcp dpt:domain
    PAROLE tcp -- anywhere anywhere tcp dpt:http
    PAROLE tcp -- anywhere anywhere tcp dpt:pop3
    PAROLE tcp -- anywhere anywhere tcp dpt:imap2
    PAROLE tcp -- anywhere anywhere tcp dpt:https
    PAROLE tcp -- anywhere anywhere tcp dpt:submission
    PAROLE tcp -- anywhere anywhere tcp dpt:imaps
    PAROLE tcp -- anywhere anywhere tcp dpt:pop3s
    PAROLE tcp -- anywhere anywhere tcp dpt:mysql
    PAROLE tcp -- anywhere anywhere tcp dpt:http-alt
    PAROLE tcp -- anywhere anywhere tcp dpt:tproxy
    PAROLE tcp -- anywhere anywhere tcp dpt:webmin
    ACCEPT udp -- anywhere anywhere udp dpt:domain
    ACCEPT udp -- anywhere anywhere udp dpt:mysql
    DROP icmp -- anywhere anywhere
    DROP all -- anywhere anywhere

    Chain PUB_OUT (5 references)
    target prot opt source destination
    ACCEPT all -- anywhere anywhere

    Chain fail2ban-dovecot-pop3imap (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere

    Chain fail2ban-postfix-sasl (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere

    Chain fail2ban-pureftpd (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere

    Chain fail2ban-ssh (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere

    **************************
    Its debian 8 VPS
    https://www.howtoforge.com/tutorial/ispconfig-install-script-debian/
    Pls help @till or anyone who can :)
     
  2. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Any entries in your /var/log/mail.info regarding dovecot? Maybe try restarting dovecot and check your logs again.
    Code:
    service dovecot status
    
    doveadm reload
    
    
     
    LAKSHA likes this.
  3. LAKSHA

    LAKSHA Member

    /# service dovecot status
    ● dovecot.service - Dovecot IMAP/POP3 email server
    Loaded: loaded (/lib/systemd/system/dovecot.service; enabled)
    Active: failed (Result: start-limit) since Tue 2016-03-08 13:20:02 EST; 2 days ago
    Main PID: 1779 (code=exited, status=89)

    Mar 08 13:20:02 neth systemd[1]: Started Dovecot IMAP/POP3 email server.
    Mar 08 13:20:02 neth dovecot[1779]: doveconf: Fatal: Error in configuration...ry
    Mar 08 13:20:02 neth systemd[1]: dovecot.service: main process exited, code.../a
    Mar 08 13:20:02 neth systemd[1]: Unit dovecot.service entered failed state.
    Mar 08 13:20:02 neth systemd[1]: Starting Dovecot IMAP/POP3 email server...
    Mar 08 13:20:02 neth systemd[1]: dovecot.service start request repeated too...t.
    Mar 08 13:20:02 neth systemd[1]: Failed to start Dovecot IMAP/POP3 email server.
    Hint: Some lines were ellipsized, use -l to show in full.

    doveadm reload
    doveadm(root): Fatal: Dovecot is not running (read from /var/run/dovecot/master.pid)

    @ztk.me thanks atleast we getting ahead on knowing whats mising :)
     
  4. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Yeah, seems something went wrong with the configuration of dovecot, now we need to find out what's wrong.
    you could issue
    Code:
    service dovecot restart
    
    and check your /var/log/mail.info for relevant dovecot entries.

    What's the output of

    Code:
    doveconf -n
    
     
    LAKSHA likes this.
  5. LAKSHA

    LAKSHA Member

    /var/log/mail.info

    Has nothing about Dovecot and lots about Postfix
    i have the original sequence which i pasted when i installed sending that too



    root@user:/# service dovecot restart

    root@user:/# service dovecot status

    ● dovecot.service - Dovecot IMAP/POP3 email server
    Loaded: loaded (/lib/systemd/system/dovecot.service; enabled)
    Active: failed (Result: exit-code) since Fri 2016-03-11 11:13:52 EST; 1min 0s ago
    Process: 25965 ExecStart=/usr/sbin/dovecot -F (code=exited, status=89)
    Main PID: 25965 (code=exited, status=89)

    Mar 11 11:13:52 neth systemd[1]: Started Dovecot IMAP/POP3 email server.
    Mar 11 11:13:52 neth dovecot[25965]: doveconf: Fatal: Error in configuratio...ry
    Mar 11 11:13:52 neth systemd[1]: dovecot.service: main process exited, code.../a
    Mar 11 11:13:52 neth systemd[1]: Unit dovecot.service entered failed state.
    Hint: Some lines were ellipsized, use -l to show in full.


    root@user:/# doveconf -n


    # 2.2.13: /etc/dovecot/dovecot.conf
    # OS: Linux 2.6.32-042stab111.12 x86_64 Debian 8.3
    auth_mechanisms = plain login
    disable_plaintext_auth = no
    listen = *,[::]
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    mail_privileged_group = vmail
    passdb {
    args = /etc/dovecot/dovecot-sql.conf
    driver = sql
    }
    plugin {
    quota = dict:user::file:/var/vmail/%d/%n/.quotausage
    sieve = /var/vmail/%d/%n/.sieve
    }
    protocols = imap pop3
    service auth {
    unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
    }
    unix_listener auth-userdb {
    group = vmail
    mode = 0600
    user = vmail
    }
    user = root
    }
    service imap-login {
    client_limit = 1000
    process_limit = 500
    }
    ssl_cert = </etc/postfix/smtpd.cert
    ssl_key = </etc/postfix/smtpd.key
    ssl_protocols = !SSLv2 !SSLv3
    userdb {
    args = /etc/dovecot/dovecot-sql.conf
    driver = sql
    }
    protocol imap {
    mail_plugins = quota imap_quota
    }
    protocol pop3 {
    mail_plugins = quota
    pop3_uidl_format = %08Xu%08Xv
    }
    protocol lda {
    mail_plugins = sieve quota
    }

    Please find the original setup details in a file. i kind of pasted in hurry and forgot i saved.
     

    Attached Files:

  6. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    at first glance ( I don't know this script / never used ) there seem to be issues about dovecot configuration at an early stage, also issues with certificate generation.
    dovecot config looks ok, however check wether /etc/dovecot/dovecot-sql.conf is present and correct.

    Did you check all packages are installed correctly?
    Try
    Code:
    apt-get install -f
    
    Also looks like setting up roundcube config for apache didn't succeed.
    I'd recommend you to
    do
    Code:
    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
    tar xvfz ISPConfig-3-stable.tar.gz
    cd ispconfig3_install/install
    php -q update.php
    
    
    and choose yes to reconfigure services and recreate ssl certificates.

    For roundcube, you probably want to check wether it works and look for the howto to fix issues if any.
     
  7. LAKSHA

    LAKSHA Member

    /etc/dovecot/dovecot-sql.conf is showing all correct stuff
    i did re configure and it still gives me the same problem :-|
     
  8. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Hmm, do we get an output when trying to run dovecot like this?
    Code:
    /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf -F 
    
     
    LAKSHA likes this.
  9. LAKSHA

    LAKSHA Member

    doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 7: ssl_cert: Can't open file /etc/postfix/smtpd.cert: No such file or directory
     
  10. LAKSHA

    LAKSHA Member

    Even FTP is not working
     
  11. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Hmm after doing the update the keys should have been generated :(

    Code:
    [...]
    STANDALONE_OR_INETD=standalone
    [...]
    VIRTUALCHROOT=true
    [...]
    
    Code:
    echo 1 > /etc/pure-ftpd/conf/TLS
    mkdir -p /etc/ssl/private/
    openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
    chmod 600 /etc/ssl/private/pure-ftpd.pem
    service pure-ftpd-mysql restart
    
    Code:
    openssl genrsa -out /etc/postfix/smtpd.key 2048
    openssl req -new -x509 -key /etc/postfix/smtpd.key -out /etc/postfix/smtpd.cert -days 730
    service dovecot restart
    
    should fix it
     
  12. LAKSHA

    LAKSHA Member

    Open Ports TCPIP
    20,21,22,25,53,80,110,143,443,587,993,995,3306,8080,8081,10000

    UDP
    53,3306
    i dont think so this should be a problem.
    but just mentioned.


    root@serv:/tmp/ispconfig3_install/install# service pop3 status
    ● pop3.service
    Loaded: not-found (Reason: No such file or directory)
    Active: inactive (dead)
    root@serv:/tmp/ispconfig3_install/install# service imap status
    ● imap.service
    Loaded: not-found (Reason: No such file or directory)
    Active: inactive (dead)
    root@serv:/tmp/ispconfig3_install/install# ^C
    root@serv:/tmp/ispconfig3_install/install# cd /
    root@serv:/# /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf -F
    doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 7: ssl_cert: Can't open file /etc/postfix/smtpd.cert: No such file or directory
    root@serv:/# ^C
    root@serv:/#
    root@serv:/# service imap status
    ● imap.service
    Loaded: not-found (Reason: No such file or directory)
    Active: inactive (dead)
    root@serv:/# service pop3 status
    ● pop3.service
    Loaded: not-found (Reason: No such file or directory)
    Active: inactive (dead)
    root@serv:/# service pure-ftpd status
    ● pure-ftpd.service - (null)
    Loaded: loaded (/etc/init.d/pure-ftpd)
    Active: inactive (dead) since Fri 2016-03-11 10:21:12 EST; 2h 1min ago

    Mar 11 10:20:10 serv pure-ftpd[24091]: Starting ftp server: Running: /usr/sbin/pure-ftpd-vir... -B
    Mar 11 10:20:10 serv systemd[1]: Started (null).
    Mar 11 10:20:10 serv pure-ftpd[24101]: (?@?) [ERROR] Sorry, but that file doesn't exist: [/e...em]
    Mar 11 10:21:12 serv systemd[1]: Stopping (null)...
    Mar 11 10:21:12 serv pure-ftpd[24205]: Stopping ftp server: pure-ftpd.
    Mar 11 10:21:12 serv systemd[1]: Stopped (null).
    Hint: Some lines were ellipsized, use -l to show in full.
    root@serv:/# service dovecot status
    ● dovecot.service - Dovecot IMAP/POP3 email server
    Loaded: loaded (/lib/systemd/system/dovecot.service; enabled)
    Active: failed (Result: exit-code) since Fri 2016-03-11 11:52:11 EST; 30min ago
    Process: 28568 ExecStart=/usr/sbin/dovecot -F (code=exited, status=89)
    Main PID: 28568 (code=exited, status=89)

    Mar 11 11:52:11 serv systemd[1]: Started Dovecot IMAP/POP3 email server.
    Mar 11 11:52:11 serv dovecot[28568]: doveconf: Fatal: Error in configuration file /etc/dove...tory
    Mar 11 11:52:11 serv systemd[1]: dovecot.service: main process exited, code=exited, status=89/n/a
    Mar 11 11:52:11 serv systemd[1]: Unit dovecot.service entered failed state.
    Hint: Some lines were ellipsized, use -l to show in full.
    root@serv:/# service postfix status
    ● postfix.service - LSB: Postfix Mail Transport Agent
    Loaded: loaded (/etc/init.d/postfix)
    Drop-In: /run/systemd/generator/postfix.service.d
    └─50-postfix-$mail-transport-agent.conf
    Active: active (running) since Fri 2016-03-11 11:52:06 EST; 31min ago
    Process: 27845 ExecStop=/etc/init.d/postfix stop (code=exited, status=0/SUCCESS)
    Process: 27885 ExecStart=/etc/init.d/postfix start (code=exited, status=0/SUCCESS)
    CGroup: /system.slice/postfix.service
    ├─28010 /usr/lib/postfix/master
    ├─28019 pickup -l -t unix -u -c
    ├─28020 qmgr -l -t unix -u
    └─28824 tlsmgr -l -t unix -u -c

    Mar 11 12:17:08 serv postfix/smtp[29671]: C66F810DA2E01: to=<[email protected]>, relay=127.0.0.1[12...
    Mar 11 12:20:01 serv postfix/smtpd[29858]: warning: cannot get RSA certificate from file /et...ort
    Mar 11 12:20:01 serv postfix/smtpd[29858]: warning: TLS library problem: error:02001002:syst...'):
    Mar 11 12:20:01 serv postfix/smtpd[29858]: warning: TLS library problem: error:20074002:BIO ...00:
    Mar 11 12:20:01 serv postfix/smtpd[29858]: warning: TLS library problem: error:140DC002:SSL ...22:
    Mar 11 12:20:01 serv postfix/smtpd[29858]: connect from localhost[::1]
    Mar 11 12:20:01 serv postfix/smtpd[29858]: warning: SASL: Connect to private/auth failed: No...ory
    Mar 11 12:20:01 serv postfix/smtpd[29858]: fatal: no SASL authentication mechanisms
    Mar 11 12:20:02 serv postfix/master[28010]: warning: process /usr/lib/postfix/smtpd pid 2985...s 1
    Mar 11 12:20:02 serv postfix/master[28010]: warning: /usr/lib/postfix/smtpd: bad command sta...ing
    Hint: Some lines were ellipsized, use -l to show in full.
    root@serv:/#
     
  13. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    pop3/imap are provided by the service dovecot - hence the other commands you issued, the displayed service name doesn't mean the software is called the same :)
    Just recreate the ssl keys as mentioned above - or better, if it's a new/test/non productive machine yet, do a proper/clean install using the perfect server setup howto.
    Maybe report the issues to the script author.
     
    LAKSHA likes this.
  14. LAKSHA

    LAKSHA Member

    @ztk.me how do i show my support to you?do you need my mention review follow anywhere ?

    service --status-all
    [ + ] amavis
    [ + ] amavis-mc
    [ + ] amavisd-snmp-subagent
    [ + ] apache2
    [ + ] bastille-firewall
    [ + ] bastille-firewall.backup
    [ - ] bind9
    [ - ] bootlogs
    [ - ] bootmisc.sh
    [ - ] checkfs.sh
    [ - ] checkroot-bootclean.sh
    [ - ] checkroot.sh
    [ + ] clamav-daemon
    [ + ] clamav-freshclam
    [ + ] cron
    [ + ] dovecot
    [ + ] fail2ban
    [ - ] hostname.sh
    [ - ] hwclock.sh
    [ ? ] jailkit
    [ - ] killprocs
    [ - ] kmod
    [ + ] memcached
    [ ? ] modules_dep.sh
    [ - ] motd
    [ - ] mountall-bootclean.sh
    [ - ] mountall.sh
    [ - ] mountdevsubfs.sh
    [ - ] mountkernfs.sh
    [ - ] mountnfs-bootclean.sh
    [ - ] mountnfs.sh
    [ + ] mysql
    [ + ] networking
    [ + ] ntp
    [ + ] openbsd-inetd
    [ + ] opendkim
    [ + ] php5-fpm
    [ + ] postfix
    [ + ] procps
    [ + ] pure-ftpd
    [ + ] pure-ftpd-mysql
    [ + ] quota
    [ - ] quotarpc
    [ + ] rc.local
    [ - ] rmnologin
    [ - ] rsync
    [ + ] rsyslog
    [ - ] sendsigs
    [ - ] spamassassin
    [ + ] ssh
    [ - ] sudo
    [ + ] udev
    [ + ] udev-finish
    [ - ] umountfs
    [ - ] umountnfs.sh
    [ - ] umountroot
    [ + ] urandom
    [ - ] wide-dhcpv6-client

    Please do let me know how could i acknowledge this effort and time given to me :)
     
  15. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    just keep on producing issues, I love to solve them :) Seriously, happy it's working now :)
     

Share This Page