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-58830

Andrew Savinykh's questions

Martin Hope
Andrew Savinykh
Asked: 2022-01-28 16:10:24 +0800 CST

如何编写脚本检查 known_hosts 文件中的密钥是否正确

  • 1

我想在脚本中实现一个函数,该函数检查与 known_hosts 文件中给定主机对应的密钥是否正确。显而易见的方法是尝试 ssh 连接并解析它是否会导致 known_hosts 警告。由于以下原因,这是次优的:

  • 如果主机不在know_hosts 文件中,则需要单独检查
  • 它依赖于可能会更改的警告的特定措辞
  • 它在您不需要运行的目标服务器上为您运行一个 ssh 命令,并且可能由于不同的原因(例如指定的登录 shell)而失败
  • 需要有效的凭据

我试图找到可能用于该检查的选项ssh-keyscan和ssh-keygen命令,但没有找到它们。

进行此检查的最简单方法是什么?

scripting ssh
  • 3 个回答
  • 119 Views
Martin Hope
Andrew Savinykh
Asked: 2020-03-19 12:10:42 +0800 CST

当 Web 服务器日志中的远程地址为 xy0.0 时,这是什么意思?

  • 0

我正在尝试为 kubernetes 设置网络策略,以及更一般的问题,我可以在这里找到。

出于这个特定问题的目的,这是我在 nginx 日志中得到的行:

10.244.0.0 - - [18/Mar/2020:19:47:16 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.69.1-DEV" "192.168.80.88"

注意$remote_addrnginx 看到的,它是10.244.0.0. 但这不是一个真实的IP地址!

我读了这个问题,看起来,有时这样的地址可能是有效的,但这不是标准的。

对于这个问题,管理的 CNI 插件10.244.0.0/16是Calico。

对于它的价值,如果我尝试在NetworkPolicy 对象 10.244.0.0/32中列入白名单,则上述请求将停止通过,这再次向我确认这不是真正的 IP。但是,如果我将他们列入白名单10.244.0.0/16,他们就没有问题。

是什么让 nginx 认为请求来自这个 xy0.0 地址?我如何模仿它,用 curl 说?

networking ip nginx
  • 1 个回答
  • 105 Views
Martin Hope
Andrew Savinykh
Asked: 2018-03-29 15:22:57 +0800 CST

“服务器拒绝分配 pty” - 如何自动挂载 devpts?

  • 2

在过去的半年里,我每个工作日都在使用托管在 vSphere 中的这个盒子 ubuntu 16.04 盒子。我正在使用 putty/kitty 从 Windows 连接到它。今天,我收到了与此问题中类似的消息。

我不确定是什么原因造成的。这是消息:

Authenticating with public key "imported-openssh-key"
Server refused to allocate pty
Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-116-generic x86_64)

                                                                   * Documentation:  https://help.ubuntu.com
                                                                                                             * Management:     https://landscape.canonical.com
                                                                                                                                                               * Support:        https://ubuntu.com/advantage

                                                                                                                                                                                                             0 packages can be updated.
                                                                                                                                                                                                                                       0 updates are security updates.

我保留了打印出来的格式。

这个答案解决了这个问题,但是我必须在每次重新启动时输入命令:

mount devpts /dev/pts -t devpts

添加 fstab 行,如链接所示,也在原始问题答案之一中给出,似乎没有任何改变。

老实说,我不知道为什么直到现在我才需要安装这个设备,然后突然它停止工作,我需要这个安装。

为我解决此问题的正确方法是什么,以便我不需要在每次重新启动后手动安装它?很高兴提供您可能要求的日志或其他诊断。

更新

所以最初我通过重建盒子来解决这个问题,但现在它又发生了,它也开始发生在我管理的其他机器上。

按照菲利普的回答。

运行gzip -dc /boot/initrd.img-$(uname -r) | cpio -i --quiet --to-stdout init | grep devpts给

mount -t devpts -o noexec,nosuid,gid=5,mode=0620 devpts /dev/pts || true

运行gzip -dc /boot/initrd.img-$(uname -r) | cpio -i --quiet --to-stdout scripts/init-bottom/udev | grep move给

# move the /dev tmpfs to the rootfs
mount -n -o move /dev ${rootmnt}/dev

使用“调试”开关运行会给出此输出。

我还能做些什么来找到问题的根本原因?

重新sudo update-initramfs -c -k $(uname -r)生成后重新生成没有产生任何可见的变化。

这是我在手动安装 devpts 前后在 mtab 中看到的内容:

>sudo cat /etc/mtab | grep devpts
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666 0 0
>sudo mount devpts /dev/pts -t devpts
>sudo cat /etc/mtab | grep devpts
devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600,ptmxmode=000 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666 0 0
devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
ubuntu
  • 3 个回答
  • 4225 Views
Martin Hope
Andrew Savinykh
Asked: 2015-03-01 11:16:56 +0800 CST

为什么我会收到这些电子邮件?

  • 3

不久前,我注意到来自我域的电子邮件不会立即由 google 发送,并且我从 google 服务器收到一条 smtp 错误消息。我不记得该消息的确切措辞,但谷歌搜索它,建议我需要设置 SPF 和 DKIP 记录。我做到了。它解决了谷歌不接受电子邮件的问题。然而现在,几周后,它打开了返回电子邮件的闸门。以下是我将域名替换为 mydomain.com 的一个示例

Return-Path: <MAILER-DAEMON>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-172-31-14-136
X-Spam-Level: 
X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,
  DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,
  RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0
Delivered-To: andrews@mydomain.com
Received: from mail-wg0-f68.google.com (mail-wg0-f68.google.com [74.125.82.68])
  by service.mydomain.com (Postfix) with ESMTPS id B2D5C3CD9
  for <fambfmii@mydomain.com>; Sun,  1 Mar 2015 04:20:12 +1300 (NZDT)
Authentication-Results: service.mydomain.com; dkim=pass
  reason="2048-bit key; unprotected key"
  header.d=googlemail.com header.i=@googlemail.com header.b=flcXD2tw;
  dkim-adsp=pass; dkim-atps=neutral
Received: by wghb13 with SMTP id b13so6428727wgh.2
        for <fambfmii@mydomain.com>; Sat, 28 Feb 2015 07:20:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=20120113;
        h=mime-version:from:to:subject:message-id:date:content-type;
        bh=thNUSyqg9cxzoVV3wQQPzs5jLQUlj/POqhrDqY/p1+s=;
        b=flcXD2tw+G6XLYhwGlNqRunKXmEqanLfLfxserILW3WU+m5ezqkCcQFIeYEHAoIznM
         QVIbSv2NWM9ypPc7iEVESIYUv2b2jBYz1kU46U+qZPYx7Gdw57RbZ7PgfnQpKcfoc101
         eVbgX+vb5y9oIxIs6yjr9ggnoMn2/5P2UxdlF9QOY9ATaRHmLPupfTJHrdgzBPV696rR
         033d6A6a8lFQRR9ReN4OKHHVNrwiiZpmSo0E8lAp+aU2VPrnQSK0fzFr5qdz3ZpVI7hl
         c162Q9P+5uGggaSz70xc1vDaQRg3Ch7axLL3YGNSZjqkQGBEYOvCEyLgnYcPucvqPDpx
         jiXQ==
X-Received: by 10.180.91.79 with SMTP id cc15mr9706181wib.37.1425136810420;
        Sat, 28 Feb 2015 07:20:10 -0800 (PST)
MIME-Version: 1.0
Received: by 10.180.91.79 with SMTP id cc15mr6423807wib.37; Sat, 28 Feb 2015
 07:20:10 -0800 (PST)
From: Mail Delivery Subsystem <mailer-daemon@googlemail.com>
To: fambfmii@mydomain.com
X-Failed-Recipients: pl8798@gone.bristol.ac.uk
Subject: Delivery Status Notification (Failure)
Message-ID: <f46d043be24657694405102785cc@google.com>
Date: Sat, 28 Feb 2015 15:20:10 +0000
Content-Type: text/plain; charset=UTF-8

Delivery to the following recipient failed permanently:

     pl8798@gone.bristol.ac.uk

Technical details of permanent failure: 
Google tried to deliver your message, but it was rejected by the server for the recipient domain gone.bristol.ac.uk by aspmx.l.google.com. [173.194.78.27].

The error that the other server returned was:
550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 q6si9283951wic.32 - gsmtp


----- Original message -----

X-Received: by 10.180.91.79 with SMTP id cc15mr9706178wib.37.1425136810390;
        Sat, 28 Feb 2015 07:20:10 -0800 (PST)
X-Gm-Message-State: ALoCoQnh7/8Nv8/oHTiqX41mEzEmq5oNlGy3zy9p01XvfZJzOXyug+NN1QL8PqIJE56gTu5omL6Iy8tNn2AMT43KwsrGdBs94LPANr7ogrNhdcQTKEM2z86gPVU+j4dvqeA9AziAbSPqtFZXBhNv4pZmS8GMWor91A==
X-Received: by 10.180.91.79 with SMTP id cc15mr9706170wib.37.1425136810311;
        Sat, 28 Feb 2015 07:20:10 -0800 (PST)
Return-Path: <fambfmii@mydomain.com>
Received: from mail-we0-f174.google.com (mail-we0-f174.google.com. [74.125.82.174])
        by mx.google.com with ESMTPS id ei1si9166190wib.92.2015.02.28.07.20.09
        for <pl8798@my.bristol.ac.uk>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 28 Feb 2015 07:20:09 -0800 (PST)
Received-SPF: pass (google.com: domain of fambfmii@mydomain.com designates 74.125.82.174 as permitted sender) client-ip=74.125.82.174;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of fambfmii@mydomain.com designates 74.125.82.174 as permitted sender) smtp.mail=fambfmii@mydomain.com
Received: by wevm14 with SMTP id m14so25473931wev.13
        for <pl8798@my.bristol.ac.uk>; Sat, 28 Feb 2015 07:20:09 -0800 (PST)
X-Received: by 10.180.86.227 with SMTP id s3mr16337114wiz.58.1425126758697;
        Sat, 28 Feb 2015 04:32:38 -0800 (PST)
X-Received: by 10.180.86.227 with SMTP id s3mr16337091wiz.58.1425126758539;
        Sat, 28 Feb 2015 04:32:38 -0800 (PST)
Return-Path: <fambfmii@mydomain.com>
Received: from psmtp.com (eu1sys200amx130.postini.com. [207.126.144.199])
        by mx.google.com with SMTP id jw7si8639670wid.30.2015.02.28.04.32.24;
        Sat, 28 Feb 2015 04:32:36 -0800 (PST)
Received-SPF: softfail (google.com: domain of transitioning fambfmii@mydomain.com does not designate 104.220.1.229 as permitted sender) client-ip=104.220.1.229;
Received: from 207.126.147.10 ([104.220.1.229]) by eu1sys200amx130.postini.com ([207.126.147.10]) with SMTP;
  Sat, 28 Feb 2015 12:32:35 GMT
Message-ID: <33056530637875-BYSNNTYECPKUCTWUAKMJCCT@wikjczxin.brillian.com>
From: "Charlotte Freeman" <Charlotte.Freeman@brillian.com>
Subject: Re: Afraid of awkward situations? New ED meds won't let you down!
To: sanjida.oconnell@bristol.ac.uk
Date: Sat, 28 Feb 2015 18:27:35 +0600
Mime-Version: 1.0
Content-Type: text/html;
Content-Transfer-Encoding: 7Bit
X-pstn-mail-from: <fambfmii@mydomain.com>
X-pstn-levels: (S: 0.00000/ 4.08422 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
X-pstn-dkim: 0 skipped:not-enabled
X-pstn-status: off
X-pstn-nxpr: disp=neutral, envrcpt=pl8798@bristol.ac.uk
X-pstn-nxp: bodyHash=7f565d975b7ab6918b9cc998090b1e19665421b6, headerHash=4e9622b17df37a9b31ee0f1651d42a67c3d3570d, keyName=4, rcptHash=6bfa24bd4d3660f3d9132cffc038b04e7adf948c, sourceip=104.220.1.229, version=1
X-pstn-nxp: bodyHash=7f565d975b7ab6918b9cc998090b1e19665421b6, headerHash=4e9622b17df37a9b31ee0f1651d42a67c3d3570d, keyName=4, rcptHash=6bfa24bd4d3660f3d9132cffc038b04e7adf948c, sourceip=104.220.1.229, version=1

----- End of message -----

谷歌似乎接受并尝试发送来自我的域的垃圾邮件。在我看来,这些电子邮件不是通过我的 smtp 服务器进入系统的,因为电子邮件中没有与它匹配的 ips。看起来这些只是从收件人邮件系统退回到指定为发件人的地址(该地址在我的域中不存在,最终出现在包罗万象的邮箱中)。

我现在一天能收到几百个。这可能是因为我以某种方式错误配置了 SPF 吗?

这是我的 spf 记录:

v=spf1 a mx include:_spf.google.com ~all

我的大部分设置(除了我最近添加的 SPF 和 DKIP)都在这里描述:Postfix/Dovecot permissions on new files in a mailbox)

email
  • 1 个回答
  • 1138 Views
Martin Hope
Andrew Savinykh
Asked: 2014-07-07 13:26:40 +0800 CST

检查给定用户是否具有给定权限

  • 16

给定一对用户和一个特权,我需要确定用户是否在服务器上具有特权。在我的设置中,以下是正确的:

  • 服务器是域的一部分,但不是域控制器
  • 基础设施中有多个具有信任关系的域
  • 有时用户(本地、域或来自不同域)可以属于本地组,因为他们属于属于本地组的其他组(域或本地),而不是直接属于该组。

最后一点的示例场景:

  • User1 属于 DomainA 中的组 TeamA
  • DomaimA\TeamA 是 DomainB\SpecialAccess 的成员
  • DomainB\SpecialAccess 是 DomainB\DomainAdmins 的成员
  • 最后 DomainB\DomainAdmins 属于本地管理员组
  • 本地管理员组具有 SeRemoteInteractiveLogonRight 特权

现在,如果我有输入 DomainA\User1 和 SeRemoteInteractiveLogonRight 我需要到达是或否的答案。所以我在机器上打开本地策略,注意我感兴趣的右边列出了哪些组,然后去服务器管理器查看组成员的内容,然后我需要查看这些组中任何组的哪些成员等等。

我有一种直觉,它可以更容易。当我发现AccessChk 实用程序时我真的很兴奋它持续了整整三分钟,我发现它只列出了直接关系,因此不会列出组内的用户。

现在我猜测有可能将 AccessChk 的结果结合起来,以便我可以检查用户是否属于 AccessChk 返回的任何组,但鉴于它不是单个域,而是其中几个我是不知道如何解决这个问题。此外,AccessChk 输出似乎没有区分组和用户。

编辑:本着不陷入 XY 问题陷阱的精神,我真正需要做的是确保在一组服务器上,没有用作 IIS 应用程序池标识的特定用户帐户具有 SeInteractiveLogonRight 或 SeRemoteInteractiveLogonRight 权限。我对 IIS 部分没有任何问题,但是根据特权检查帐户的最后一步是我正在努力寻找一种简单的检查方法。我也想自动化检查,因为这是需要定期进行的事情。

windows
  • 1 个回答
  • 994 Views
Martin Hope
Andrew Savinykh
Asked: 2013-05-16 01:27:22 +0800 CST

邮箱中新文件的 Postfix/Dovecot 权限

  • 3

根据这篇文章:

在邮箱中创建新文件时,Dovecot 会从邮箱目录中复制读/写权限。

我没有看到这个。这是我所看到的:

andrewsav@hroon-precis:~$ dovecot --version
2.0.19
andrewsav@hroon-precis:~$ sudo ls -al /var/mail/vhosts/myhost.com/andrews
total 76
d-wxrws--- 6 vmail vmail  4096 May 15 19:53 .
drwxrwsr-x 4 vmail vmail  4096 Mar  8 07:27 ..
drwxrws--- 2 vmail vmail  4096 May 15 19:53 cur
-rw-rwS--- 1 vmail vmail   288 May 12 20:49 dovecot.index
-rw-rwS--- 1 vmail vmail 31316 May 15 19:53 dovecot.index.log
-rw-rwS--- 1 vmail vmail    24 Dec 13 14:27 dovecot.mailbox.log
-rw-rw---- 1 vmail vmail    54 May 15 19:53 dovecot-uidlist
-rw-rwS--- 1 vmail vmail     8 Dec 13 14:32 dovecot-uidvalidity
-r--rwSr-- 1 vmail vmail     0 Dec 12 22:34 dovecot-uidvalidity.50c84fbc
drwxrws--- 2 vmail vmail  4096 May 15 21:15 new
-rw-rwS--- 1 vmail vmail     6 Dec 13 14:27 subscriptions
drwxrws--- 2 vmail vmail  4096 May 15 21:15 tmp
drwxrws--- 5 vmail vmail  4096 Dec 13 14:32 .Trash
andrewsav@hroon-precis:~$ sudo ls -al /var/mail/vhosts/myhost.com/andrews/new
total 24
drwxrws--- 2 vmail vmail 4096 May 15 21:15 .
d-wxrws--- 6 vmail vmail 4096 May 15 19:53 ..
-rw------- 1 vmail vmail 3435 May 15 19:54 1368604473.Vca02I500e0M443155.hroon-precis
-rw------- 1 vmail vmail 4028 May 15 20:42 1368607343.Vca02I500e1M96785.hroon-precis
-rw------- 1 vmail vmail 4623 May 15 21:15 1368609338.Vca02I500fcM737208.hroon-precis
andrewsav@hroon-precis:~$

