Compile sendmail

cd /etc/mail
make
make install
make stop
make start

Now edit /etc/make.conf and add the following lines:

SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL
SENDMAIL_LDFLAGS=-L/usr/local/lib
SENDMAIL_LDADD=-lsasl2

Recompile sendmail by executing the following commands:

cd /usr/src/lib/libsmutil
make cleandir && make obj && make
cd /usr/src/lib/libsm
make cleandir && make obj && make
cd /usr/src/usr.sbin/sendmail
make cleandir && make obj && make && make install

Test

sendmail -Am -v -t -f lhdsrv2@hrabalovi.name lhrabal@gmail.com

auth:

makemap hash client-info.db < client-info

Masq:

In the cf/domain directory, copy generic.m4 to another file such as mydomain.m4.
Edit this copy to remove the EXPOSED_USER() entry.
In your sendmail.mc file, change the

DOMAIN(generic)

line to mention your new domain definition:

DOMAIN(mydomain)
  • Then simply rebuild your sendmail.cf in the usual manner.
  • Examination of the newly-generated .cf shows no C entry.

reject=451 Domain of sender address xxx does not resolve

do /etc/mail/access dodat:
domena.cz OK
a make!

Domain of sender address xxx does not exist)

Do:/etc/mail/domaintable
dát: *.example.org example.org

Some Useful sendmail Configurations

http://www.faqs.org/docs/linux_network/x15291.html