I have followed the below steps to configure sendmail
apt-get install sendmail
add the below content in
/etc/mail/auth/client-info
AuthInfo:<gworks.yyy> "U:<mail@gworks.yyy>" "I:<mail@gworks.yyy>" "P:<xxxxxxx>"
sudo bash -c "cd /etc/mail/auth/ && makemap hash client-info < client-info"
add the below lines in
/etc/mail/sendmail.mc
before MAILER_DEFINITIONSdefine(
SMART_HOST', <gworks.yyy>)dnl define(
confAUTH_MECHANISMS',EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl FEATURE(
authinfo', `hash /etc/mail/auth/client-info')dnlsudo bash -c "cd /etc/mail/ && m4 sendmail.mc > sendmail.cf"
- service sendmail restart
Test with telnet command
telnet command from remote host throws error Relaying denied
root@e5eae2c464a7:/var/www/public# telnet 10.1.2.3 25
Trying 10.1.2.3...
Connected to 10.1.2.3.
Escape character is '^]'.
220 cthree.gworks.yyy ESMTP Sendmail 8.15.2/8.15.2/Debian-3; Tue, 11 Oct 2016 06:45:28 GMT; (No UCE/UBE) logging access from: development.internet(OK)-development.internet [10.1.2.4]
helo server
250 cthree.gworks.mobi Hello development.internet [10.1.2.4], pleased to meet you
mail from: mail@gworks.yyy
250 2.1.0 mail@gworks.yyy... Sender ok
rcpt to: mail@gworks.yyy
550 5.7.1 mail@gworks.yyy... Relaying denied
what I did wrong here why it is not get send mail from remote host?