Restarting sendmail after config change ?

Richard Curtis richard at CROSSWIRED.CO.UK
Wed Nov 24 21:07:00 GMT 2004


    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Well spotted.
Thanks.  I am going to go with using:

make -C /etc/mail
kill -HUP 'head -1 /var/run/sendmail.in.pid`

As this seems to work well - I just tested it out and everything went as I
expected.

Thanks everyone.

Rich

> Richard:
>
> Watch out!
> The previously posted example below looks to me like it overwrites your
> access file!
> A "fixed" version is here:
>
>> makemap hash /etc/mail/access.db < /etc/mail/access
>
>
>
> On RedHat systems all you would need to do is type:
> > cd /etc/mail
> > make access.db
> or
> > make virtusertable.db
>
> No "restart" is needed.
>
> If you're on a non-RedHat distro and there's no Makefile in the
> /etc/mail directory, here's mine.
>
>> # These could be used by sendmail, but are not part of the default
>> install.
>> # To use them you will have to generate your own sendmail.cf with
>> #  FEATURE('whatever')
>> #
>> POSSIBLE += $(shell test -f bitdomain     && echo bitdomain.db)
>> POSSIBLE += $(shell test -f uudomain      && echo uudomain.db)
>> POSSIBLE += $(shell test -f genericstable && echo genericstable.db)
>> POSSIBLE += $(shell test -f userdb        && echo userdb.db)
>> CFFILES   = sendmail.cf submit.cf
>>
>>
>> all: ${CFFILES} ${POSSIBLE} virtusertable.db access.db domaintable.db
>> mailertable.db
>>
>> userdb.db : userdb
>>         @makemap btree $@ < $<
>>
>> %.db : %
>>         @makemap hash $@ < $<
>>
>> %.cf : %.mc
>>         @if test -f /usr/share/sendmail-cf/m4/cf.m4; then \
>>                 mv -f $@ $@.bak; \
>>                 m4 $< > $@; \
>>         fi;
>>
>> clean:
>>         rm -f *.db *~
>
>
>
> -Bill
>
> James R. Stevens wrote:
>
>>Within RedHat you will use the MAKEMAP command to reload and database
>>into memory without restarting Sendmail/Mailscanner.
>>
>>Example:
>>Cli->makemap hash /etc/mail/access < /etc/mail/access
>>Would reload the access table after any changes. This would be based on
>>a hash database.
>>
>>Something similar would be used for the virtusertable depending on the
>>type of database.
>>
>>Hope that helps..
>>
>>-----Original Message-----
>>From: Chris Conn [mailto:cconn at ABACOM.COM]
>>Sent: Wednesday, November 24, 2004 12:41 PM
>>To: MAILSCANNER at JISCMAIL.AC.UK
>>Subject: Re: Restarting sendmail after config change ?
>>
>>Richard Curtis wrote:
>>
>>
>>>I am writing a script for adding hosted domains to our server.
>>>When I add a hosted domain, I need to add it to the sendmails
>>>
>>>
>>virtusertable
>>
>>
>>>and local-host-names.
>>>
>>>I have tried to use /etc/init.d/MailScanner reload but this does not
>>>rebuild
>>>the virtusertable.db file.
>>>
>>>What is the correct way to do this ?
>>>
>>>
>>>
>>on my redhats, I have a script that does this:
>>
>>make -C /etc/mail
>>kill -HUP `head -1 /var/run/sendmail.in.pid`
>>
>>------------------------ MailScanner list ------------------------
>>To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
>>'leave mailscanner' in the body of the email.
>>Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
>>the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>>
>>Support MailScanner development - buy the book off the website!
>>
>>
>>
>
> ------------------------ MailScanner list ------------------------
> To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
> 'leave mailscanner' in the body of the email.
> Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
> the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>
> Support MailScanner development - buy the book off the website!
>

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list