HomePage » Mail » Sendmail

Read
Domainkeys with dk-milter http://www.elandsys.com/resources/sendmail/domainkeys.html

Excellent admin reference
Use sendmail to change sender address

Installing sendmail

Don't remember whether I've tested this or not...
#!/bin/sh
echo "Run this at root of sendmail source!"
$siteconfigm4 = "devtools/Site/site.config.m4"
echo "APPENDDEF(`conf_sendmail_ENVDEF', `-DSASL')" > $siteconfigm4
echo "APPENDDEF(`conf_sendmail_LIBS', `-lsasl')" >> $siteconfigm4
echo "APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')" >> $siteconfigm4
echo "Creating smmsp user and group..."
groupadd -g 25 -r smmsp
useradd -u 25 -r -g smmsp smmsp
echo "Building milter..."
cd libmilter
sh Build && sh Build install
cd - && cd /usr/lib && ln -s . libmilter
echo "Building sendmail..."
cd -
cd sendmail
sh Build
echo "Fix Redhat man path..."
ln -s /usr/share/man /usr/man
sh Build install


Sendmail and SMTP AUTH

Follow sendmail's official documentation - http://www.sendmail.org/~ca/email/auth.html
Note: Modern Linux distribution already comes with sendmail with SASL support. Just need to enable it.

Configuring smart host

Smart host is the SMTP server to route all non-local mails to. If enabled, MTA will not try to query the smtp server for each domain, instead, all non-local mails will be delivered to the smart host. In sendmail, smart host can be configured by adding the SMART_HOST directive to sendmail.mc (then use m4 to produce sendmail.cf). If the smart host does not have a FQDN, surround the IP address with [].

define(`SMART_HOST',`SMTP:[63.131.146.34]')dnl
dnl # or
define(`SMART_HOST',`SMTP:smtp.myisp.com')dnl


Sendmai startup options

The following starts up sendmail in background, and writes a very detail debug log.

/usr/lib/sendmail -bd -X /var/log/mail.log -oL9 &


useful commands

# flush the mail queue now
sendmail -OTimeout.hoststatus=0m -q -v

# verify an alias
sendmail -bv -c some-alias
some-others@gmail.com... deliverable: mailer relay, host mailsorter.foo.com, user some-others@gmail.com

# address test mode
> sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
3,0 user@domain.com

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki