Disclaimer: There is a post with a very similar problem to mine here, but since that thread is already tagged as "Solved" I decided not to resurrect it.
Hello folks,
I would like to receive all periodic(8) email on my personal email address, thus I created an alias for "root" in /etc/mail/aliases:
Followed by
Checking :
Sending email to myuser@mail.example.com works and emails is sent to my email address, however sending email to root is being sent to root@hostname.example.com, where "hostname" is the name of the freebsd machine from which I am sending the email and it is getting relay denied and ultimately being deferred.
Can anyone spot what is wrong with my setup? Any additional tests I should perform to get to bottom of this problem?
Below are logs additional:
Hello folks,
I would like to receive all periodic(8) email on my personal email address, thus I created an alias for "root" in /etc/mail/aliases:
Code:
# Pretty much everything else in this file points to "root", so
# you would do well in either reading root's mailbox or forwarding
# root's email from here.
root: myuser@mail.example.com
newaliases
to build the alias database.Checking :
Code:
sendmail -bv -d27.20 root
setalias(/etc/mail/aliases)
map implicit:Alias0 /etc/mail/aliases
alias(root)
aliaswait(implicit:/etc/mail/aliases)
root (, root) aliased to myuser@mail.example.com
alias: QS_EXPANDED 0x2ad6e592b548=root:
mailer 3 (local), host `'
user `root', ruser `<null>'
state=OK, next=0x0, alias 0x0, uid 0, gid 0
flags=100182<QPRIMARY,QPINGONFAILURE,QPINGONDELAY,QSECURE>
owner=(none), home="(none)", fullname="(none)"
orcpt="(none)", statmta=(none), status=(none)
finalrcpt="RFC822; root@hostname.example.com"
rstatus="(none)"
statdate=(none)
self_reference(myuser@mail.example.com)
... no self ref
myuser@mail.example.com... deliverable: mailer esmtp, host mail.example.com., user myuser@mail.example.com
Sending email to myuser@mail.example.com works and emails is sent to my email address, however sending email to root is being sent to root@hostname.example.com, where "hostname" is the name of the freebsd machine from which I am sending the email and it is getting relay denied and ultimately being deferred.
Can anyone spot what is wrong with my setup? Any additional tests I should perform to get to bottom of this problem?
Below are logs additional:
Code:
sendmail -v -t root
Hello World
Testing alias
.
root... Connecting to mail.example.com. via relay...
220 mail.example.com ESMTP Postfix
>>> EHLO hostname.example.com
250-mail.example.com
250-PIPELINING
250-SIZE 40000000
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250-BINARYMIME
250 CHUNKING
>>> STARTTLS
220 2.0.0 Ready to start TLS
>>> EHLO hostname.example.com
250-mail.example.com
250-PIPELINING
250-SIZE 40000000
250-ETRN
250-AUTH LOGIN PLAIN CRAM-MD5 DIGEST-MD5
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250-BINARYMIME
250 CHUNKING
>>> MAIL From:<localadmin@hostname.example.com> SIZE=19
250 2.1.0 Ok
>>> RCPT To:<root@hostname.example.com>
>>> DATA
454 4.7.1 <root@hostname.example.com>: Relay access denied
root... Deferred: 454 4.7.1 <root@hostname.example.com>: Relay access denied
554 5.5.1 Error: no valid recipients
>>> RSET
250 2.0.0 Ok
Closing connection to mail.example.com.
>>> QUIT
221 2.0.0 Bye
Code:
Apr 21 13:00:00 hostname sendmail[9560]: 33LH004s009560: from=root, size=368, class=0, nrcpts=1, msgid=<202304211700.33LH004s009560@hostname.example.com>, relay=root@localhost
Apr 21 13:00:00 hostname sendmail[9560]: STARTTLS=client, relay=mail.example.com., version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256/256
Apr 21 13:00:00 hostname sendmail[9560]: 33LH004s009560: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30368, relay=mail.example.com. [12.34.56.78], dsn=4.7.1, reply=454 4.7.1 <root@hostname.example.com>: Relay access denied, stat=Deferred: 454 4.7.1 <root@hostname.example.com>: Relay access denied
Last edited by a moderator: