AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-528599

User Rebo's questions

Martin Hope
User Rebo
Asked: 2020-02-22 23:32:44 +0800 CST

使用 SSL 和动态 dns 将 SLD 重定向到注册商上的子域

  • 0

我想在注册商本身(但在自己的服务器上)没有 SSL 证书的情况下将https://example.com二级域重定向/转发到子域。https://www.example.com

我的问题是,我没有静态 IP,所以不能使用 A-Record / AAAA-Record,只能使用 DynDNS 地址。还尝试了 Alias / A-Name,但他们只将 SLD 重定向到 SLD。简单转发不考虑SSL,只考虑简单http。我也很满意,通过自己的服务器重定向它,但 SLD 无论如何都不能转发到我的服务器,因为它必须通过动态 dns 服务(只有子域)连接。

(拥有 namecheap 作为注册商和 DynDns)

subdomain domain-registrar ssl-certificate
  • 1 个回答
  • 130 Views
Martin Hope
User Rebo
Asked: 2019-06-23 04:08:01 +0800 CST

带有 Dovecot 的后缀(Imap):没有可用的身份验证

  • 2

我正在使用 Dovecot 让 Imap 访问我的邮件服务器(在 Raspbian 上)。我正在使用系统用户并且能够成功测试登录 ( doveadm auth test ...)。但我无法通过 telnet 获得 auth 选项:

sudo telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 mail.mydomain.org ESMTP Postfix
sudo telnet localhost 143
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

我错过了wiki[AUTH=PLAIN]中提到的状态。我没有得到关于 systemctl 状态的任何错误。我不知道还能尝试什么!你能帮我吗?

谢谢!!


我的鸽舍配置dovecot -n

# 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: Linux 4.19.42-v7+ armv7l Debian 9.9 
auth_debug_passwords = yes
auth_mechanisms = plain login
auth_username_format = %Ln
auth_verbose = yes
auth_verbose_passwords = yes
debug_log_path = /etc/dovecot/log/debug.txt
info_log_path = /etc/dovecot/log/info.txt
mail_debug = yes
mail_location = mbox:~/mail:INBOX=/var/mail/%u
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext

passdb {
  driver = shadow
}
plugin {
  sieve = file:~/sieve;active=~/.dovecot.sieve
}
protocols = imap lmtp sieve

service auth-worker {
  name = auth-worker
}
service {
  unix_listener {
    group = postfix
    mode = 0660
    user = postfix
    path = /var/spool/postfix/private/auth
  }
  name = auth
}

service {
  inet_listener {
    port = 143
    name = imap
  }
  inet_listener {
    port = 993
    ssl = yes
    name = imaps
  }
  name = imap-login
}

service {
  unix_listener {
    group = postfix
    mode = 0600
    user = postfix
    path = /var/spool/postfix/private/dovecot-lmtp
  }
  name = lmtp
}

ssl_cert = /etc/letsencrypt/live/mail.mydomain.org/cert.pem
ssl_key =  # hidden, use -P to show it
userdb {
  driver = passwd
}
verbose_ssl = yes
protocol lmtp {
  mail_plugins = quota sieve
  postmaster_address = [email protected]
}
protocol lda {
  ...
}
protocol imap {
  ...
}
protocol sieve {
  ...
}

我的后缀/etc/postfix/main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
myhostname = mail.mydomain.org
mydomain = mydomain.org
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 127.0.0.0/8
#relay_domains =
#home_mailbox = Maildir/
inet_protocols = ipv4, ipv6

# TLS
smtpd_use_tls=yes
smtpd_tls_auth_only = yes
smtp_tls_security_level = yes
smtpd_tls_security_level = may
smtpd_tls_cert_file=/etc/letsencrypt/live/mail.mydomain.org/fullchain.pem
smtpd_tls_key_file=/etc/letsencrypt/live/mail.mydomain.org/privkey.pem

# Authentication
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
smtpd_sasl_local_domain = $mydomain

# when mail location = maildir:~/.maildir
mailbox_transport = lmtp:unix:private/dovecot-lmtp
# Virtual user scenario
virtual_transport = lmtp:unix:private/dovecot-lmtp

biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2


我的后缀/etc/postfix/master.cf

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       y       -       -       smtpd
#smtp      inet  n       -       y       -       1       postscreen
#smtpd     pass  -       -       y       -       -       smtpd
#dnsblog   unix  -       -       y       -       0       dnsblog
#tlsproxy  unix  -       -       y       -       0       tlsproxy
submission inet n       -       y       -       -       smtpd
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_sasl_type=dovecot
  -o smtpd_sasl_path=private/auth
  -o smtpd_sasl_security_options=noanonymous
  -o smtpd_sasl_local_domain=$myhostname
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
  -o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject
  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING

网络统计sudo netstat -tulpn | grep LISTEN:

tcp        0      0 0.0.0.0:4190            0.0.0.0:*               LISTEN      7055/dovecot        
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      7055/dovecot        
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      6999/master         
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      7055/dovecot        
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      6999/master         
tcp6       0      0 :::443                  :::*                    LISTEN      657/apache2         
tcp6       0      0 :::4190                 :::*                    LISTEN      7055/dovecot        
tcp6       0      0 :::993                  :::*                    LISTEN      7055/dovecot        
tcp6       0      0 :::587                  :::*                    LISTEN      6999/master         
tcp6       0      0 :::143                  :::*                    LISTEN      7055/dovecot        
tcp6       0      0 :::80                   :::*                    LISTEN      657/apache2         
tcp6       0      0 :::25                   :::*                    LISTEN      6999/master 

编辑1: 我收到了这个命令错误openssl s_client -connect localhost:imaps

write:errno=104
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 198 bytes
Verification: OK
---

但事实证明,我在and路径<之前忘记了。ssl_certssl_key

postfix
  • 1 个回答
  • 794 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve