mailx Command Tries to Send Mail to Unknown Recipient "-c@localhost" (Doc ID 2297045.1)

Last updated on AUGUST 16, 2017

Applies to:

Linux OS - Version Oracle Linux 5.0 and later
Linux x86-64

Symptoms

Unknown recipient  "-c@localhost" is seen when mail is send using mailx command.

# echo "test" | mailx -v -s "aaaa" recipient1@oracle.com -c recipient2@oracle.com
recipient1@oracle.com,recipient2@oracle.com,-c... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Postfix
>>> EHLO localhost.localdomain
250-localhost.localdomain
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

>>> MAIL From:<root@localhost.localdomain> SIZE=249
250 2.1.0 Ok
>>> RCPT To:<recipient2@oracle.com>
>>> RCPT To:<recipient1@oracle.com>
>>> RCPT To:<-c@localhost.localdomain> <----------------------mail was sent to <-c@localhost.localdomain>
>>> DATA
250 2.1.5 Ok
250 2.1.5 Ok
501 5.1.3 Bad recipient address syntax
354 End data with <CR><LF>.<CR><LF>
>>> .
250 2.0.0 Ok: queued as F2DD9A0989
recipient2@oracle.com,recipient1@oracle.com... Sent (Ok: queued as F2DD9A0989)
>>> RSET

250 2.0.0 Ok
root... Using cached ESMTP connection to [127.0.0.1] via relay...
>>> MAIL From:<> SIZE=1273
250 2.1.0 Ok
>>> RCPT To:<root@localhost.localdomain>
>>> DATA
250 2.1.5 Ok

354 End data with <CR><LF>.<CR><LF>
>>> .
250 2.0.0 Ok: queued as 094ABA098C
root... Sent (Ok: queued as 094ABA098C)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 Bye

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms