[rancid] Setting up Rancid on FreeBSD 10.1
Andrew S. Meyer
Andrew.Meyer at tsg2.com
Sun Mar 22 19:25:13 UTC 2015
Hi everyone,
I seem to be having some difficulty getting rancid to send emails on FBSD 10.1 using postfix or sendmail (built-in). I have configured postfix to relay to another mail server in my setup but doesn't seem to do it when I have the rancid cronjob setup to run. Although if I run the following command uname -a | mail -s "`uname -n`: Test mail config" user at tld.com<mailto:user at tld.com> it works just fine. I can run this command as any user and it works, but the automated emails do not for the rancid user. Has anyone else run into this? If so how do you fix it? I'm almost done with my rancid setup.
Here is my postfix config
root at monitoring1:~ # postconf -n
postconf: warning: /usr/local/etc/postfix/main.cf, line 573: overriding earlier entry: alias_maps=dbm:/etc/mail/aliases
alias_maps = hash:/etc/mail/aliases
command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = /usr/local/share/doc/postfix
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
mynetworks_style = host
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/local/share/doc/postfix
relayhost = [192.168.220.56]
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
unknown_local_recipient_reject_code = 550
root at monitoring1:~ #
/var/log/maillog output
Mar 22 14:15:00 monitoring1 postfix/local[1513]: warning: /usr/local/etc/postfix/main.cf, line 573: overriding earlier entry: alias_maps=dbm:/etc/mail/aliases
Mar 22 14:15:00 monitoring1 postfix/local[1513]: warning: database /etc/mail/aliases.db is older than source file /etc/mail/aliases
Mar 22 14:15:00 monitoring1 postfix/local[1513]: 0E2DC7590B: to=<rancid at monitoring1.borg.priv>, orig_to=<rancid>, relay=local, delay=0.02, delays=0.01/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 22 14:15:00 monitoring1 postfix/qmgr[632]: 0E2DC7590B: removed
Mar 22 14:20:00 monitoring1 postfix/sendmail[1586]: warning: /usr/local/etc/postfix/main.cf, line 573: overriding earlier entry: alias_maps=dbm:/etc/mail/aliases
Mar 22 19:20:00 monitoring1 postfix/postdrop[1588]: warning: /usr/local/etc/postfix/main.cf, line 573: overriding earlier entry: alias_maps=dbm:/etc/mail/aliases
Mar 22 14:20:00 monitoring1 postfix/cleanup[1594]: warning: /usr/local/etc/postfix/main.cf, line 573: overriding earlier entry: alias_maps=dbm:/etc/mail/aliases
Mar 22 14:20:00 monitoring1 postfix/pickup[631]: 096427590B: uid=1002 from=<rancid>
Mar 22 14:20:00 monitoring1 postfix/trivial-rewrite[1595]: warning: /usr/local/etc/postfix/main.cf, line 573: overriding earlier entry: alias_maps=dbm:/etc/mail/aliases
Mar 22 14:20:00 monitoring1 postfix/cleanup[1594]: 096427590B: message-id=<20150322192000.096427590B at monitoring1.borg.priv>
Mar 22 14:20:00 monitoring1 postfix/qmgr[632]: 096427590B: from=<rancid at monitoring1.borg.priv>, size=622, nrcpt=1 (queue active)
Mar 22 14:20:00 monitoring1 postfix/local[1597]: warning: /usr/local/etc/postfix/main.cf, line 573: overriding earlier entry: alias_maps=dbm:/etc/mail/aliases
Mar 22 14:20:00 monitoring1 postfix/local[1597]: warning: database /etc/mail/aliases.db is older than source file /etc/mail/aliases
Mar 22 14:20:00 monitoring1 postfix/local[1597]: 096427590B: to=<rancid at monitoring1.borg.priv>, orig_to=<rancid>, relay=local, delay=0.02, delays=0.01/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 22 14:20:00 monitoring1 postfix/qmgr[632]: 096427590B: removed
root at monitoring1:~ #
As for rancid - here is what I have setup:
LIST_OF_GROUPS="NetworkDevices"
MAILDOMAIN="@borg.local"; export MAILDOMAIN
I have run rancid-cvs to set it all up.
Here is the crontab for rancid. I have it setup to check and email me so often to do some testing. I DO plan to change this once completed:
[rancid at monitoring1 ~]$ crontab -l
1,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/bin/rancid-run #hourly router dump
1,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/find /usr/local/var/rancid/logs -type -f -mtime +2 -exec rm -rf {} \;
[rancid at monitoring1 ~]$
Also,
Has anyone started using Rancid 3.0 yet? If so how hard is it to setup?
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150322/1b8ee03e/attachment.html>
More information about the Rancid-discuss
mailing list