[rancid] Rancid and Postfix

841 views
Skip to first unread message

michael schnatterer

unread,
Nov 15, 2011, 5:18:30 AM11/15/11
to rancid-...@shrubbery.net
Hey every body,

I have a maybe simple problem.
I have installed an configured Rancid 1 year ago, everything runs fine and Rancid backups every config change.
Now i would configure Rancid to send E-Mails with postfix.
I installed postfix and configure it. With telnet localhost 25 i could send E-Mails maually.
But now i have to configure aliases but i don't understand it. I have installed and configured Rancid like in this Tutorial. http://openmaniak.com/rancid_tutorial.php
Please help me to define Aliases i hav tried it with:
rancid-Grp Name: MY EMAIL ADDRESS
rancid-admin-GrpName: MY EMAIL ADDRESS
But nothing happens.

I hope somebody could help me

THANKS !
Best Regards

Michael Schwartzkopff

unread,
Nov 15, 2011, 7:28:39 AM11/15/11
to rancid-...@shrubbery.net

Did you install the mailutils with the "mail" program?

--
Dr. Michael Schwartzkopff
Guardinistr. 63
81375 München

Tel: (0163) 172 50 98
Fax: (089) 620 304 13

signature.asc

michael schnatterer

unread,
Nov 15, 2011, 7:43:08 AM11/15/11
to mi...@schwartzkopff.org, rancid-...@shrubbery.net
Hy,

Thanks for your Answer
But I'am not sure what you mean with this Mailutils is there another Package to install?
I anly have installed postfix via apt-get install postfix like the tutorial descripe.
Could you please give me more Information?

Thank you very much.


Von: Michael Schwartzkopff <mi...@schwartzkopff.org>
An: "rancid-...@shrubbery.net" <rancid-...@shrubbery.net>
Gesendet: 13:28 Dienstag, 15.November 2011
Betreff: Re: [rancid] Rancid and Postfix
_______________________________________________
Rancid-discuss mailing list
Rancid-...@shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss

michael schnatterer

unread,
Nov 15, 2011, 9:24:06 AM11/15/11
to mi...@schwartzkopff.org, rancid-...@shrubbery.net

Yes i can send E-Mails from Command line with "telnet localhost 25" like the tutorial descripe.
But i dont understand why Rancid don't send the E-Mail after a config change.
I think there is maybe a problem with the aliases see my First Post please. Or know you other troubleshooting tips?

Thanks
Best Regards

Von: Michael Schwartzkopff <mi...@schwartzkopff.org>
An: michael schnatterer <micha...@yahoo.de>
Gesendet: 14:57 Dienstag, 15.November 2011
Betreff: Re: [rancid] Rancid and Postfix

> Hy,
>
> Thanks for your Answer
>
> But I'am not sure what you mean with this Mailutils is there another
> Package to install? I anly have installed postfix via apt-get install
> postfix like the tutorial descripe. Could you please give me more
> Information?
>
> Thank you very much.

Can you use the mail program from the command line?

Alex DEKKER

unread,
Nov 15, 2011, 11:02:15 AM11/15/11
to rancid-...@shrubbery.net
On 15.11.2011 14:24, michael schnatterer wrote:
> Or know you other troubleshooting tips?

Have a look in the Postfix log.

alexd

michael schnatterer

unread,
Nov 16, 2011, 2:11:11 AM11/16/11
to Alex DEKKER, rancid-...@shrubbery.net
Hy,
Ok in the logs i didn't see anything if i start rancid.
But if i start sending E-Mail manually there is some log entrys.
The thing that i dont understand is, how communicate Rancid with Postfix? i have never configured something like this.

I hope somebody could help me i rotate in that topic since 1 Week :(

Thank you realy much

Best Regards

Von: Alex DEKKER <ran...@ale.cx>
An: rancid-...@shrubbery.net
Gesendet: 17:02 Dienstag, 15.November 2011
Betreff: Re: [rancid] Rancid and Postfix

oglu...@gmail.com

unread,
Nov 16, 2011, 3:06:34 AM11/16/11
to michael schnatterer, Alex DEKKER, rancid-...@shrubbery.net

Hi Alex,

 

Can you verify the followings?   I have this running on Ubuntu 10.x server.

 

1. install postfix (if already not done it)

apt-get install postfix

 

2. Edit Postfix configuration to reflect your setting, check sys admins for email setting.

#

...

vi /etc/postfix/main.cf

alias_database = hash:/etc/aliases

! if you

relayhost = your-email-server-address

...

#

 

3. Edit Rancid configuration. 

 

vi /home/rancid/etc/rancid.conf

#

...

LIST_OF_GROUPS="ADMINS"

...

#

 

4. Edit aliases configuration, step # 3, LIST_OF_GROUPS=ADMINS" (this an example) must match the aliases configuration.

 vi /etc/aliases

# Added by installer for initial user

rancid-ADMINS: myad...@mydomain.com

 

HTH, 

-oglumavd

oglu...@gmail.com

unread,
Nov 16, 2011, 3:12:42 AM11/16/11
to michael schnatterer, rancid-...@shrubbery.net

Any changes on email server or aliases?   

Are you using relayhost, check vi /etc/postfix/main.cf and make sure admins are not blocking smtp-relay.

michael schnatterer

unread,
Nov 16, 2011, 3:27:41 AM11/16/11
to oglu...@gmail.com, rancid-...@shrubbery.net
HY,

My Problem is not to send the E-Mail this works fine with the console "telnet localhost 25" i believe the problem is the communication between Rancid and postfix. I think postfix didn't recognize that Rancid is doing something.
My postfix/main.cf looks like the following:

myhostname = my hostname
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = IP of the E-Mail server,localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 10
recipient_delimiter = +
default_destination_concurrency_limit = 100
relayhost = IP of the E-Mail Server
empty_address_recipient = My E-Mail

As you can see i have an relay host.
Please help me i am realy desperately.

Best Regards


Von: "oglu...@gmail.com" <oglu...@gmail.com>
An: 'michael schnatterer' <micha...@yahoo.de>; rancid-...@shrubbery.net
Gesendet: 9:12 Mittwoch, 16.November 2011
Betreff: RE: [rancid] Rancid and Postfix

oglu...@gmail.com

unread,
Nov 17, 2011, 1:37:38 AM11/17/11
to michael schnatterer, rancid-...@shrubbery.net

Have you tried to watch log mail logs?

 

Delete /home/rancid/logs/

Tail /var/logs/mail

 

Open another terminal window and ssh/telnet into your rancid box

 

Ø  Add a new device or make a change to device then run rancid manual

Ø  Rancid will trigger an email alert

Ø  Watch mail logs

Ø  Watch /home/rancid/logs/the-recentlog

 

 

From: michael schnatterer [mailto:micha...@yahoo.de]
Sent: Wednesday, November 16, 2011 12:28 AM
To: oglu...@gmail.com; rancid-...@shrubbery.net
Subject: Re: [rancid] Rancid and Postfix

 

HY,

Marito ...

unread,
Nov 17, 2011, 1:06:17 PM11/17/11
to oglu...@gmail.com, micha...@yahoo.de, rancid-...@shrubbery.net
Hi all,

I tried several times to change the aliases file, but it then seems not to update the "little db" that postfix uses (it continued sending the email to the previous configured account).
So I gave up trying to make it work, and ended changing the script that make the thing (control_rancid).

I searched for :
 
# the receipient(s) of diffs
mailrcpt=${mailrcpt:-"@MAILPLUS@${GROUP}${MAILDOMAIN}"}; export mailrcpt
adminmailrcpt=${mailrcpt:-"@ADMINMAILPLUS@${GROUP}${MAILDOMAIN}"};
 
 
Then replaced @MAILPLUS@${GROUP}${MAILDOMAIN}  with my desired email account, and I got it working. 
 
Hope this help you.
Regards.-
 
Mario


 

From: oglu...@gmail.com
To: micha...@yahoo.de; rancid-...@shrubbery.net
Date: Wed, 16 Nov 2011 22:37:38 -0800

john heasley

unread,
Nov 17, 2011, 1:13:42 PM11/17/11
to Marito ..., rancid-...@shrubbery.net
Thu, Nov 17, 2011 at 03:06:17PM -0300, Marito ...:

>
> Hi all,
>
> I tried several times to change the aliases file, but it then seems not to update the "little db" that postfix uses (it continued sending the email to the previous configured account).

http://lmgtfy.com/?q=updating+aliases.db+postfix&l=1

> So I gave up trying to make it work, and ended changing the script that make the thing (control_rancid).
>
> I searched for :
>
> # the receipient(s) of diffs
> mailrcpt=${mailrcpt:-"@MAILPLUS@${GROUP}${MAILDOMAIN}"}; export mailrcpt
> adminmailrcpt=${mailrcpt:-"@ADMINMAILPLUS@${GROUP}${MAILDOMAIN}"};
>
>
> Then replaced @MAILPLUS@${GROUP}${MAILDOMAIN} with my desired email account, and I got it working.
>
> Hope this help you.
> Regards.-
>
> Mario
>
>
>
>
>
>

> From: oglu...@gmail.com
> To: micha...@yahoo.de; rancid-...@shrubbery.net
> Date: Wed, 16 Nov 2011 22:37:38 -0800
> Subject: Re: [rancid] Rancid and Postfix
>
>
>
>
>
>
>
>
> Have you tried to watch log mail logs?
>
> Delete /home/rancid/logs/
> Tail /var/logs/mail
>
> Open another terminal window and ssh/telnet into your rancid box
>

> ? Add a new device or make a change to device then run rancid manual
> ? Rancid will trigger an email alert
> ? Watch mail logs
> ? Watch /home/rancid/logs/the-recentlog


>
>
>
>
> From: michael schnatterer [mailto:micha...@yahoo.de]
> Sent: Wednesday, November 16, 2011 12:28 AM
> To: oglu...@gmail.com; rancid-...@shrubbery.net
> Subject: Re: [rancid] Rancid and Postfix
>
>
>
> HY,
>
>
>
> My Problem is not to send the E-Mail this works fine with the console "telnet localhost 25" i believe the problem is the communication between Rancid and postfix. I think postfix didn't recognize that Rancid is doing something.
>
> My postfix/main.cf looks like the following:
>
>
>
> myhostname = my hostname
> alias_maps = hash:/etc/aliases
> alias_database = hash:/etc/aliases
> myorigin = /etc/mailname
> mydestination = IP of the E-Mail server,localhost
> mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
> mailbox_size_limit = 10
> recipient_delimiter = +
> default_destination_concurrency_limit = 100
> relayhost = IP of the E-Mail Server
> empty_address_recipient = My E-Mail
>
>
>
> As you can see i have an relay host.
>
> Please help me i am realy desperately.
>
>
>
>
>
> Best Regards
>
>
>
>
>
>
>
>
>

Reply all
Reply to author
Forward
0 new messages