Discussion:
[rancid] Rancid notification with SSMTP
Hugo Deprez
2011-07-11 12:56:22 UTC
Permalink
Hello,

I am trying to setup e-mail notification for rancid.
I am currently using rancid 2.3.6 on Debian.

On the server we are using SSMTP to send mail notification.

My problem is that SSMTP does not support aliases.

Is there a way to configure mail notification for rancid with ssmtp ?

Regards


Hugo
john heasley
2011-07-11 18:56:00 UTC
Permalink
Post by Hugo Deprez
Hello,
I am trying to setup e-mail notification for rancid.
I am currently using rancid 2.3.6 on Debian.
On the server we are using SSMTP to send mail notification.
My problem is that SSMTP does not support aliases.
Is there a way to configure mail notification for rancid with ssmtp ?
Postfix? seriously, postfix is pretty simple. dont see the point in
ssmtp, except for an embedded system.

otherwise, ssmtp probably has a so-called "smart host" configuration.
perhaps you can put the aliases on the smart host.
Brian De Wolf
2011-07-11 19:07:44 UTC
Permalink
On Mon, 11 Jul 2011 05:56:22 -0700
Post by Hugo Deprez
Hello,
I am trying to setup e-mail notification for rancid.
I am currently using rancid 2.3.6 on Debian.
On the server we are using SSMTP to send mail notification.
My problem is that SSMTP does not support aliases.
Is there a way to configure mail notification for rancid with ssmtp ?
I ran into this same problem (the lack of configurable recipients) when
I rolled out RANCID. Instead of fiddling with my mail config, I
patched RANCID to be configurable. I have attached the patch I made,
adjusted for 2.3.6.

Two caveats with this patch, now that I review it (it's been a while):
1) It restricts group names to valid environment variable names. This
bit me when I first used it because I was using dashes.
2) It uses bashisms in control_rancid, so the shebang should probably
be /bin/bash or the "${!var}" expressions should be converted to
something like "$(eval "echo\$${var}")".

Good luck!
Hugo Deprez
2011-07-12 19:01:11 UTC
Permalink
Hello,

thank you for your answer Brian.

The solution I found is to create an alias using virtual_alias_maps (I
define my alias from my LDAP server).
It works great and it didn't take much time !

John, postfix is simple there is no issue with that. SSMTP is just doing
what I am expecting from him (sending mail), so that's perfect.

Regards,

Hugo
Post by Brian De Wolf
On Mon, 11 Jul 2011 05:56:22 -0700
Post by Hugo Deprez
Hello,
I am trying to setup e-mail notification for rancid.
I am currently using rancid 2.3.6 on Debian.
On the server we are using SSMTP to send mail notification.
My problem is that SSMTP does not support aliases.
Is there a way to configure mail notification for rancid with ssmtp ?
I ran into this same problem (the lack of configurable recipients) when
I rolled out RANCID. Instead of fiddling with my mail config, I
patched RANCID to be configurable. I have attached the patch I made,
adjusted for 2.3.6.
1) It restricts group names to valid environment variable names. This
bit me when I first used it because I was using dashes.
2) It uses bashisms in control_rancid, so the shebang should probably
be /bin/bash or the "${!var}" expressions should be converted to
something like "$(eval "echo\$${var}")".
Good luck!
Loading...