Fixed socat/ports.

This commit is contained in:
michael 2020-05-21 15:45:01 -05:00
parent f5f2d79d3b
commit 8e64d18c2b
3 changed files with 10 additions and 10 deletions

View file

@ -3,8 +3,8 @@ set -eufo pipefail
BRIDGE=/bin/protonmail-bridge
PRINT_INFO=${PRINT_INFO:-""}
SMTP_PORT=${SMTP_PORT:-"1025"}
IMAP_PORT=${IMAP_PORT:-"1143"}
SMTP_PORT=${SMTP_PORT:-"25"}
IMAP_PORT=${IMAP_PORT:-"143"}
#### INIT
PASS_FILE=${PASS_FILE:-}
@ -31,12 +31,6 @@ if [ -n "$PRINT_INFO" ]; then
echo info | $BRIDGE --cli | egrep '(Username|Password)' | sort -ru
fi
# socat will make the conn appear to come from 127.0.0.1
# ProtonMail Bridge currently expects that.
# It also allows us to bind to the real ports :)
socat TCP-LISTEN:$SMTP_PORT,fork TCP:127.0.0.1:1025 &
socat TCP-LISTEN:$IMAP_PORT,fork TCP:127.0.0.1:1143 &
# Fake a terminal, so it does not quit because of EOF...
rm -f faketty
mkfifo faketty