مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
remove iptables and use setcap in ubuntu install script
هذا الالتزام موجود في:
@@ -45,9 +45,10 @@ rabbitmqctl add_user postal p0stalpassw0rd
|
|||||||
rabbitmqctl set_permissions -p /postal postal ".*" ".*" ".*"
|
rabbitmqctl set_permissions -p /postal postal ".*" ".*" ".*"
|
||||||
|
|
||||||
#
|
#
|
||||||
# User
|
# System prep
|
||||||
#
|
#
|
||||||
useradd -r -m -d /opt/postal -s /bin/bash postal
|
useradd -r -m -d /opt/postal -s /bin/bash postal
|
||||||
|
setcap 'cap_net_bind_service=+ep' /usr/bin/ruby2.3
|
||||||
|
|
||||||
#
|
#
|
||||||
# Application Setup
|
# Application Setup
|
||||||
@@ -67,13 +68,6 @@ mkdir /etc/nginx/ssl/
|
|||||||
openssl req -x509 -newkey rsa:4096 -keyout /etc/nginx/ssl/postal.key -out /etc/nginx/ssl/postal.crt -days 365 -nodes -subj "/C=GB/ST=Example/L=Example/O=Example/CN=example.com"
|
openssl req -x509 -newkey rsa:4096 -keyout /etc/nginx/ssl/postal.key -out /etc/nginx/ssl/postal.crt -days 365 -nodes -subj "/C=GB/ST=Example/L=Example/O=Example/CN=example.com"
|
||||||
service nginx reload
|
service nginx reload
|
||||||
|
|
||||||
#
|
|
||||||
# Configure SMTP on port 25
|
|
||||||
#
|
|
||||||
iptables -t nat -A PREROUTING -p tcp --dport 25 -j REDIRECT --to-port 2525
|
|
||||||
iptables -t nat -A OUTPUT -o lo -p tcp --dport 25 -j REDIRECT --to-port 2525
|
|
||||||
iptables -I INPUT -p tcp -m tcp --dport 2525 -j ACCEPT
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# All done
|
# All done
|
||||||
#
|
#
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم