我正在尝试更改我的sendmail配置,以便将所有“用户未知”电子邮件发送到特定帐户(baduser)。 我将DL定义添加到sendmail.mc并生成了test.cf. 然后我使用以下方法测试了这个新配置:
回复谁| sendmail -v -Ctest.cf noone并且电子邮件已正确发送到定义的帐户。
然后我将test.cf重命名为sendmail.cf(在/ etc / mail中)并重新测试:
回复什么| sendmail -Csendmail.cf noone
再次将电子邮件发送到baduser帐户。
对此感到高兴,然后我重新启动了sendmail(通过systemctl)并再次向无效帐户发送了一封电子邮件。
我收到了550 5.1.1用户未知的拒绝电子邮件,而不是将电子邮件发送给恶意用户。
我在这里错过了什么。
(Fedora 22& sendmail 8.14.7 / 8.13.3)
以下是拒绝的日志条目。
Nov 27 09:59:19 server sendmail [46243]:tAQNTJQH046243:from = scldad,size = 4,class = 0,nrcpts = 1,msgid =< 201511262329.tAQNTJQH046243@server.benparts.com.au> ,relay = scldad @ localhost
11月27日09:59:19服务器sendmail [46243]:tAQNTJQH046243:to = noone,ctladdr = scldad(1000/1000),delay = 00:00:00,xdelay = 00:00:00,mailer = relay ,pri = 30004,relay = [127.0.0.1] [127.0.0.1],dsn = 5.1.1,stat =用户名不知道
-v -i log:
No domain:
[scldad@server ~]$ (echo subject: test; echo) | /usr/sbin/sendmail -v -i noone
noone... Connecting to [127.0.0.1] via relay...
220 server.benparts.com.au ESMTP Sendmail 8.14.7/8.13.3; Sat, 28 Nov 2015 13:29:02 +1030
>>> EHLO server.benparts.com.au
250-server.benparts.com.au Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<scldad@server.benparts.com.au> SIZE=15
250 2.1.0 <scldad@server.benparts.com.au>... Sender ok
>>> RCPT To:<noone@server.benparts.com.au>
>>> DATA
550 5.1.1 <noone@server.benparts.com.au>... User unknown
503 5.0.0 Need RCPT (recipient)
>>> RSET
250 2.0.0 Reset state
/home/scldad/dead.letter... Saved message in /home/scldad/dead.letter
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 server.benparts.com.au closing connection
With domain:
[scldad@server ~]$ (echo subject: test; echo) | /usr/sbin/sendmail -v -i noone@benparts.com.au
noone@benparts.com.au... Connecting to [127.0.0.1] via relay...
220 server.benparts.com.au ESMTP Sendmail 8.14.7/8.13.3; Sat, 28 Nov 2015 13:27:38 +1030
>>> EHLO server.benparts.com.au
250-server.benparts.com.au Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<scldad@server.benparts.com.au> SIZE=15
250 2.1.0 <scldad@server.benparts.com.au>... Sender ok
>>> RCPT To:<noone@benparts.com.au>
>>> DATA
550 5.1.1 <noone@benparts.com.au>... User unknown
503 5.0.0 Need RCPT (recipient)
>>> RSET
250 2.0.0 Reset state
/home/scldad/dead.letter... Saved message in /home/scldad/dead.letter
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 server.benparts.com.au closing connection
As root:
[root@server ~]# (echo subject: test; echo) | /usr/sbin/sendmail -v -i noone
noone... Connecting to [127.0.0.1] via relay...
220 server.benparts.com.au ESMTP Sendmail 8.14.7/8.13.3; Sat, 28 Nov 2015 13:30:00 +1030
>>> EHLO server.benparts.com.au
250-server.benparts.com.au Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<scldad@server.benparts.com.au> SIZE=15
250 2.1.0 <scldad@server.benparts.com.au>... Sender ok
>>> RCPT To:<noone@server.benparts.com.au>
>>> DATA
550 5.1.1 <noone@server.benparts.com.au>... User unknown
503 5.0.0 Need RCPT (recipient)
>>> RSET
250 2.0.0 Reset state
>>> RSET
250 2.0.0 Reset state
scldad... Using cached ESMTP connection to [127.0.0.1] via relay...
>>> MAIL From:<> SIZE=1039
250 2.1.0 <>... Sender ok
>>> RCPT To:<scldad@server.benparts.com.au>
>>> DATA
250 2.1.5 <scldad@server.benparts.com.au>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <scldad@server.benparts.com.au>... Connecting to local...
050 <scldad@server.benparts.com.au>... Sent
250 2.0.0 tAS300jh034101 Message accepted for delivery
scldad... Sent (tAS300jh034101 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 server.benparts.com.au closing connection