sendmail 550-用户@ip 验证失败

sendmail 550-用户@ip 验证失败

我在使用托管服务的 Ubuntu 20 服务器上使用 VPS。我已经安装了 sendmail,当我向 gmail 和 hotmail 以及我的其他共享托管邮件发送电子邮件时,如下所示:

$ sendmail [email protected]

test
.

    

我收到了他的回复:

   >N   1 Mail Delivery Subs Sat Feb  3 10:47  65/2477  Returned mail: see transcript for details

Return-Path: <MAILER-DAEMON@[ip here]>                                                                                        
Received: from localhost (localhost)                                                                                               
        by 1cr0.l.[host].cloud (8.15.2/8.15.2/Debian-18) id 4138lWgN1238461;                                                      
        Sat, 3 Feb 2024 10:47:32 +0200                                                                                             
Date: Sat, 3 Feb 2024 10:47:32 +0200                                                                                               
From: Mail Delivery Subsystem <MAILER-DAEMON@[ip here]>                                                                       
Message-Id: <[email protected].[host].cloud>                                                                    
To: <[user]@[ip here]>                                                                                                           
MIME-Version: 1.0                                                                                                                  
Content-Type: multipart/report; report-type=delivery-status;                                                                       
        boundary="4138lWgN1238461.1706950052/1cr0.l.[host].cloud"                                                                 
Subject: Returned mail: see transcript for details                                                                                 
Auto-Submitted: auto-generated (failure)                                                                                           
                                                                                                                                   
This is a MIME-encapsulated message                                                                                                
                                                                                                                                                                                      
                                                                                                                                   
The original message was received at Sat, 3 Feb 2024 10:46:52 +0200                                                                
from localhost [127.0.0.1]                                                                                                         
                                                                                                                                   
   ----- The following addresses had permanent fatal errors -----                                                                  
<[email protected]>                                                                                                             
    (reason: 550-Verification failed for <[user]@[ip here])                                                                     

   ----- Transcript of session follows -----
... while talking to matjiry.com.:
>>> DATA
<<< 550-Verification failed for <[user]@[IP here]>
<<< 550-The mail server does not recognize [user]@[IP here] as a valid sender.
<<< 550 Sender verify failed
550 5.1.1 <[email protected]>... User unknown
<<< 503-All RCPT commands were rejected with this error:
<<< 503-Sender verify failed
<<< 503 Valid RCPT command must precede DATA

Content-Type: message/delivery-status

Reporting-MTA: dns; [host here]
Received-From-MTA: DNS; localhost
Arrival-Date: Sat, 3 Feb 2024 10:46:52 +0200

Final-Recipient: RFC822; [email protected]
Action: failed
Status: 5.1.1
Remote-MTA: DNS; matjiry.com
Diagnostic-Code: SMTP; 550-Verification failed for <[user]@[IP Address]>
Last-Attempt-Date: Sat, 3 Feb 2024 10:47:32 +0200


Content-Type: text/rfc822-headers

Return-Path: <[user]@1cr0.l.[host].cloud>
Received: from [user]@1cr0.l.[host].cloud (localhost [127.0.0.1])
        by [user]@1cr0.l.[host].cloud (8.15.2/8.15.2/Debian-18) with ESMTP id 4138kqgN1238459
        for <[email protected]>; Sat, 3 Feb 2024 10:46:52 +0200
Received: (from [user]@localhost)
        by 1cr0.l.[host].cloud (8.15.2/8.15.2/Submit) id 4138koc51238457
        for [email protected]; Sat, 3 Feb 2024 10:46:50 +0200
Date: Sat, 3 Feb 2024 10:46:50 +0200
From: [user]@1cr0.l.[host].cloud
Message-Id: <something here>

知道是什么原因造成的吗?我也尝试过从 hotmail/gmail 向我的 VPS 发送消息,但没有收到任何电子邮件。

但是,我从当前用户向root用户发送了一封电子邮件,并且被收到了。

更多信息:

我也有这个/etc/hosts

127.0.0.1 localhost [mywebsite_name].com

文件mail.log

