RSS feed logo RSS Feed | About Pantz.org
A few Sendmail security settings
Posted on 12-25-2003 22:23:00 EST | Updated on 12-25-2003 22:23:00 EST
Section: /software/sendmail/ | Permanent Link
A few Sendmail security settings. None of these make your server secure they just help hide some things.

In the sendmail.cf file change "O PrivacyOptions=authwarnings" to this "O PrivacyOptions=authwarnings,noexpn,novrfy". What this does is prevents spammers from using the ``EXPN'' and ``VRFY'' commands in sendmail. They can be used to find and verify E-mail addresses.

In the Sendmail.cf file change "O SmtpGreetingMessage=$j Sendmail $v/$Z; $b" to this line "O SmtpGreetingMessage=$j $b". What this does is gets rid of the connection banner version number and the advert of "Sendmail".

Del.icio.us! | Digg Me! | Reddit!

Related stories

Setting up a backup Sendmail server
Posted on 11-25-2003 22:33:00 EST | Updated on 11-25-2003 22:33:00 EST
Section: /software/sendmail/ | Permanent Link
Some quick notes on setting up a Sendmail backup server. This one is done using OpenBSD. It's not really a detailed setup. More like notes of what I can remember doing.

1. Install sendmail (probally already installed by default). No special settings needed.

2. Now we need to generate a sendmail.cf file. THis is done thru m4. The file m4 generates the .cf file from usually ends in .mc . I used the settings below. There are a ton more that can be used.

OSTYPE(`openbsd')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl
FEATURE(local_procmail)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
FEATURE(`access_db')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`use_cw_file')dnl

There should be an m4 directory or sendmail directory with info on m4. In the OSTYPE above I have OpenBSD but you might have something different. You can find a list on ostypes in the m4 dir. I found mine by doing a "find" on: cf.m4 . This told me exactly where the m4 dir was. Then up or down a few dirs from there is the "ostypes" dir. Just find yours in that dir and put in the name in OSTYPE above. Make sure you have procmail installed to use the file above and dump the lines above into a file called sendmail.mc .

3. Now we use the m4 macro processor to gen the sendmail.cf file. You will need to know the location of your cf.m4 file to do this. Do a find on this file if you can't find it. Then execute the following command.

m4 /location/of/your/cf.m4 sendmail.mc >sendmail.cf .

4. Now copy the generated sendmail.cf into the /etc/mail dir.

5. The other files you'll need in that dir are: access, sendmail.cw, virtusertable.

6. Put your domains in sendmail.cw (Ex: example.org) put that file in the /etc dir or /etc/mail I can't remember which.

7. On the backup mail server open up sendmail.cf (/etc/sendmail.cf on linux) and find the line:

 
# who gets all local email traffic ($R has precedence for unqualified names)
DH

After the DH put the name of the primary mail server who should get the mail like:

 
# who gets all local email traffic ($R has precedence for unqualified names)
DHprimary.mail.server

8. On the primary mail server edit the file access (the access database /etc/mail/access in linux)

9. Add the following line to allow the backup mail server to relay mail to it. Example:

 
backup.mail.server RELAY

10. To change queueing time try these files look for format "QUEUE=20m" or the like. then restart sendmail.

Del.icio.us! | Digg Me! | Reddit!

Related stories