Results 1 to 4 of 4

Thread: mailx syntax

  1. #1
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,031

    Default mailx syntax

    Hello
    I need help for this mailx command :

    Code:
    mailx -vvv \
      -r "superlinux" \
      -s "Subject: mailx send mail starttls fullsmtp fullname to some_user@isp.com" \
      -S smtp=smtp.isp.com:587 \
      -S smtp-use-starttls \
      -S smtp-auth=digest-md5  \
      -S smtp-auth-user=4aed0c8909e33260970ca8b0448cc065 \
      -S smtp-auth-password=f92b7d80ddb397a953b8d0748d1478bd \
      -S ssl-verify=ignore \
      some_user@isp.com <<< "some text"
    isp mail server accept starttls and accept AUTH CRAM-MD DIGEST-MD

    Code:
    250-STARTTLS
    250-AUTH CRAM-MD5 DIGEST-MD5
    When using
    Code:
    -S smtp-auth=digest-md5
    I got this error :
    Code:
    Unknown SMTP authentication method: "digest-md5"
    or
    Code:
    Unknown SMTP authentication method: "DIGEST-MD5"
    Any help is welcome.
    Thanks for helping. JCD
    __________

    server leap 15-- ASUS g75vw KDE leap 42.3 -- ASUS g750JZ KDE leap 42.3 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,640
    Blog Entries
    15

    Default Re: mailx syntax

    On Wed 04 Jul 2018 01:16:03 PM CDT, jcdole wrote:

    Hello
    I need help for this mailx command :


    Code:
    --------------------
    mailx -vvv \
    -r "superlinux" \
    -s "Subject: mailx send mail starttls fullsmtp fullname to
    some_user@isp.com" \ -S smtp=smtp.isp.com:587 \
    -S smtp-use-starttls \
    -S smtp-auth=digest-md5 \
    -S smtp-auth-user=4aed0c8909e33260970ca8b0448cc065 \
    -S smtp-auth-password=f92b7d80ddb397a953b8d0748d1478bd \
    -S ssl-verify=ignore \
    some_user@isp.com <<< "some text"

    --------------------


    isp mail server accept starttls and accept AUTH CRAM-MD DIGEST-MD


    Code:
    --------------------
    250-STARTTLS
    250-AUTH CRAM-MD5 DIGEST-MD5
    --------------------


    When using

    Code:
    --------------------
    -S smtp-auth=digest-md5
    --------------------

    I got this error :

    Code:
    --------------------
    Unknown SMTP authentication method: "digest-md5"
    --------------------

    or

    Code:
    --------------------
    Unknown SMTP authentication method: "DIGEST-MD5"
    --------------------


    Any help is welcome.


    Hi
    From the mailx man page...
    Code:
    smtp-auth
    Sets  the  SMTP  authentication method.  If set to
    `login', or if unset and smtp-auth-user is set, AUTH LOGIN is used.  If
    set to `cram-md5', AUTH CRAM-MD5 is used; if set to `plain', AUTH PLAIN
    is used.  Otherwise, no SMTP authentication is performed.
    So I would guess it needs to be login,/plain or use imap and would be
    cram-md5?

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SLES 15 | GNOME Shell 3.26.2 | 4.12.14-23-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  3. #3
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,031

    Default Re: mailx syntax

    Quote Originally Posted by malcolmlewis View Post
    Hi
    ...........
    ...........
    ...........
    The error come from my local mail server :
    Code:
    Connecting to 192.168.130.80:25 . . . connected.
    220 mydomain ESMTP
    .........
    not from recipient mail server ( smtp.isp.com: ) because I have just forgotten to configure the relayhost parameter on the local mail server.

    So the story is not finished.

    I finished the configuration, and give news as soon as possible.
    Thanks for helping. JCD
    __________

    server leap 15-- ASUS g75vw KDE leap 42.3 -- ASUS g750JZ KDE leap 42.3 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  4. #4
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,031

    Default [CLOSED] : mailx syntax

    After having configured postfix for relaying I am able to send mail using mailx for test.

    1°) Add local mail server to /etc/mailrc on sender computer
    Code:
    set smtp=smtp://my_mailsrv.my_domain.net
    2°) On the postfix mail server computer verify the /etc/postfix/generic table which contains (left side) the linux user and (right side ) the corresponding ISP user

    3°) On the postfix mail server computer verify the /etc/postfix/sasl_passwd table which contains (left side) [smtp.isp_domain] port and (right side ) the corresponding isp user_name@isp_domain:user_password

    4°) Use this command on the sender computer (which use smtp parameter which is in /etc/mailrc)
    Code:
    mailx -vvv \
            -r $USER@my_local_domain \
            -s "Subject: mailx send mail my_server_smtp sender_name to user_name@isp_domain" \
            user_name@isp_domain <<< "some text"
    Bad parameters in /etc/mailrc prevent mailx to run as needed.
    So when doing test check every things.
    Obvious isn't .

    Any comment is welcome
    Thanks for helping. JCD
    __________

    server leap 15-- ASUS g75vw KDE leap 42.3 -- ASUS g750JZ KDE leap 42.3 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

Posting Permissions

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