Ubuntu

如何讓祈禱網路郵件在 HTTPS 上執行?

  • April 30, 2018

我似乎無法讓 Prayer Webmail 執行 https 埠。我在 Ubuntu 16.04.2 上執行 Exim4+Dovecot。

它在不安全的 http 埠上執行良好——除了它是不安全的(我將埠 8888 用於 http,將埠 8843 用於 https)。

該埠在防火牆中打開。如果我在 8843 上設置一個套接字,我可以連接到它,測試防火牆。

我已經嘗試了幾個不同的埠,所以不是這樣。

在執行時,我沒有得到明顯的錯誤。我遵循了我能找到的所有文件,它在配置文件中對我來說看起來是正確的,但它只會打開 http 埠。如果我禁用了pray.cf 中的http 埠,它將不會像它所說的那樣執行,或者沒有配置為打開的埠。

它能夠很好地載入 .key 和 .crt 文件(如果我更改某些內容,它會因錯誤而關閉,所以它不能)。

有人知道如何讓它在 https 上執行嗎?

這是我的 pray.cf 配置:

prefix      = "/usr/share/prayer"
var_prefix  = "/var/run/prayer"

prayer_user           = "prayer"
prayer_group          = "nogroup"

prayer_background     = TRUE

file_perms            = 0640

directory_perms       = 0750





imapd_user_map      = ""

imapd_server        = localhost/notls

prefs_folder_name   = ".prayer"



accountd_user_map   = ""



accountd_timeout    = 2m


sieved_timeout      = 9m

sieve_maxsize       = 32k









hostname         = "example.com"

use_http_port    8888
use_https_port   8843

#ssl_default_port = 8843



fatal_dump_core = FALSE
log_debug  =  TRUE

fix_client_ipaddr = FALSE




limit_vm = 150m
recips_max_msg     = 250
recips_max_session = 1000
sending_allow_dir = "${var_prefix}/sending/allow"
sending_block_dir = "${var_prefix}/sending/block"



http_max_method_size = 32k
http_max_hdr_size    = 64k

http_max_body_size   = 15m

http_min_servers     = 4
http_max_servers     = 16
http_max_connections = 20

http_cookie_use_port = FALSE

http_timeout_idle    = 10s
http_timeout_icons   = 60s
http_timeout_session = 5m
icon_expire_timeout  = 7d





ssl_cert_file       = "/etc/prayer/server.crt"
ssl_privatekey_file = "/etc/prayer/server.key"

ssl_rsakey_lifespan = 15m
ssl_rsakey_freshen  = 15m

ssl_cipher_list = "ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!EXP"

ssl_server_preference = T




session_idle_time       = 10m
session_timeout         = 30m
session_timeout_compose = 2h

stream_checkpoint       = T
stream_ping_interval    = 20m
stream_misc_timeout = 15m 

log_ping_interval  = 10m
db_ping_interval   = 30m

login_template      = "login"
login_banner        = "WebMAIL"
login_service_name  = "example.com"

list_addr_maxlen    = 30
list_subject_maxlen = 30
change_max_folders  = 20

use_ispell_language  british   "British English"
use_ispell_language  american  "American English"

draft_att_single_max = 10M
draft_att_total_max  = 10M

fix_from_address = FALSE

spam_purge_name = "spam_purge"
spam_purge_prefix = "# Spam Purge Timeout:"
spam_purge_timeout = 60


sendmail_path       = /usr/lib/sendmail


ispell_path         = /usr/bin/ispell





ssl_encouraged      = FALSE
ssl_redirect        = FALSE
ssl_required        = FALSE

icon_dir            = "$prefix/icons"
static_dir          = "$prefix/static"
bin_dir             = "/usr/sbin"
log_dir             = "/var/log/prayer"
lock_dir            = "$var_prefix"
socket_dir          = "$var_prefix/sockets"
socket_split_dir    = TRUE
init_socket_name    = init
ssl_session_dir     = "$var_prefix/ssl_scache"
tmp_dir             = "$var_prefix/tmp"
pid_dir             = "$var_prefix"




template_path = "/etc/prayer/templates"
template_set  = "old"
template_use_compiled = TRUE

template old  "Traditional"
template cam  "Cambridge House Style"


theme blue description           "Web Safe Blue"
theme blue fgcolor               "#000000"       # Black
theme blue fgcolor_link          "#0000ff"       # Dark    Blue
theme blue bgcolor               "#ccffff"       # Light   Blue 
theme blue bgcolor_banner        "#66ffff"       # Darkish Blue
theme blue bgcolor_row1          "#ccffff"       # Light   Blue
theme blue bgcolor_row2          "#99ffff"       # Middle  Blue
theme blue bgcolor_status        "#ffffcc"       # Yellow
theme blue bgcolor_status_none   "#ccffcc"       # Green
theme blue fgcolor_quote1        "#800000"       # Brick Red
theme blue fgcolor_quote2        "#008000"       # Green
theme blue fgcolor_quote3        "#000080"       # Blue
theme blue fgcolor_quote4        "#ff0000"       # Orange

theme green description          "Web Safe Green"
theme green fgcolor              "#000000"       # Black
theme green fgcolor_link         "#0000ff"       # Dark    Blue
theme green bgcolor              "#ccffcc"       # Light   Green
theme green bgcolor_banner       "#99ff99"       # Middle  Green
theme green bgcolor_row1         "#ccffcc"       # Light   Green
theme green bgcolor_row2         "#99ff99"       # Middle  Green
theme green bgcolor_status       "#ffffcc"       # Yellow
theme green bgcolor_status_none  "#ccffff"       # Light   Blue
theme green fgcolor_quote1       "#800000"       # Brick Red
theme green fgcolor_quote2       "#008000"       # Green
theme green fgcolor_quote3       "#000080"       # Blue
theme green fgcolor_quote4       "#ff0000"       # Orange

theme yellow description         "Web Safe Yellow"
theme yellow fgcolor             "#000000"       # Black
theme yellow fgcolor_link        "#0000ff"       # Dark   Blue
theme yellow bgcolor             "#ffffcc"       # Light  Yellow
theme yellow bgcolor_banner      "#ffff66"       # Middle Yellow
theme yellow bgcolor_row1        "#ffffcc"       # Light  Yellow
theme yellow bgcolor_row2        "#ffff66"       # Middle Yellow
theme yellow bgcolor_status      "#ccffff"       # Light  Blue
theme yellow bgcolor_status_none "#ccffcc"       # Green
theme yellow fgcolor_quote1      "#800000"       # Brick Red
theme yellow fgcolor_quote2      "#008000"       # Green
theme yellow fgcolor_quote3      "#000080"       # Blue
theme yellow fgcolor_quote4      "#ff0000"       # Orange

theme gray description          "Shades of Gray" # NB: Not Web safe!
theme gray fgcolor              "#000000"        # Black
theme gray fgcolor_link         "#0000ff"        # Dark   Blue
theme gray bgcolor              "#eeeeee"        # Light  gray
theme gray bgcolor_banner       "#cccccc"        # Dark   gray
theme gray bgcolor_row1         "#eeeeee"        # Light  gray
theme gray bgcolor_row2         "#dddddd"        # Middle gray
theme gray bgcolor_status       "#ffffcc"        # Yellow
theme gray bgcolor_status_none  "#ccffcc"        # Green
theme gray fgcolor_quote1        "#800000"       # Brick Red
theme gray fgcolor_quote2        "#008000"       # Green
theme gray fgcolor_quote3        "#000080"       # Blue
theme gray fgcolor_quote4        "#ff0000"       # Orange

theme high description          "High Constrast" # Yuck!
theme high fgcolor              "#000000"        # Black
theme high fgcolor_link         "#0000ff"        # Dark  Blue
theme high bgcolor              "#ffffff"        # Very, very white
theme high bgcolor_banner       "#cccccc"        # Dark gray
theme high bgcolor_row1         "#ffffff"        # Very, very white
theme high bgcolor_row2         "#cccccc"        # Dark gray
theme high bgcolor_status       "#ffffcc"        # Yellow
theme high bgcolor_status_none  "#ccffcc"        # Green
theme high fgcolor_quote1        "#800000"       # Brick Red
theme high fgcolor_quote2        "#008000"       # Green
theme high fgcolor_quote3        "#000080"       # Blue
theme high fgcolor_quote4        "#ff0000"       # Orange

theme help description          "Default Help Text theme"
theme help fgcolor              "#000000"        # Black
theme help fgcolor_link         "#0000ff"        # Dark Blue
theme help bgcolor              "#ffffcc"        # Yellow
theme help bgcolor_banner       "#66ffff"        # Darkish Blue
theme help bgcolor_row1         "#ccffff"        # Light   Blue
theme help bgcolor_row2         "#99ffff"        # Middle  Blue
theme help bgcolor_status       "#ccffff"        # Light   Blue
theme help bgcolor_status_none  "#ccffcc"        # Green
theme help fgcolor_quote1        "#800000"       # Brick Red
theme help fgcolor_quote2        "#008000"       # Green
theme help fgcolor_quote3        "#000080"       # Blue
theme help fgcolor_quote4        "#ff0000"       # Orange

theme_default_main  = gray
theme_default_help  = help



confirm_logout      = TRUE
confirm_expunge     = FALSE
confirm_rm          = TRUE
expunge_on_exit     = FALSE

msgs_per_page       = 10
msgs_per_page_max   = 50
msgs_per_page_min   = 4

abook_per_page      = 10
abook_per_page_max  = 50
abook_per_page_min  = 4

suppress_dotfiles   = TRUE

maildir             = ""

use_namespace       = TRUE

personal_hierarchy  = ""

hiersep             = "/"

dualuse             = FALSE

postponed_folder    = "Drafts"
sent_mail_folder    = "Sent"


ispell_language     = "american"

small_cols          = 80
small_rows          = 14
large_cols          = 80
large_rows          = 24

sort_mode           = ARRIVAL

sort_reverse        = FALSE

abook_sort_mode     = ORDERED

abook_sort_reverse        = FALSE

line_wrap_len       = 76

line_wrap_advanced  = FALSE

line_wrap_on_reply  = TRUE

line_wrap_on_spell  = TRUE

line_wrap_on_send   = TRUE

use_sent_mail       = TRUE

use_mark_persist    = FALSE

use_search_zoom     = TRUE

use_agg_unmark      = TRUE

use_icons           = TRUE

use_tail_banner     = TRUE

use_cookie          = TRUE

use_substitution    = FALSE

use_http_1_1        = TRUE

use_pipelining      = TRUE

use_persist         = TRUE

use_short           = TRUE

use_gzip            = TRUE

html_inline         = TRUE

html_remote_images  = FALSE

html_inline_auto    = TRUE

preserve_mimetype   = TRUE

好的。所以看起來祈禱實際上是在指定的 https 埠上監聽……有趣的是,在測試時我正在使用 nmap 掃描打開狀態,並且掃描顯示從內部或外部關閉,但我的瀏覽器連接並且我能夠在指定埠上登錄到祈禱 ove https,但它仍然在掃描時顯示已關閉。

這怎麼可能?

引用自:https://serverfault.com/questions/909235