getmail alternative for ispconfig

Discussion in 'Installation/Configuration' started by DarioL, Aug 10, 2023.

  1. DarioL

    DarioL Member

    I try install ispconfig on Rocky 9 follow the Centos 8 howto.
    I'm looking for a solution to get getmail working
    My first question is: there is a alternative solution to use getmail into ispconfig?

    If no, I got getmail working with pyithon2 with this procedure:
    Code:
    # Install python2 (old version)
    # https://stackoverflow.com/questions/71256853/how-do-i-install-python2-on-centos-9-stream
    # https://pyropus.ca./software/getmail/documentation.html#python3
    cd /tmp
    wget -c https://github.com/niess/python-appimage/releases/download/python2.7/python2.7.18-cp27-cp27m-manylinux1_x86_64.AppImage
    sudo install -m 755 python2.7.18-cp27-cp27m-manylinux1_x86_64.AppImage /usr/local/bin/
    sudo ln -sr /usr/local/bin/python2.7.18-cp27-cp27m-manylinux1_x86_64.AppImage /usr/local/bin/python2
    /usr/local/bin/python2 --version
    
    # dnf install python2 # NOT WORK ANYMORE
    cd /tmp
    wget http://pyropus.ca/software/getmail/old-versions/getmail-5.16.tar.gz
    rm -rf getmail-5.16
    tar xfz getmail-5.16.tar.gz
    cd getmail-5.16
    /usr/local/bin/python2 setup.py build
    # https://pyropus.ca./software/getmail/documentation.html#install-alt-libdir
    sed -i "/^import sys$/asys.path.append('/usr/lib/python2.7/site-packages')" \
            getmail_fetch getmail-gmail-xoauth-tokens getmail_maildir getmail_mbox getmail
    /usr/local/bin/python2 setup.py install --prefix=/usr
    getmail --version
    
    This solution come from the problem that the monolithic /usr/local/bin/python2 have a default root path set to a variable tmp folder (/tmp/.mount_pythonaGjeyW/) that change every time you run /usr/local/bin/python2

    If someone have a better solution let me know
    Thanks
    Dario
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    No. If you would want to use e.g. fetchmail, then you would have to write a fetchmail plugin for ISPConfig first.
     
  3. DarioL

    DarioL Member

    Last edited: Aug 10, 2023
  4. DarioL

    DarioL Member

    I have use this solution:
    Code:
    dnf install https://pkgs.dyn.su/el9/base/x86_64/python2.7-2.7.18-30.el9.x86_64.rpm
    cd /tmp
    wget http://pyropus.ca/software/getmail/old-versions/getmail-5.16.tar.gz
    rm -rf getmail-5.16
    tar xfz getmail-5.16.tar.gz
    cd getmail-5.16
    python2 setup.py build
    python2 setup.py install --prefix=/usr/
    getmail --version
    
    The trick is use "--prefix=/usr/" into python2 setup.py install

    Hope this help
     
    ahrasis and till like this.

Share This Page