0
  • I normally don't have to do much with setting up Ubuntu email, so I'm basically a beginner at it, please be kind.
  • I have Sendemail 1.56 by Brandon Sehm on Ubuntu 14.04.02LTS. The Ubuntu machine name is "ubuntucomp.net". Sendemail is the only mail package that doesn't require an MTA and full registered domain address. My VM Ubuntu machine does not have a registered domain because I only want to send email within our local network.
  • Email is outgoing only from ubuntu.net. There is no need to receive email.
  • I use Sendemail from the command line to send emails with attachments, which are backups of Perl files. Backups are run by cron and the job backs up files and emails them to my work address, me@mywork.com, within our network.
  • smtp.mywork.com uses a non standard port, 2500, which I specify on the sendemail command line: sendemail -f me@mywork.com -t me@mywork.com -u "Perl test ubuntu backups $zipfile" -s smtp.mywork.com:2500 -l $basedir/smtp.log -S /usr/sbin/sendmail -a $zipfile < $basedir/mailbody.txt
  • Sendemail seems to use /usr/sbin/sendmail.
  • The new smtp server Sendemail does not work with is smtp.mywork.com. It requires no username and no password for authentication, but the From: address must be "me@mywork.com".
  • I will never have admin access to smtp.mywork.com, and no one else does either. So let's not go there. I have to work around this. I know it's silly, but there's nothing I can do about that.
  • Also, the new smtp.mywork.com works fine with my other perl programs running on this same machine, but not with sendemail from the command line.

Sendemail worked fine with one Godaddy server, but now I have to change servers to use one in our own network, call it smtp.mywork.com, set up by someone else. Also, the new smtp.mywork.com works fine with my other perl programs, but not with sendemail. I've double checked the man pages, googled for answers, but found nothing helpful.

The original message was received at Thu, 6 Aug 2015 13:49:44 -0400
from localhost [127.0.0.1]

   ----- The following addresses had permanent fatal errors -----
<me@mywork.com>
    (reason: 550 relay not permitted)

   ----- Transcript of session follows -----
... while talking to mywork.com.:
>>> DATA
<<< 550 relay not permitted
550 5.1.1 <me@mywork.com>... User unknown
<<< 503-All RCPT commands were rejected with this error:
<<< 503-relay not permitted
<<< 503 Valid RCPT command must precede DATA

[ Part 2: "Delivery Status" ]

Reporting-MTA: dns; ubuntucomp.net
Received-From-MTA: DNS; localhost
Arrival-Date: Thu, 6 Aug 2015 13:49:44 -0400

Final-Recipient: RFC822; me@mywork.com
Action: failed
Status: 5.1.1
Remote-MTA: DNS; mywork.com
Diagnostic-Code: SMTP; 550 relay not permitted
Last-Attempt-Date: Thu, 6 Aug 2015 13:49:44 -0400
Return-Path: <chuck@ubuntucomp.net>
Received: from ubuntucomp.net (localhost [127.0.0.1])
        by ubuntucomp.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id
t76Hni3S011456
        for <me@mywork.com>; Thu, 6 Aug 2015 13:49:44 -0400
Received: (from chuck@localhost)
        by ubuntucomp.net (8.14.4/8.14.4/Submit) id t76HniR9011455;
        Thu, 6 Aug 2015 13:49:44 -0400
Message-ID: <741542.889128567-sendEmail@ubuntucomp>
From: "dataserv@gilsonmessaging.com" <dataserv@gilsonmessaging.com>
To: "me@mywork.com" <me@mywork.com>
Subject: Perl prod ubuntu backups /home/comp/perl/backprod-ub20150806.zip
Date: Thu, 6 Aug 2015 17:49:44 +0000
X-Mailer: sendEmail-1.56
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----MIME delimiter for
sendEmail-327729.490659298"

When I try to use Sendemail, Sendemail says email was sent, which it was, but then I immediately get back an error message, which is above. My questions.

  1. Which software is sending me the email error? Is it from my Ubuntu machine? If so, what config files do I have to change so it works with smtp.mywork.com?
  2. Does sendemail even read a config file on Ubuntu before it sends the email off the machine?
  3. How do I fix this problem so Sendemail works?
  4. Why does my error message also say 550 5.1.1 <me@mywork.com>... User unknown? Is that the root problem?

Thank you!

0

Problem making a configuration of sendmail. Sendmail do not allow domain mywork.com to send mails.

To allow sending mail from mywork.com domain, do following. Edit /etc/mail/relay-domains

 sudo nano /etc/mail/relay-domains

simple at the end add domain

 mywork.com

After edititing restart sendmail service

 sudo service sendmail restart
  • Thank you for the response. I'm not supid, I'm just ignorant and I want to learn, so I appreciate your detailed response. /etc/mail/relay-domains does not exist. Is this just one domain per line? Does the first line have to be a comment? Does the last line have to end with a CR like some other config files? – Bulrush Aug 7 '15 at 11:41
  • I got the same error "550 relay not permitted" after I followed your instructions. I assumed /etc/mail/relay-domains just had one domain per line. relay-domains has the same owner (root) and permissions as the other files in /etc/mail. Any other ideas? – Bulrush Aug 7 '15 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.