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

Dor's questions

Martin Hope
Dor
Asked: 2024-04-14 00:48:34 +0800 CST

SMTP 服务器:Postfix w/Dovecot - 如何配置允许的用户名+密码?

  • 5

我正在寻找一个基于 Linux 的 SMTP 服务器。我已经阅读了有关 Postfix SASL 和 Dovecot 的教程和规范,但我找不到如何配置允许通过 SMTP 服务器发送电子邮件的用户名和密码列表 ( smtpd)。

换句话说:

  1. 我应该在哪个文件中添加允许发送电子邮件的每个客户端的用户名和密码?
  2. 我应该指定哪种格式的用户名?用户名应该包含@,例如 ,[email protected]还是不包含@,例如username。

这些是我搜索的来源:

  • 如何在Postfix中设置smtpd的用户名和密码?
  • https://www.postfix.org/SASL_README.html
  • https://ubuntu.com/server/docs/install-and-configure-postfix
postfix
  • 1 个回答
  • 30 Views
Martin Hope
Dor
Asked: 2014-07-20 22:18:10 +0800 CST

将多个物理网络端口关联到 ESXi 的虚拟网络适配器

  • 0

我有一台 ESXi 5.0 机器,带有 1 个内置(在主板上)网络端口,外加 2 个以太网 PCI 卡——每个都有 4 个端口。总结一下——我的机器里一共有9个物理网口。

如何正确地将物理网络端口与 ESXi 的网络标签相关联?
如果重要的话,虚拟机大多是基于 linux 的。

这是使用 VMWare VSphere 客户端 5.0 显示虚拟机配置的图像: 在此处输入图像描述

networking
  • 2 个回答
  • 4383 Views
Martin Hope
Dor
Asked: 2014-04-18 01:21:10 +0800 CST

更改默认网关,多个 NIC

  • 6

我有 Ubuntu 13.10(内核 3.11.0-19-generic)。启动时,网络配置如下:

dor@ubuntu:~$ sudo ifconfig -a
em1       Link encap:Ethernet  HWaddr 44:37:e6:4c:ca:0a  
          inet addr:10.1.0.102  Bcast:10.1.7.255  Mask:255.255.248.0
          inet6 addr: fe80::4637:e6ff:fe4c:ca0a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:732 errors:0 dropped:0 overruns:0 frame:0
          TX packets:79 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:68789 (68.7 KB)  TX bytes:12907 (12.9 KB)
          Interrupt:20 Memory:fe600000-fe620000 

eth5      Link encap:Ethernet  HWaddr 00:0a:5e:50:cf:1e  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:20 Base address:0xa000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:101 errors:0 dropped:0 overruns:0 frame:0
          TX packets:101 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:8485 (8.4 KB)  TX bytes:8485 (8.4 KB)

p4p1      Link encap:Ethernet  HWaddr 00:15:17:0b:6d:1c  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::215:17ff:fe0b:6d1c/64 Scope:Link
          inet6 addr: fc00::215:17ff:fe0b:6d1c/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:41 errors:0 dropped:0 overruns:0 frame:0
          TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4062 (4.0 KB)  TX bytes:15981 (15.9 KB)
          Interrupt:16 Memory:fe540000-fe560000 

dor@ubuntu:~$ sudo route -n
[sudo] password for dor: 
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 p4p1
10.1.0.0        0.0.0.0         255.255.248.0   U     0      0        0 em1
192.168.1.0     0.0.0.0         255.255.255.0   U     1      0        0 p4p1

到 Internet 的网关是 10.1.0.1。所以我手动执行以下操作:

dor@ubuntu:~$ sudo route del default
dor@ubuntu:~$ sudo route add default gw 10.1.0.1

这就是我设法上网的方式。但是,不是每次都手动执行此操作,而是如何使其永久化?

的内容/etc/network/interfaces(删除了一些注释行):

dor@ubuntu:~$ cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto em1

iface eth5 inet static
     address 10.90.90.91
     netmask 255.255.255.0
     gateway 10.90.90.90

iface em1 inet static
     address 10.1.0.102
     netmask 255.255.248.0
     gateway 10.1.0.1

我已经阅读了很多次和许多谷歌结果的手册,interfaces但route无法弄清楚这一点。谢谢你。


编辑#1,2014 年 4 月 17 日 12:11 UTC:( 回复响应者Sobrique)

我已编辑该文件/etc/network/interfaces以具有以下内容:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto em1
#iface em1 inet dhcp

iface eth5 inet static
     address 10.90.90.91
     netmask 255.255.255.0
#     gateway 10.90.90.90

iface p4p1 inet static
     address 192.168.1.32
     netmask 255.255.255.0
#     gateway 192.168.1.22

iface em1 inet static
     address 10.1.0.102
     netmask 255.255.248.0
     gateway 10.1.0.1

现在启动后立即可以访问互联网,无需执行任何命令。
问题是我无法访问网络192.168.1.X。
早些时候有一个访问。我怎样才能解决这个问题?一些数据:

dor@ubuntu:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.1.0.1        0.0.0.0         UG    0      0        0 em1
10.1.0.0        0.0.0.0         255.255.248.0   U     0      0        0 em1
dor@ubuntu:~$ ifconfig -a
em1       Link encap:Ethernet  HWaddr 44:37:e6:4c:ca:0a
          inet addr:10.1.0.102  Bcast:10.1.7.255  Mask:255.255.248.0
          inet6 addr: fe80::4637:e6ff:fe4c:ca0a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:30356 errors:0 dropped:0 overruns:0 frame:0
          TX packets:329 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2752089 (2.7 MB)  TX bytes:43904 (43.9 KB)
          Interrupt:20 Memory:fe600000-fe620000

eth5      Link encap:Ethernet  HWaddr 00:0a:5e:50:cf:1e
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:20

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:97 errors:0 dropped:0 overruns:0 frame:0
          TX packets:97 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8463 (8.4 KB)  TX bytes:8463 (8.4 KB)

p4p1      Link encap:Ethernet  HWaddr 00:15:17:0b:6d:1c
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:16 Memory:fe540000-fe560000

编辑#2,2014 年 4 月 20 日 08:05 UTC:

最终我编辑了文件/etc/network/interfaces以具有以下配置:

auto em1
iface em1 inet dhcp

auto eth5
iface eth5 inet static
     address 10.90.90.91
     netmask 255.255.255.0
     up route add -net 10.90.90.0/24 dev eth5

auto p4p1
iface p4p1 inet static
     address 192.168.1.32
     netmask 255.255.255.0
     up route add -net 192.168.1.0/24 dev p4p1

它奏效了!看:

dor@ubuntu:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.1.0.1        0.0.0.0         UG    0      0        0 em1
10.1.0.0        0.0.0.0         255.255.248.0   U     0      0        0 em1
10.90.90.0      0.0.0.0         255.255.255.0   U     0      0        0 eth5
10.90.90.0      0.0.0.0         255.255.255.0   U     0      0        0 eth5
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 p4p1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 p4p1

唯一的问题是有这些重复项。但它不会干扰任何事情,它仍然有效。


编辑 #3,2014 年 4 月 20 日 09:57 UTC:

事实上,正如我所怀疑的那样,重复是由以下命令引起的:

up route add -net 192.168.1.0/24 dev p4p1

所以我删除了它们。现在一切都很完美。

linux
  • 1 个回答
  • 53721 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