Feb  7 11:13:32 1cr0 sm-mta[205477]: 4129Ca151181080: to=<[email protected]>, delay=5+00:00:56, xdelay=00:02:10, mailer=esmtp, pri=51510000, relay=realdomain.com. [199.59.243.225], dsn=4.0.0, stat=Deferred: Connection timed out with realdomain.com.
Feb  7 11:13:32 1cr0 sm-mta[205477]: 4129Ca151181080: to=MAILER-DAEMON, delay=5+00:00:56, mailer=local, pri=51510000, dsn=5.1.1, stat=User unknown
Feb  7 11:13:32 1cr0 sm-mta[205477]: 4129Ca151181080: 4179BM71205477: return to sender: Cannot send message for 5 days
Feb  7 11:13:32 1cr0 sm-mta[205477]: 4179BM71205477: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Feb  7 11:13:32 1cr0 sm-mta[205477]: 4129GV2T1181209: to=<[email protected]>, delay=4+23:57:01, xdelay=00:00:00, mailer=esmtp, pri=51510000, relay=realdomain.com., dsn=4.0.0, stat=Deferred: Connection timed out with realdomain.com.
Feb  7 11:13:32 1cr0 sm-mta[205477]: 41296rmd1180904: to=<[email protected]>, delay=5+00:06:39, xdelay=00:00:00, mailer=esmtp, pri=51600000, relay=realdomain.com., dsn=4.0.0, stat=Deferred: Connection timed out with realdomain.com.
Feb  7 11:13:32 1cr0 sm-mta[205477]: 41296rmd1180904: to=MAILER-DAEMON, delay=5+00:06:39, mailer=local, pri=51600000, dsn=5.1.1, stat=User unknown
Feb  7 11:13:32 1cr0 sm-mta[205477]: 41296rmd1180904: 4179BM72205477: return to sender: Cannot send message for 5 days
Feb  7 11:13:32 1cr0 sm-mta[205477]: 4179BM72205477: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Feb  7 11:13:32 1cr0 sm-mta[205477]: 412968Bg1180857: to=<[email protected]>, delay=5+00:07:24, xdelay=00:00:00, mailer=esmtp, pri=51600000, relay=realdomain.com., dsn=4.0.0, stat=Deferred: Connection timed out with realdomain.com.
Feb  7 11:13:32 1cr0 sm-mta[205477]: 412968Bg1180857: to=MAILER-DAEMON, delay=5+00:07:24, mailer=local, pri=51600000, dsn=5.1.1, stat=User unknown
Feb  7 11:13:32 1cr0 sm-mta[205477]: 412968Bg1180857: 4179BM73205477: return to sender: Cannot send message for 5 days
Feb  7 11:13:32 1cr0 sm-mta[205477]: 4179BM73205477: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Feb  7 11:13:32 1cr0 sm-mta[205477]: 4129B9Ha1181032: to=<[email protected]>, delay=5+00:02:23, xdelay=00:00:00, mailer=esmtp, pri=51600000, relay=realdomain.com., dsn=4.0.0, stat=Deferred: Connection timed out with realdomain.com.
Feb  7 11:13:32 1cr0 sm-mta[205477]: 4129B9Ha1181032: to=MAILER-DAEMON, delay=5+00:02:23, mailer=local, pri=51600000, dsn=5.1.1, stat=User unknown
Feb  7 11:13:32 1cr0 sm-mta[205477]: 4129B9Ha1181032: 4179BM74205477: return to sender: Cannot send message for 5 days
Feb  7 11:13:32 1cr0 sm-mta[205477]: 4179BM74205477: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Feb  7 11:23:32 1cr0 sm-mta[205808]: 4129GV2T1181209: to=<[email protected]>, delay=5+00:07:01, xdelay=00:02:10, mailer=esmtp, pri=51600000, relay=realdomain.com. [199.59.243.225], dsn=4.0.0, stat=Deferred: Connection timed out with realdomain.com.
Feb  7 11:23:32 1cr0 sm-mta[205808]: 4129GV2T1181209: to=MAILER-DAEMON, delay=5+00:07:01, mailer=local, pri=51600000, dsn=5.1.1, stat=User unknown
Feb  7 11:23:32 1cr0 sm-mta[205808]: 4129GV2T1181209: 4179LM71205808: return to sender: Cannot send message for 5 days
Feb  7 11:23:32 1cr0 sm-mta[205808]: 4179LM71205808: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Feb  7 14:47:12 1cr0 sendmail[212640]: 417ClAvX212640: from=tmc, size=6, class=0, nrcpts=1, msgid=<[email protected]>, relay=tmc@localhost
Feb  7 14:47:17 1cr0 sm-mta[212642]: 417ClCqh212642: from=<[email protected]>, size=293, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=1cr0.l.hostens.cloud [127.0.0.1]
Feb  7 14:47:17 1cr0 opendkim[60291]: 417ClCqh212642: no signing table match for '[email protected]'
Feb  7 14:47:17 1cr0 opendkim[60291]: 417ClCqh212642: no signature data
Feb  7 14:47:17 1cr0 sendmail[212640]: 417ClAvX212640: [email protected], ctladdr=tmc (1000/1000), delay=00:00:07, xdelay=00:00:05, mailer=relay, pri=30006, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (417ClCqh212642 Message accepted for delivery)
Feb  7 14:47:18 1cr0 sm-mta[212647]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
Feb  7 14:47:18 1cr0 sm-mta[212647]: 417ClCqh212642: to=<[email protected]>, ctladdr=<[email protected]> (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120293, relay=gmail-smtp-in.l.google.com. [64.233.165.27], dsn=5.0.0, stat=Service unavailable
Feb  7 14:47:18 1cr0 sm-mta[212647]: 417ClCqh212642: 417ClIqh212647: DSN: Service unavailable
Feb  7 14:47:18 1cr0 sm-mta[212647]: 417ClIqh212647: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Feb  7 14:56:50 1cr0 sendmail[212931]: 417CuiaH212931: from=tmc, size=16, class=0, nrcpts=1, msgid=<[email protected]>, relay=tmc@localhost
Feb  7 14:56:50 1cr0 sm-mta[212936]: 417CuoFF212936: from=<[email protected]>, size=303, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=1cr0.l.hostens.cloud [127.0.0.1]
Feb  7 14:56:50 1cr0 opendkim[60291]: 417CuoFF212936: no signing table match for '[email protected]'
Feb  7 14:56:50 1cr0 opendkim[60291]: 417CuoFF212936: no signature data
Feb  7 14:56:50 1cr0 sendmail[212931]: 417CuiaH212931: [email protected], ctladdr=tmc (1000/1000), delay=00:00:06, xdelay=00:00:00, mailer=relay, pri=30016, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (417CuoFF212936 Message accepted for delivery)
Feb  7 14:56:50 1cr0 sm-mta[212939]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
Feb  7 14:56:51 1cr0 sm-mta[212939]: 417CuoFF212936: to=<[email protected]>, ctladdr=<[email protected]> (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120303, relay=gmail-smtp-in.l.google.com. [64.233.165.27], dsn=5.0.0, stat=Service unavailable
Feb  7 14:56:51 1cr0 sm-mta[212939]: 417CuoFF212936: 417CupFF212939: DSN: Service unavailable
Feb  7 14:56:51 1cr0 sm-mta[212939]: 417CupFF212939: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Feb  8 12:04:17 1cr0 sendmail[253253]: 418A4He6253253: [email protected], size=177, class=0, nrcpts=2, msgid=<[email protected]>, relay=tmc@localhost
Feb  8 12:04:17 1cr0 sm-mta[253255]: 418A4HXq253255: from=<[email protected]>, size=438, class=0, nrcpts=2, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=1cr0.l.hostens.cloud [127.0.0.1]
Feb  8 12:04:17 1cr0 opendkim[60291]: 418A4HXq253255: no signing table match for '[email protected]'
Feb  8 12:04:17 1cr0 opendkim[60291]: 418A4HXq253255: no signature data
Feb  8 12:04:17 1cr0 sendmail[253253]: 418A4He6253253: to=<[email protected]>,<[email protected]>, [email protected] (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=60177, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (418A4HXq253255 Message accepted for delivery)
Feb  8 12:04:18 1cr0 sm-mta[253257]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
Feb  8 12:04:18 1cr0 sm-mta[253257]: 418A4HXq253255: to=<[email protected]>, ctladdr=<[email protected]> (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=150438, relay=gmail-smtp-in.l.google.com. [64.233.164.26], dsn=5.0.0, stat=Service unavailable
Feb  8 12:04:18 1cr0 sm-mta[253257]: 418A4HXq253255: to=<[email protected]>, ctladdr=<[email protected]> (1000/1000), delay=00:00:01, xdelay=00:00:00, mailer=esmtp, pri=150438, relay=poobel.com. [194.135.94.254], dsn=4.0.0, stat=Deferred: Connection refused by poobel.com.
Feb  8 12:04:18 1cr0 sm-mta[253257]: 418A4HXq253255: 418A4IXq253257: DSN: Service unavailable
Feb  8 12:04:18 1cr0 sm-mta[253257]: 418A4IXq253257: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Feb  8 12:05:03 1cr0 sendmail[253286]: 418A53no253286: [email protected], size=116, class=0, nrcpts=2, msgid=<[email protected]>, relay=tmc@localhost
Feb  8 12:05:03 1cr0 sm-mta[253287]: 418A537p253287: from=<[email protected]>, size=377, class=0, nrcpts=2, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=1cr0.l.hostens.cloud [127.0.0.1]
Feb  8 12:05:03 1cr0 opendkim[60291]: 418A537p253287: no signing table match for '[email protected]'
Feb  8 12:05:03 1cr0 opendkim[60291]: 418A537p253287: no signature data
Feb  8 12:05:03 1cr0 sendmail[253286]: 418A53no253286: to=<[email protected]>,<[email protected]>, [email protected] (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=60116, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (418A537p253287 Message accepted for delivery)
Feb  8 12:05:03 1cr0 sm-mta[253289]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
Feb  8 12:05:04 1cr0 sm-mta[253289]: 418A537p253287: to=<[email protected]>, ctladdr=<[email protected]> (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=150377, relay=gmail-smtp-in.l.google.com. [64.233.164.26], dsn=5.0.0, stat=Service unavailable
Feb  8 12:05:04 1cr0 sm-mta[253289]: 418A537p253287: to=<[email protected]>, ctladdr=<[email protected]> (1000/1000), delay=00:00:01, xdelay=00:00:00, mailer=esmtp, pri=150377, relay=poobel.com. [194.135.94.254], dsn=4.0.0, stat=Deferred: Connection refused by poobel.com.
Feb  8 12:05:04 1cr0 sm-mta[253289]: 418A537p253287: 418A547p253289: DSN: Service unavailable
Feb  8 12:05:04 1cr0 sm-mta[253289]: 418A547p253289: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent

文件sendmail.conf

# /etc/mail/sendmail.conf
DAEMON_NETMODE="Static";
DAEMON_NETIF="eth0";
DAEMON_MODE="Daemon";
DAEMON_PARMS="";
DAEMON_HOSTSTATS="No";
DAEMON_MAILSTATS="No";
QUEUE_MODE="${DAEMON_MODE}";
QUEUE_INTERVAL="10m";
QUEUE_PARMS="";
MSP_MODE="Cron";
MSP_INTERVAL="20m";
MSP_PARMS="";
MSP_MAILSTATS="${DAEMON_MAILSTATS}";
MISC_PARMS="";
CRON_MAILTO="root";
CRON_PARMS="";
LOG_CMDS="No";
HANDS_OFF="No";
AGE_DATA="";
DAEMON_RUNASUSER="No";
DAEMON_STATS="${DAEMON_MAILSTATS}";
MSP_STATS="${MSP_MAILSTATS}";

文件sendmail.mc内容:

divert(-1)dnl
divert(0)dnl
dnl define('SMART_HOST', 'smtp.1cr0.l.hostens.cloud')dnl
define(`_USE_ETC_MAIL_')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc, v 8.15.2-18 2020-03-08 00:39:49 cowboy Exp $')
OSTYPE(`debian')dnl
DOMAIN(`debian-mta')dnl
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
undefine(`confHOST_STATUS_DIRECTORY')dnl        #DAEMON_HOSTSTATS=
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
dnl #
dnl # General defines
dnl #
dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot()
dnl #   into this directory before writing files.
dnl #   If *all* your user accounts are under /home then use that
dnl #   instead - it will prevent any writes outside of /home !
dnl #   define(`confSAFE_FILE_ENV',             `')dnl
dnl #
dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!!
dnl # Remove `, Addr=' clauses to receive from any interface
dnl # If you want to support IPv6, switch the commented/uncommentd lines
dnl #
FEATURE(`no_default_msa')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl
dnl #
dnl # Be somewhat anal in what we allow
define(`confPRIVACY_FLAGS',dnl
`needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
dnl #
dnl # Define connection throttling and window length
define(`confCONNECTION_RATE_THROTTLE', `15')dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
dnl #
dnl # Features
dnl #
dnl # use /etc/mail/local-host-names
FEATURE(`use_cw_file')dnl
dnl #
dnl # The access db is the basis for most of sendmail's checking
FEATURE(`access_db', , `skip')dnl
dnl #
dnl # The greet_pause feature stops some automail bots - but check the
dnl # provided access db for details on excluding localhosts...
FEATURE(`greet_pause', `1000')dnl 1 seconds
dnl #
dnl # Delay_checks allows sender<->recipient checking
FEATURE(`delay_checks', `friend', `n')dnl
dnl #
dnl # If we get too many bad recipients, slow things down...
define(`confBAD_RCPT_THROTTLE',`3')dnl
dnl #
dnl # Stop connections that overflow our concurrent and time connection rates
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl
dnl #
dnl # If you're on a dialup link, you should enable this - so sendmail
dnl # will not bring up the link (it will queue mail for later)
dnl define(`confCON_EXPENSIVE',`True')dnl
dnl #
dnl # Dialup/LAN connection overrides
dnl #
include(`/etc/mail/m4/dialup.m4')dnl
include(`/etc/mail/m4/provider.m4')dnl
dnl #
dnl # Masquerading options
FEATURE(`always_add_domain')dnl
MASQUERADE_AS(`194.135.94.254.')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
dnl #
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl

INPUT_MAIL_FILTER(`opendkim', `S=inet:[email protected]')

相关内容