Installing Simple SMTP in Centos
Frustrated by configuring sendmail,i tried SSMTP and was amazed by simple installation and configuration step.
1. rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
2. yum install ssmtp
3. Edit /etc/ssmtp/ssmtp.conf
# The person who gets all mail for userids < 500
# Make this empty to disable rewriting.
root=alok@voipone.in
# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and your mailhub is so named.
mailhub=smtp.bizmail.yahoo.com:465
[...]
# Set this to never rewrite the "From:" line (unless not given) and to
# use that address in the "from line" of the envelope.
#FromLineOverride=YES
# Use SSL/TLS to send secure messages to server.
UseTLS=YES
[...]
AuthUser=alok@voipone.in
AuthPass=picseriesyah
4.Test the command using
echo -e "Subject: This weekend\n\nWant to get dinner friday? Call me.\n" | ssmtp sendto@mydomain.com
Optional Parameters
#mail will look likes it has come from intel.com
RewriteDomain=intel.com
PHP mail function
/etc/ /php.ini –
sendmail_path = /usr/sbin/ssmtp –t
PHP requires the -t flag.
Service httpd restart
No comments:
Post a Comment