LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-25-2020, 07:40 PM   #1
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Rep: Reputation: 56
prepping for mailx version v15 from 14.9.17


with v15 there's supposedly a whole bunch of changes, hence why I've been getting nagged with
Code:
mailx: Warning: variable superseded or obsoleted: smtp
mailx: Warning: variable superseded or obsoleted: smtp-auth-user
mailx: Warning: variable superseded or obsoleted: smtp-auth-password
mailx: Warning: variable superseded or obsoleted: ssl-verify
mailx: Obsoletion warning: please do not use *smtp*, instead assign a smtp:// URL to *mta*!
mailx: Obsoletion warning: Use of old-style credentials, which will vanish in v15!
mailx:   Please read the manual section "On URL syntax and credential lookup"
What I currently have, which works perfectly fine aside from the nagging messages, is:
Code:
nail -r "username@gmail.com" \
  -S smtp-use-starttls \
  -S smtp-auth=login \
  -S smtp=smtp://smtp.gmail.com:587 \
  -S from="username@gmail.com" \
  -S smtp-auth-user=username@gmail.com \
  -S smtp-auth-password=password \
  -S ssl-verify=ignore \
  -S nss-config-dir=/root/scripts \
  -s "${where1} SSH Alert" ${cc_to} ${bcc_to} ${mailto} >&2 <<-EOM
   ${what} from ${where2} at ${when}
EOM
I've tried the following:
Code:
mta="smtps://username@gmail.com:password@smtp.gmail.com:587 smtp-use-starttls
nail -r "username@gmail.com" \
  -S smtp-auth=login \
  -S from="username@gmail.com" \
  -S nss-config-dir=/root/scripts \
  -s "${where1} SSH Alert" ${cc_to} ${bcc_to} ${mailto} >&2 <<-EOM
   ${what} from ${where2} at ${when}
EOM
but nothing sends... any ideas?
 
Old 03-26-2020, 02:08 AM   #2
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,784

Rep: Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460
I don't know, but I had to do some changes to my mailing scripts a while ago, and when it looked like I had to do it again after s-nail-14.9.15, I decided to save my time and stay at 14.9.15. And my scripts only send messages to an SMTP server without any kind of authentication or encryption!
 
Old 03-26-2020, 06:21 PM   #3
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
I don't use a direct command line for the latest nail but rather a ~/.mailrc. The below works flawlessly with the latest nail, perhaps you could extract the appropriate command line arguments from it:

Code:
#--------------------------------------------#
# Setting mailx version v14.9.17 for gmail   #
#--------------------------------------------#

# Testing syntax:
# echo "Testing, Testing, Testing" | mailx -s "My test..." address@whatever.com

# Use v15.0 compatibility mode
set v15-compat

# See the whole process, especially for troubleshooting:
set verbose

# Essential setting: select allowed character sets
set sendcharsets=utf-8,iso-8859-1
# and reply in the same charset used by sender:
set reply-in-same-charset

# Default directory where we act in (relative to $HOME)
set folder=mail

# You actual address to reply to:
set from="xxxx.xxxx.xxxx@whatever.com"

# Request strict TLS transport layer security checks
set tls-verify=strict
set tls-ca-file=/etc/ssl/certs/ca-certificates.crt
set tls-ca-no-defaults
set smtp-use-starttls
set smtp-auth=login

# When sending messages, wait until the Mail-Transfer-Agent finishs.
# Only like this you will be able to see errors reported through the
# exit status of the MTA (including the built-in SMTP one)!
set sendwait

# And of course put your own gmail username and
# password here in the obvious places:

set mta=smtps://USER:PASSWORD@smtp.gmail.com:465

#--------------------------------------------#

Last edited by andrew.46; 03-27-2020 at 12:32 AM.
 
1 members found this post helpful.
Old 04-06-2020, 01:42 PM   #4
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by andrew.46 View Post
I don't use a direct command line for the latest nail but rather a ~/.mailrc. The below works flawlessly with the latest nail, perhaps you could extract the appropriate command line arguments from it:

Code:
#--------------------------------------------#
# Setting mailx version v14.9.17 for gmail   #
#--------------------------------------------#
apologies for the delay, but wanted to thank you for this! was not able to convert the .mailrc over to something usable in my /etc/ssh/sshrc, so I went with the .mailrc approach and have to admit that it's much simpler and cleaner going with this method. in fact I was able to reuse this for my mdadm and smartd email setup too!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "Snorkeling on an empty pipe": error in S-mailx (mailx 4.19.11) RandomTroll Linux - Software 0 11-30-2018 10:45 PM
LXer: GSConnect v15 Released With Rewritten Gnome Shell UI, Option To Send Keyboard Events From Desktop To Android LXer Syndicated Linux News 0 11-08-2018 06:54 PM
Launcher Ubuntu v15 not found gordc Linux - Newbie 2 05-23-2015 10:01 AM
TO ANYONE USING MAILX (mailx 12.1). stf92 Linux - Software 22 07-08-2010 09:44 PM
LXer: Novell prepping Moblin version of SUSE LXer Syndicated Linux News 0 05-07-2009 11:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration