PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > comp.mail.sendmail > Copy mailertable.db access.db generics.db etc etc ....
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.mail.sendmail Configuring and using the BSD sendmail agent.

Copy mailertable.db access.db generics.db etc etc ....

Réponse
 
LinkBack Outils de la discussion
Vieux 25/09/2006, 19h08   #1 (permalink)
martin_group
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Copy mailertable.db access.db generics.db etc etc ....

I have 2 mail relays which need to have identical mailertable.db
virtusertable.db access.db etc etc . I have considered rsync and scp
to copy the files over from the primary to the secondary mx box , but
find I am I complete rookie when it comes to scp and rsync. I intend to
use rsync with ssh or scp with ssh and thats as far as I get. Has any
body tried this set up or has somebody got some ideas on how to go
about this ??
[ssh is set so that root access is denied.]


Many Thanks

  Réponse avec citation
Vieux 04/10/2006, 23h54   #2 (permalink)
Dennis Peterson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Copy mailertable.db access.db generics.db etc etc ....

martin_group wrote:
> I have 2 mail relays which need to have identical mailertable.db
> virtusertable.db access.db etc etc . I have considered rsync and scp
> to copy the files over from the primary to the secondary mx box , but
> find I am I complete rookie when it comes to scp and rsync. I intend to
> use rsync with ssh or scp with ssh and thats as far as I get. Has any
> body tried this set up or has somebody got some ideas on how to go
> about this ??
> [ssh is set so that root access is denied.]
>
>
> Many Thanks
>


Copy the text file to each target machine and have a cron job on each
machine recreate the db file. I use cfengine here so no cron job is
needed, but scp and rsync will work fine along with the cron process.

A crontab entry could be as simple as:

0,10,20,30,40,50 * * * * cd /etc/mail;make >/dev/null 2>&1

and have a Makefile in /etc/mail that does the dirty work. Assuming the
text files are found in /home/smtp this inelegant Makefile works:

all: virtusertable.db access.db aliases.db mailertable.db

virtusertable.db: /home/smtp/virtusertable
/usr/sbin/makemap hash virtusertable < /home/smtp/virtusertable

mailertable.db: /home/smtp/mailertable
/usr/sbin/makemap hash mailertable < /home/smtp/mailertable

access.db: /home/smtp/access
/usr/sbin/makemap hash </home/smtp/access

aliases.db: /home/smtp/aliases
/usr/bin/cp /home/smtp/aliases /etc
/usr/bin/newaliases

This is not a model of sophistication but will work. Sendmail does not
require a restart when db files are modified. Make will update files
only when the source is newer than than created db file and so there is
very little load imposed on the system.

dp
  Réponse avec citation
Vieux 04/10/2006, 23h54   #3 (permalink)
Dennis Peterson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Copy mailertable.db access.db generics.db etc etc ....

martin_group wrote:
> I have 2 mail relays which need to have identical mailertable.db
> virtusertable.db access.db etc etc . I have considered rsync and scp
> to copy the files over from the primary to the secondary mx box , but
> find I am I complete rookie when it comes to scp and rsync. I intend to
> use rsync with ssh or scp with ssh and thats as far as I get. Has any
> body tried this set up or has somebody got some ideas on how to go
> about this ??
> [ssh is set so that root access is denied.]
>
>
> Many Thanks
>


Copy the text file to each target machine and have a cron job on each
machine recreate the db file. I use cfengine here so no cron job is
needed, but scp and rsync will work fine along with the cron process.

A crontab entry could be as simple as:

0,10,20,30,40,50 * * * * cd /etc/mail;make >/dev/null 2>&1

and have a Makefile in /etc/mail that does the dirty work. Assuming the
text files are found in /home/smtp this inelegant Makefile works:

all: virtusertable.db access.db aliases.db mailertable.db

virtusertable.db: /home/smtp/virtusertable
/usr/sbin/makemap hash virtusertable < /home/smtp/virtusertable

mailertable.db: /home/smtp/mailertable
/usr/sbin/makemap hash mailertable < /home/smtp/mailertable

access.db: /home/smtp/access
/usr/sbin/makemap hash </home/smtp/access

aliases.db: /home/smtp/aliases
/usr/bin/cp /home/smtp/aliases /etc
/usr/bin/newaliases

This is not a model of sophistication but will work. Sendmail does not
require a restart when db files are modified. Make will update files
only when the source is newer than than created db file and so there is
very little load imposed on the system.

dp
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 01h11.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08804 seconds with 11 queries