Tutorials HowTo Configure "send-only" Email via a 3rd Party SMTP Relay for Linux

Tutorials - HowTo Configure "send-only" Email via a 3rd Party SMTP Relay for Linux - TheJavaSea Forum, Gaming Laptops & PCs Reviews, Linux Tutorials, Network Hacks, Hacking, Leaks, Proxies, Domains & Webhosting, Coding Tutorials, SEO Tips & Hacks, Security TIPS and much more.

Marks-Man

Administrator
Joined: Mar 15, 2021
Messages: 1,050
Resources: 405
Points: 113
Reaction score: 1,316
For yandex.com...

  • smtp.yandex.com is the server
  • 587 is the port. 465 is supported, but don't use it (dated).
  • Username: username@yandex.com
  • Password: App password. And it must be set to use this service.
For yahoo.com...

  • smtp.mail.yahoo.com is the server
  • 587 is the port. 465 is supported, but don't use it (dated).
  • Username: username@yahoo.com
  • Password: App password. And it must be set to use this service.
For google.com (not tested for this exercise)...

  • smtp.gmail.com is the server
  • 587 is the port. 465 is supported, but don't use it (dated).
  • Username: username@gmail.com
  • Password: your password. I'm unsure if a separate app password is required.
  • Browse to https://mail.google.com, click on Settings, Forwarding/IMAP. Enable IMAP to alert gmail to place sent mail in the sent folder.


For Fedora Linux...

Please Login or Register to view content

For CentOS or Red Hat Enterprise Linux...

Please Login or Register to view content

Tell the OS which MTA you are going to be using...​

Please Login or Register to view content

It will look something like this, select Postfix with the right number and exit...

There are 3 programs which provide 'mta'.

Please Login or Register to view content

Enter to keep the current selection[+], or type selection number: 2

Configure Postfix​

For this example, I am using Yandex, therefore...

  • Server: smtp.yandex.com:587
  • Example username: nfdasd@yandex.com
  • Example (app) password: kjsadkjbfsfasdfqwfq
Configuring postfix is pretty easy, though not entirely obvious.

Please Login or Register to view content
Change these settings, or add if they are missing...

Please Login or Register to view content

Other options to examine suggested by other howtos...

Please Login or Register to view content

Please Login or Register to view content
[smtp.yandex.com]:587 nfdasd@yandex.com:kjsadkjbfsfasdfqwfq
#[smtp.mail.yahoo.com]:587 nfdasd@yahoo.com:kjsadkjbfsfasdfqwfq
#[smtp.gmail.com]:587 nfdasd@gmail.com:kjsadkjbfsfasdfqwfq

That file has your password in it. Lock it down: sudo chmod 600 /etc/postfix/sasl_passwd

Please Login or Register to view content
It should produce a file called /etc/postfix/sasl_passwd.db

Note: If you see permission errors, check ownership and permissions in that directory: ls -l /etc/postfix

Start and enable the Postfix systemd service​

If you haven't enabled it upon reboot, do it now...

Please Login or Register to view content
#sudo journalctl -f | grep -i ssmtp

Send a test email...​


Please Login or Register to view content
 
  • Tags
    3rd configure email for howto linux party smtp relay send-only tutorials via
  • Top