邮件目录对组有 rw,而新目录中的个别文件由于某种原因没有 rw。因此,他们无法被希望访问的人员/进程访问。我错过了什么?

我正在运行 ubuntu 12.04LTS

更新 1

提供一点背景知识:我已经运行 postfix+dovecot 有一段时间了。根据此文档,它的安装有小偏差。通常邮箱不在本地访问,远程客户端通过 POP/IMAP 访问。

但是我发现偶尔在服务器上运行mutt很有用。如果我运行它,我可以做的很好

sudo mutt -f /var/mail/vhosts/myhost.com/andrews

但是我希望能够在没有sudo 的情况下运行它,这就是麻烦开始的地方。我将 myslef 添加到 vmail 组中,并将以下行添加到 .muttrc 中:

set spoolfile = '/var/mail/vhosts/myhost.com/andrews/'
alternates myhost.com
set reverse_name = yes
set from = 'andrews@myhost.com'

但这不起作用,除非我明确地对 new 和 cur 执行 chmod g+rw。而且它只在新邮件到达之前有效,因为新邮件没有那个 rw。

无论如何我可以解决这个问题吗?

更新 2

在聊天中与 NickW 讨论了这个问题后,我们得出的结论是,实际上是 Postfix 在编写这些文件,而不是 Dovecot。LDA 很可能是Postfix virtual。这是 Postfix 配置。

主.cf:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

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

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/apache2/ssl/my.crt
smtpd_tls_key_file=/etc/apache2/ssl/my.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = myhost.myhost.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = myhost.com, hroon-precis, localhost.localdomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
#smtpd_tls_wrappermode=yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_tls_auth_only = no
#smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_tls_security_level=may

virtual_mailbox_domains = myhost.com
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_alias_maps = hash:/etc/postfix/virtual
mydomain = myhost.com

transport_maps = hash:/etc/postfix/transport

大师.cf

#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd
#smtp      inet  n       -       -       -       1       postscreen
#smtpd     pass  -       -       -       -       -       smtpd
#dnsblog   unix  -       -       -       -       0       dnsblog
#tlsproxy  unix  -       -       -       -       0       tlsproxy
#submission inet n       -       -       -       -       smtpd
#  -o syslog_name=postfix/submission
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       -       -       -       smtpd
#  -o syslog_name=postfix/smtps
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
#   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
#  mailbox_transport = lmtp:inet:localhost
#  virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
# Old example of delivery via Cyrus.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix  -   n   n   -   2   pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

运输:

info@myhost.com discard:
sales@myhost.com discard:
webmaster@myhost.com discard:

v邮箱:

user1@myhost.com myhost.com/user1/
user2@myhost.com myhost.com/user2/
... etc
andrews@myhost.com myhost.com/andrews/
@myhost.com myhost.com/andrews/

我搜索了 Postfix 文档,但无法找到一种方法来为邮箱中新创建的邮件消息文件指定 Postfix 的权限。

我的想法是这可能是不可能的,然后必须有另一种设置 mutt 的方法,这样它就可以访问 maildirs 而无需执行 sudo/be root。

任何提示表示赞赏。

postfix
  • 2 个回答
  • 17883 Views
Martin Hope
Andrew Savinykh
Asked: 2012-06-21 20:46:56 +0800 CST

Windows的进程跟踪工具

  • 1

Process Explorer可以显示当前正在运行的进程,也可以显示每个进程启动时使用的命令行。是否有一种工具可以捕获在使用相应命令行运行该工具时启动和完成的进程的踪迹?

windows system-monitoring
  • 1 个回答
  • 2024 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