Sending mail with the (mailx) command.
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2018
    Location
    St. Thomas, US Virgin Islands
    Posts
    15
    Windows NT 10.0 Mozilla OS-Browser Compatible

    Sending mail with the (mailx) command.

    Good Day,

    I'm still fairly new to this, so sorry for the basic question, but I tried sending an email with the mailx command. When I first tried to send a message, I got an error message stating something to the extent of usr/sbin/sendmail doesn't exist. As a result, I downloaded sendmail, and that went away. When I sent it, it says "EOT," so I think it's setup correctly, but I don't think it actually sent mail anyplace. I feel that something is missing from my Linux box, like where the mail is being sent from. From the command line, it defaults to my last name @localhost, but that doesn't seem to be a true address for sending mail. Any help would be greatly appreciated.

    Regards,

  2. #2
    Join Date
    Jul 2004
    Location
    Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
    Age
    73
    Posts
    23,565
    Linux (Fedora) Firefox 61.0

    Re: Sending mail with the (mailx) command.

    You could open a terminal and get information using the "man" command (i.e. 'man sendmail' and 'man mailx' ), but may I ask why you're not using the more common and easier options of Evolution and/or Thunderbird?
    Linux & Beer - That TOTALLY Computes!
    Registered Linux User #362651


    Don't use any of my solutions on working computers or near small children.

  3. #3
    Join Date
    Dec 2012
    Location
    santa barbara, CA
    Posts
    926
    Linux (Fedora) Firefox 61.0

    Re: Sending mail with the (mailx) command.

    su -
    dnf install mailx
    dnf install postfix

    vi /etc/postfix/main.cf
    myhostname = your_fully_qualified_domain.name
    relayhost = your_SMTP_relay_host_or_IP_number (maybe given to you by your provider)

    systemctl start postfix
    systemctl enable postfix

    mail your_email@some.where
    Subject: test
    haha
    .

    done
    "monsters John ... monsters from the ID..."
    "ma vule teva maar gul nol naya"

  4. #4
    Join Date
    Jun 2018
    Location
    St. Thomas, US Virgin Islands
    Posts
    15
    iOS  11.4 (iPhone) Safari 11.0

    Re: Sending mail with the (mailx) command.

    Bob,

    I’ve been reading a book to enhance my Linux knowledge, and it was using sendmail.

    I did skim the man pages, but I will go through it more carefully. I will also check out Evolution and Thunderbird.

    Thanks

  5. #5
    Join Date
    Jan 2010
    Posts
    7,350
    Linux Chrome 67.0.3396.99

    Re: Sending mail with the (mailx) command.

    Evolution and Thunderbird are mail clients like Outlook or Mac Mail. These days, RedHat, and some others have replaced sendmail with postfix, which is often a bit simpler to use.

    If this is just simple testing for your knowledge, then you may want to set up sendmail or postfix to use your ISP's mail host. The something@localhost is only going to be useful for internal system messages. The /var/log/maillog file can sometimes be useful. To prevent spamming, some ISP's, such as Verizon in the US, block the default port 25.

  6. #6
    Join Date
    Jun 2018
    Location
    St. Thomas, US Virgin Islands
    Posts
    15
    Windows NT 10.0 Chrome 64.0.3282.140

    Re: Sending mail with the (mailx) command.

    Thanks all,

    I will try all of your suggestions.

  7. #7
    Join Date
    Jun 2018
    Location
    St. Thomas, US Virgin Islands
    Posts
    15
    Windows NT 10.0 Chrome 64.0.3282.140

    Re: Sending mail with the (mailx) command.

    Bob,

    Before, I try your way, this is what I was looking at. Does this make sense to you?


    dnl # The following causes sendmail to only listen on the IPv4 loopback address
    dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
    dnl # address restriction to accept email from the internet or intranet.
    dnl #
    dn1 #DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
    dnl #

    This was in the sendmail.mc file. I also got into the sendmail.cf, but I got an error message to not edit that file only the mc file.

    Regards,

  8. #8
    Join Date
    Jun 2018
    Location
    St. Thomas, US Virgin Islands
    Posts
    15
    Windows NT 10.0 Chrome 64.0.3282.140

    Re: Sending mail with the (mailx) command.

    Does removing the dnl # makes the line inactive, and for the DAEMON_OPTIONS, would I have to put an smtp, Addr and MTA name. I'm not sure what the MTstands for (Mail Transfer A)

  9. #9
    Join Date
    Dec 2012
    Location
    santa barbara, CA
    Posts
    926
    Linux (Fedora) Firefox 61.0

    Re: Sending mail with the (mailx) command.

    hmmm, it's been a long time since I dealt with sendmail, however, I remember only changing 3 or 4 lines in sendmail.cf to make it work.

    If I remember correctly, the key was always not to create "loops" , whereas the sendmail server "loops to itself", and that is mostly related to the proper way to set the machine's domain name, and /etc/hosts to properly define its IP number and name, and not just localhost.localdomain, and then replicate this in the sendmail.cf

    maybe some sendmail fanatic here can explain some more.
    "monsters John ... monsters from the ID..."
    "ma vule teva maar gul nol naya"

Similar Threads

  1. Fedora19 and sending attachments (mailx)
    By gg_in_nj in forum Servers & Networking
    Replies: 0
    Last Post: 9th October 2013, 03:23 PM
  2. local mail (mailx Heirloom Mail) not working
    By zacharysturgeon in forum Servers & Networking
    Replies: 0
    Last Post: 10th January 2011, 09:16 PM
  3. Sendmail -- sending mail with the mail command -- doesn't work :-(
    By carolinevdh in forum Servers & Networking
    Replies: 1
    Last Post: 13th August 2009, 07:18 PM
  4. sending mail with the mail command from a crontab..
    By NetNut404 in forum Using Fedora
    Replies: 7
    Last Post: 12th July 2006, 05:48 PM
  5. Brainfart: Sending mail from command line...
    By mattm in forum Using Fedora
    Replies: 3
    Last Post: 8th March 2005, 08:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •