Tuesday, November 5, 2024

smtp configure

 

                                                                     SMTP SETUP IN LINUX

 

Smtp configuration with gmail.

 

 

Step1)

  create one gmail user

 

step2)

install packages

Yum install postfix

 

step 3)

check telnet

telnet smtp.gmail.com 587

telnet smtp.gmail.com 465

 

 

 

step4)

Configure the Postfix Relay Server (Gmail)

Configure the Postfix Relay Server (Gmail)

Postifx configuration file vi /etc/postfix/main.cf

relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = encrypt
inet_protocols = ipv4

Configure the Postfix Relay Server (Office365)

relayhost = [smtp. office365.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = encrypt
inet_protocols = ipv4

 

 

 

step4)

 

[root@ postfix]# vi /etc/postfix/sasl_passwd                                  (add below entries in sasl_passwd)


[smtp.gmail.com]:587               username:password

Example :   [smtp.gmail.com]:587              manueldba4@gmail.com: Manueldba123

 

Create hash db file for Postfix

postmap /etc/postfix/sasl_passwd

 

restart postfix:

postfix reload or systemctl restart postfix

 

step 5)

 

echo "mail is working"| mail -r manueldba4@gmail.com -s "linux it’s ok" manueldba4@gmail.com

 

mailq ( check mailq)

 

 

Thursday, September 28, 2023

sys username and password invalid

 SYS USERNAME and PASSWORD INVALID:


check select * from v$pwfile_users;

it should give value for sys user if not create password file in $ORACLE_HOME/dbs


cd  <ORACLE_HOME>/dbs

CREATE PASSWORD FILE

$ORACLE_HOME/bin/orapwd file=<OH>/dbs/orapw<sid> password=<password> entries=<max entries number>;


Using the sys user and the password which is set in the password file to logging into the dbconsole

Make sure the DB parameter REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE

SQL> show parameter REMOTE_LOGIN_PASSWORDFILE

NAME                                   TYPE     VALUE
------------------------------------ -----------  ------------------------------
remote_login_passwordfile       string       EXCLUSIVE


check    sqlnet.ora below enters: 

# sqlnet.ora Network Configuration File: /data/app/oracle/product/12.1.0/dbhome_1/network/admin/sqlnet.ora

# Generated by Oracle configuration tools.


NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)


SQLNET.EXPIRE_TIME=10


NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

SQLNET.ALLOWED_LOGON_VERSION_SERVER=8

SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8



now login with sys user it should login.