Send Mail from SUSE Linux(Outlook)
Mail from SUSE Linux(Outlook)
#Requirements and Intro
In this, we will use Postfix as our MTA (mail transfer agent).
Postfix is a free, open-source, actively maintained, and highly secure mail transfer agent.
Make sure port 25 and 587 is open or not.
In December of 1998, R. Gellens and J. Klensin submitted RFC 2476 in support of adding a new specification for internet email communications. The RFC proposed a split of the traditional massage submission and message relay concept. The RFC defined that message submission should occur over port 587 to ensure new policy and security requirements don't interfere with the traditional relay traffic over message relay port 25.
this can perfectly work for (SLES 11 SP4)(SLES 12 SP3)(SLES 15) as per test
1. Install Required Software
zypper update && zypper install postfix mailx cyrus-sasl
For other Linux flavor, we can change the word zypper with the respected installer
Note: Before update ensure with administrator
Or just install postfix by typing the command below.
zypper install postfix mailx cyrus-sasl
2. shut down postfix before configure.
rcpostfix stop
3. Configure outlook Authentication
vim /etc/postfix/sasl_passwd
In this, I used vim file editor if u can use any other file editors also
[smtp.office365.com]:587 office365AccountEmailAddress:password
Replace office365 with your outlook email and password with your password.
Note: Put a blank line at the end of the file
Save and close the file. Your Gmail password is stored as plaintext, so make the file accessible only by root:
chmod 600 /etc/postfix/sasl_passwd
for the above command will change the file permeation to only by root/user
4. Process Password File
postmap hash:/etc/postfix/sasl_passwd
Then check it out /etc/postfix for the sasl_passwd.db file is it created or not.
5. Configure Postfix
Minimum Requirements to get Postfix relay to Office365 to work
vim /etc/postfix/main.cf
# sasl and tls
Modify or Add(only if line not found ) the following values:
relayhost = [smtp.office365.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_tls_security_options = noanonymous
smtp_use_tls = yes
It also requires that the Postfix master process configuration file master.cf be modified. Open it for editing:
vim /etc/postfix/master.cf
Locate the line below and uncomment it:
#tlsmgr unix - - n 1000? 1 tlsmgr
Save and close the file.
5. Restart Postfix
Rcpostfix restart
6. Send A Email
mail –s “test subject” –r sendermail.com recevermail.com
Press CTRL+D to send mail
Comments
Post a Comment