1

I am unable to send and receive mails via Outlook. I keep getting the following error message from ssmtp.

ssmtp: 550 5.3.4 554-554 5.2.0 STOREDRV.Deliver; delivery result banner

Here is the content of /etc/ssmtp/ssmtp.conf:

root=myemail@outlook.com
mailhub=smtp-mail.outlook.com:587
AuthUser=myemail@outlook.com
AuthPass=mypassword
UseSTARTTLS=YES
hostname=sierra-test
FromLineOverride=YES
galoget
  • 223
  • 1
  • 9
user2402244
  • 51
  • 1
  • 2
  • 4

3 Answers3

1

It would be easier to debug the problem if you can provide more verbose output. Use the following to get the verbose output:

echo -e "Subject:Hello \n\n I would like to buy a hamburger\n" | sendmail -v <RECEIPIENT>

However, since you have mentioned outlook in your question, the most notorious problem with outlook is mismatching the username on the local Linux machine and the username on the server.

For example:

  • On your local machine echo $USER gives the value firstname
  • While your email username is firstname.lastname@example.com

This can be solved by specifying the user information into the command flags, try out the following:

echo -e "Subject:Hello \n\n I would like to buy a hamburger\n" | sendmail -v <RECEIPIENT> -f<firstname.lastname>
1

Please extend your question with your platform details (distribution, version, ssmtp version, where did you installed from, etc.).

Regarding your config file:

/etc/ssmtp/ssmtp.conf

A few issues I see (which might or might not apply, depending on version):

  1. The hostname should have a FQDN (fully qualified domain name), else Outlook (or Gmail, Yahoo and others) might reject it. You could try adding one.
  2. You seem to be missing "AuthMethod".
  3. Some say that UseTLS and UseSTARTTLS exclude each other, others place both settings. You could try swaping between those options.

Example:

root=myemail@outlook.com
FromLineOverride=YES    # usually goes with root
mailhub=smtp-mail.outlook.com:587
rewriteDomain=outlook.com    # shouldn't be needed if you are not overwriting from, but doesn't hurt
AuthUser=myemail@outlook.com
AuthPass=mypassword
AuthMethod=LOGIN             # could be plain or cram-md5 for ex. 
UseTLS=Yes                   # this one might be yes or no
UseSTARTTLS=Yes 
hostname=sierra-test.domain.com  # full domain here, might help

You do have to keep in mind that if you enabled 2FA (two factor authentication) for you email/account, you will need to validate it before it allows you to send email.

Leo
  • 1,833
  • 8
  • 17
0

Login to your account and verify mobile phone number or other verification method required and try to send email again.

TimB
  • 183
  • 2
  • 10