Use your ISP with Sendmail
# cp /usr/share/sendmail/cf/cf/sendmail-frugalware.mc /etc/mail/sendmail.mc
# nano /etc/mail/sendmail.mc
Add this :
this line should be add Before MAILER(XX) :
FEATURE(`authinfo',`hash /etc/mail/authinfo.db')
MASQUERADE_AS(`yourISP.domain')dnl
MASQUERADE_DOMAIN(`youractual.domain')dnl
FEATURE(masquerade_entire_domain)dnl
FEATURE(masquerade_envelope)dnl
define(`SMART_HOST',`[NameSmtpServer]')
This line just for have debug when all works
define(`confLOG_LEVEL', `20')dnl
Generate sendmail.cf:
# cd /usr/share/sendmail/cf/m4
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Configure the identification :
# nano /etc/mail/authinfo
AuthInfo:NameSmtpServer "R:NameDomain" "U:Login" "P:Password" "M:PLAIN"
Generate the db :
# /usr/sbin/makemap hash /etc/mail/authinfo < /etc/mail/
Configure Sasl :
# nano /etc/sasl2/Sendmail.conf
pwcheck_method: saslauthd
mech_list: login plain
Start Sendmail :
# /usr/sbin/sendmail -bd -q1h
Stop Sendmail
# killall sendmail
PS :
For use it with apache, the user that you use for apache (for me it's nobody) should have the permission to write into /var/spool/clientmqueue/