Yeah! Finally I was able to send and receive email with sendmail and dovecot implemented on my FreeBSD server. I choose gmail smtp server to act as my Outgoing Email Server. Here is how I did,
In the /etc/mail/yourhostname.mc file, add the following above the DAEMON_OPTIONS line.
define(`confAUTH_OPTIONS’, `A’)dnl
define(`confAUTH_MECHANISMS’, `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl
TRUST_AUTH_MECH(`EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl
FEATURE(`authinfo’, `Hash -o /etc/mail/authinfo’)dnl
define(`SMART_HOST’, `smtp.gmail.com’)dnl
define(`RELAY_MAILER_ARGS’, `TCP $h 587′)
define(`ESMTP_MAILER_ARGS’, `TCP $h 587′)
Create or edit the /etc/authinfo file and with this codes.
AuthInfo:smtp.gmail.com “U:smmsp” “I:gmailusername” “P:gmailpassword” “M:PLAIN”
AuthInfo:smtp.gmail.com:587 “U:smmsp” “I:gmailusername” “P:gmailpassword” “M:PLAIN”
Now, we can run this command in the /etc/mail directory.
touch local-host-names
makemap -r hash authinfo.db < authinfo
make all install restart
If the “make all install restart” command didn’t work, you can also run “make” alternatively.
References:
Filed under: FreeBSD | 5 Comments
Tags: FreeBSD, Sendmail, Squirrelmail
i still dont know how to setup sendmail for my local networks
Good website …from kulhari group..manish kumar.
Thanks
Great work!!
Nice manual but I have a problem with my sendmail.
Error massage is:
Starting: sendmail554 5.0.0 /etc/mail/sendmail.cf: line 59: unknown configuration line ”
”
554 5.0.0 /etc/mail/sendmail.cf: line 85: unknown configuration line ”
”
Warning: Option: AuthMechanisms requires SASL support (-DSASL)
Warning: Option: AuthOptions requires SASL support (-DSASL)
sendmail-clientmqueue.
Thank you very much for this. I didn’t have luck getting sendmail to work with my Uverse SMTP, but this worked great to get my mail sending via Gmail.