Author Topic: mpack & sendmail problems  (Read 49 times)

0 Members and 1 Guest are viewing this topic.

Offline Keith

  • Hero Member
  • *****
  • Posts: 938
  • Karma: 11
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
mpack & sendmail problems
« on: January 05, 2020, 03:48:44 pm »
I wrote a script ages ago that sends me an email automatically when some function is satisfied.  It has worked well but failed recently, with a message appended suggesting that I visit my mail provider’s website that explains the problem.
Although my application uses mpack, I show below an example using sendmail to demonstrate the problem.  I’ve changed my email address and mail provider for security, but keeping the same formats. 

Terminal command

keith@T500:~$ echo "Subject: sendmail test" | sendmail -v keith_surname@emailco.com
[<-] 220 mailfront20.emailco ESMTP Exim 4.90_1 Ubuntu Wed, 01 Jan 2020 17:06:01 +0100
[->] EHLO T500
[<-] 250 HELP
[->] AUTH LOGIN
[<-] 334 VXNlcm5hbWU6
[->] a2VpdGhfc3RhbW1lcnNAcnVuYm94LmNvbQ==
[<-] 334 UGFzc3dvcmQ6
[<-] 235 Authentication succeeded
[->] MAIL FROM:<keith@emailco.com>
[<-] 250 OK
[->] RCPT TO:<keith_surname@emailco.com>
[<-] 250 Accepted
[->] DATA
[<-] 354 Enter message, ending with "." on a line by itself
[->] Received: by T500 (sSMTP sendmail emulation); Wed, 01 Jan 2020 16:06:01 +0000
[->] From: "keith" <keith@emailco.com>
[->] Date: Wed, 01 Jan 2020 16:06:01 +0000
[->] Subject: sendmail test
[->]
[->] .
[<-] 550 Invalid From address. Please see https://help.emailco.com/identities/
sendmail: 550 Invalid From address. Please see https://help.emailco.com/identities/
keith@T500:~$

You will see at the end the complaint that the From address is wrong and is rejected by my mail company following their updated security measures.  The correct address is shown on the “RCPT TO:” line but in the active line where the correct address needs to be the address has been shortened:  “MAIL FROM: <keith@mailco.com>”.   And perhaps the other "From" line needs to be correct as well.

My email provider now requires that the from address is not an alias and the sSMTP.conf file (shown below) shows my base address correctly (as it always was).  I have even tried changing the Thunderbird default address back to the base address.  So I can’t understand why it has been changed in two places in sendmail.   

Contents of  etc/ssmtp/ssmtp.conf

# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
#root=postmaster
root=keith_surname@emailco.com

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
#mailhub=mail
mailhub=mail.emailco.com:465

AuthUser=keith_surname@emailco.com
AuthPass={my password}
UseTLS=YES
UseSSL=YES

# Where will the mail seem to come from?
#rewriteDomain=
rewriteDomain=emailco.com

# The full hostname
#hostname=MyMediaServer.home
hostname=T500

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES


I would be very grateful for any advice.

    Keith


 


SimplePortal 2.3.3 © 2008-2010, SimplePortal