LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   RANCID-Postfix aliases not working (https://www.linuxquestions.org/questions/linux-software-2/rancid-postfix-aliases-not-working-4175606735/)

Kgeil 05-26-2017 04:56 PM

RANCID-Postfix aliases not working
 
Hi, I have gotten RANCID up and running using the directions here: https://help.ubuntu.com/community/RANCID. It sends the email to postfix, but when I look at mail.log, I see that it's not being sent to the address that corresponds with the RANCID group in /etc/aliases. All it does is append mydomain.com to the end of the rancid-group. My /etc/aliases file reads like this:

rancid-test kgeil@mydomain.com
rancid-admin-test kgeil@mydomain.com


And the log is here:

May 26 16:11:57 ubuntu postfix/smtp[29561]: 0BB8BE140E: to=<rancid-test@mydomain.com>, orig_to=<rancid-test>, relay=exchange-01.mydomain.local[10.101.0.100]:25, delay=0.24, delays=0.03/0.01/0.01/0.2, dsn=2.6.0, status=sent (250 2.6.0 <20170526201157.0BB8BE140E@ubuntu> [InternalId=717644] Queued mail for delivery)


From the directions on the help.ubuntu.com page, it appears as if rancid will send mail to postfix, addressed to the rancid-test group, and postfix will use the alias to address it to me, but it's not working that way, no matter how many configurations I've tried. If anyone has any advice, I'd be very grateful.
Thank you!

Kevin

bathory 05-27-2017 11:26 AM

Quote:

From the directions on the help.ubuntu.com page, it appears as if rancid will send mail to postfix, addressed to the rancid-test group, and postfix will use the alias to address it to me, but it's not working that way, no matter how many configurations I've tried.
Did you remember to run
Code:

newaliases
afterwards?

Kgeil 05-27-2017 01:13 PM

I did, thank you. I still just get the same results.

bathory 05-27-2017 04:32 PM

Quote:

Originally Posted by Kgeil (Post 5715931)
I did, thank you. I still just get the same results.

Now I see that you miss the colon sign ( : ) after the name you want to alias
Code:

rancid-test: kgeil@mydomain.com
rancid-admin-test: kgeil@mydomain.com


Kgeil 05-30-2017 08:20 AM

Thanks again @Bathory, I did have colons in there, but missed them when typing into my original post. I've restarted everything, ran newaliases, but still get the same result. Is my assumption correct that postfix should take an email destined for rancid-test, and forward it to kgeil@mydomain.com if the /etc/aliases file is set up this way?

Thanks,
Kevin

Kgeil 05-30-2017 09:20 AM

Solved!
 
I just figured it out. I am using a relay to send mail through (my local exchange server). What I was missing is that /etc/ailases is only used for local delivery (though I thought this would do it). What I needed to do was to configure /etc/postfix/main.cf to contain:
Code:

virtual_alias_maps = hash:/etc/postfix/virtual

My answer was here:
https://serverfault.com/questions/74...ill-be-ignored

Thanks for looking!

Kevin


All times are GMT -5. The time now is 05:30 AM.