发往本地主机的电子邮件是否使用 sSMTP 记录?

发往本地主机的电子邮件是否使用 sSMTP 记录?

我认为 sSMTP 不适用于在本地主机上发送邮件?

nicholas@mordor:~$ 
nicholas@mordor:~$ sudo cat /etc/ssmtp/ssmtp.conf
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postmaster

# The place where the mail goes. The actual machine name is required no 
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=mail

# Where will the mail seem to come from?
#rewriteDomain=

# The full hostname
hostname=mordor.saundersconsulting.tech

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
#FromLineOverride=YES
nicholas@mordor:~$ 
nicholas@mordor:~$ sudo cat /etc/ssmtp/revaliases
# sSMTP aliases
# 
# Format:   local_account:outgoing_address:mailhub
#
# Example: root:[email protected]:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
nicholas@mordor:~$ 
nicholas@mordor:~$ swaks --to [email protected] --from [email protected] --server mordor.saundersconsulting.tech
=== Trying mordor.saundersconsulting.tech:25...
*** Error connecting to mordor.saundersconsulting.tech:25:
***     IO::Socket::INET6: connect: Connection refused
nicholas@mordor:~$ 
nicholas@mordor:~$ hostname
mordor.saundersconsulting.tech
nicholas@mordor:~$ 
nicholas@mordor:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 23.10
Release:    23.10
Codename:   mantic
nicholas@mordor:~$ 

除了之前尝试过的 mail.log 和 mail.err 中的 gmail 之外,没有提及任何内容。 据我了解 sSMTP 只会中继电子邮件。

显着的结果:

nicholas@mordor:~$ 
nicholas@mordor:~$ ssmtp [email protected]
subject:ping

ssmtp: Cannot open mail:25
nicholas@mordor:~$ 

sSMTP 无法打开端口 25?

答案1

来自 linux/debian 软件包的描述ssmtp

软件包:ssmtp
...

Description-en: 极其简单的 MTA,用于将邮件从系统发送到邮件中心 一种将邮件从系统发送到邮件中心的安全、有效且简单的方法。它不包含任何 suid 二进制文件或其他危险的东西 - 没有邮件线轴可供查看,也没有后台运行的守护进程。邮件只是转发到配置的邮件主机。配置极其简单。 。
警告:以上就是它的全部作用;它不接收邮件、扩展别名或管理队列。这属于系统管理员的邮件中心。

相关内容