• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Cannot send mail to root?

tempel33

Member


Messages: 20

#26
From /var/log/maillog:
Code:
May 17 12:21:34 dragans sendmail[1405]: o4HHLYtg001405: from=gabi, size=5921, class=0, nrcpts=1, msgid=<201005171721.o4HHLYtg001405@text_replaced_by_me>, relay=gabi@localhost
May 17 12:21:34 dragans sm-mta[1406]: o4HHLYTb001406: <root@(text_replaced_by_me)>... User address required
May 17 12:21:34 dragans sendmail[1405]: o4HHLYtg001405: to=root, ctladdr=gabi (1001/1001), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=35921, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.3, stat=User unknown
May 17 12:21:34 dragans sm-mta[1406]: o4HHLYTb001406: from=<gabi@text_replaced_by_me>, size=5921, class=0, nrcpts=0, proto=ESMTP, daemon=IPv4, relay=localhost [127.0.0.1]
May 17 12:22:08 dragans sendmail[1435]: o4HHM7YW001435: from=gabi, size=311, class=0, nrcpts=1, msgid=<20100517172207.GA1410@text_replaced_by_me>, relay=gabi@localhost
May 17 12:22:08 dragans sm-mta[1436]: o4HHM8op001436: <root@text_replaced_by_me>... User address required
May 17 12:22:08 dragans sendmail[1435]: o4HHM7YW001435: to=root@text_replaced_by_me, ctladdr=gabi (1001/1001), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30311, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.3, stat=User unknown
May 17 12:22:08 dragans sm-mta[1436]: o4HHM8op001436: from=<gabi@text_replaced_by_me>, size=311, class=0, nrcpts=0, proto=ESMTP, daemon=IPv4, relay=localhost [127.0.0.1]
May 17 12:22:08 dragans sendmail[1435]: o4HHM7YW001435: o4HHM7YX001435: DSN: User unknown
May 17 12:22:08 dragans sm-mta[1436]: o4HHM8or001436: from=<>, size=2303, class=0, nrcpts=1, msgid=<201005171722.o4HHM7YX001435@text_replaced_by_me>, proto=ESMTP, daemon=IPv4, relay=localhost [127.0.0.1]
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer

Thanks: 2,584
Messages: 11,212

#27
This is the normal maillog output for a [cmd=]$ echo bla | mail -s "bla" root[/cmd] without root being aliased.

Code:
May 17 19:33:39 box sendmail[75720]: o4HHXdoR075720: from=myself, size=27, class=0, nrcpts=1, msgid=<201005171733.o4HHXdoR075720@my.fqdn.org>, relay=myself@localhost
May 17 19:33:39 box sm-mta[75723]: o4HHXdkW075723: from=<myself@my.fqdn.org>, size=390, class=0, nrcpts=1, msgid=<201005171733.o4HHXdoR075720@my.fqdn.org>, proto=ESMTP, daemon=Daemon0, relay=localhost [127.0.0.1]
May 17 19:33:39 box sendmail[75720]: o4HHXdoR075720: to=root, ctladdr=myself (1001/1001), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30027, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (o4HHXdkW075723 Message accepted for delivery)
May 17 19:33:39 box sm-mta[75724]: o4HHXdkW075723: to=<root@my.fqdn.org>, ctladdr=<myself@my.fqdn.org> (1001/1001), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30677, relay=local, dsn=2.0.0, stat=Sent
 

tempel33

Member


Messages: 20

#29
Nope. All I get is:
Code:
May 17 12:41:32 dragans sendmail[1509]: o4HHfWLN001509: from=gabi, size=27, class=0, nrcpts=1, msgid=<201005171741.o4HHfWLN001509@text_replaced_by_me>, relay=gabi@localhost
May 17 12:41:32 dragans sm-mta[1510]: o4HHfW8a001510: <root@text_replaced_by_me>... User address required
May 17 12:41:32 dragans sendmail[1509]: o4HHfWLN001509: to=root, ctladdr=gabi (1001/1001), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30027, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.3, stat=User unknown
May 17 12:41:32 dragans sm-mta[1510]: o4HHfW8a001510: from=<gabi@text_replaced_by_me>, size=27, class=0, nrcpts=0, proto=ESMTP, daemon=IPv4, relay=localhost [127.0.0.1]
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer

Thanks: 2,584
Messages: 11,212

#30
Weird. Ok, interactive this time.

Bold is the stuff you have to type in. Replace 'my.fqdn.org' with your valid hostname.

Code:
[B]$ telnet 0 25[/B]                                                                                                            
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
220 my.fqdn.org ESMTP Sendmail 8.14.4/8.14.4; Mon, 17 May 2010 19:49:08 +0200 (CEST)
[B]EHLO my.fqdn.org[/B]
250-my.fqdn.org Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
[B]MAIL FROM:<myself@my.fqdn.org>[/B]
250 2.1.0 <myself@my.fqdn.org>... Sender ok
[B]RCPT TO:<root>[/B]
250 2.1.5 <root>... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
[B]test[/B]
[B].[/B] [color="Silver"]<-- yes, a period by itself, followed by 'enter'[/color]
250 2.0.0 o4HHn8dw076421 Message accepted for delivery
[B]quit[/B]
221 2.0.0 my.fqdn.net closing connection
Connection closed by foreign host.
 

tempel33

Member


Messages: 20

#32
However, it does not work with:
Code:
RCPT TO:<root@my_host_address_here>
and therefore seems that something tries to convert "root" into "root@my_host_address_here".
Mutt does such a thing with all local users, but what would do such a conversion in
Code:
$ echo bla | mail -s "bla" root
?
 

tempel33

Member


Messages: 20

#33
SOLVED!!!
I added "root@my_host_address_here root" to /etc/mail/virtusertable
and now I can send mails to root.
Feels sort of clunky, but it works!
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer

Thanks: 2,584
Messages: 11,212

#35
Well, we were working slowly towards something like that, so you skipped ahead. I was about to check whether your machine's full hostname was in /etc/mail/local-host-names. It needs to be in there, or Sendmail will not recognise 'who it is', and virtusertable can then be used for further delivery. Glad it works anyway.
 
Top