I have been troubleshooting a rancid install for some time now. I cannot get rancid to send to the correct email address after making changes to the aliases The LIST_OF_GROUPS="mygroup" variable is set in /etc/rancid/rancid.config and the corresponding alias record in the /etc/aliases file is set: rancid-mygroup: user@contoso.com. I've ran the newaliases command several times. below are the mail logs.

Just to be clear it pulls configs and sends email but since the email/group stuff is not correct they get dropped.

Jun 13 12:15:42 rancid postfix/pickup[27906]: 3B69A214FC: uid=498 from=<rancid>
Jun 13 12:15:42 rancid postfix/cleanup[28607]: 3B69A214FC: message-id=<20170613191542.3B69A214FC@RANCID.contoso.com>
Jun 13 12:15:42 rancid postfix/qmgr[22342]: 3B69A214FC: from=<rancid@contoso.com>, size=4194, nrcpt=1 (queue active)
Jun 13 12:15:42 rancid postfix/smtp[28615]: 3B69A214FC: to=<rancid-mygroup@contoso.com>, orig_to=<rancid-mygroup>, relay=[]:25, delay=0.13, delays=0.02/0.01/0/0.1, dsn=2.6.0, status=sent (250 2.6.0  <20170613191542.3B69A214FC@RANCID.contoso.com> Queued mail for delivery)
Jun 13 12:15:42 rancid postfix/qmgr[22342]: 3B69A214FC: removed

Version: rancid version 3.1-3.el6 -- postfix version-2.6.6-6.el6_5 -- cetnos 6.6 --


/etc/aliases is used for local delivery. Note the comments at the top of /etc/postfix/virtual:

#    The  optional  virtual(5)  alias  table rewrites recipient
#        addresses for all local, all virtual, and all remote  mail
#        destinations.   This  is unlike the aliases(5) table which
#        is used only for local(8) delivery.  Virtual  aliasing  is
#        recursive,  and  is  implemented by the Postfix cleanup(8)
#        daemon before mail is queued.

You want to add to /etc/postfix/virtual the line (notice, no colon):

rancid-mygroup user@contoso.com
# You may also need
rancid-mygroup@contoso.com  user@contoso.com  

Then create the hash:

postmap hash:/etc/postfix/virtual

Then add line to /etc/postfix/main.cf:

virtual_alias_maps = hash:/etc/postfix/virtual

Restart Postfix and test. Emails sent to rancip-mygroup should get sent to user@contoso.com.

  • let me give that a go and see if it sticks. Thanks – ssvegeta96 Jun 14 '17 at 2:51
  • This worked my friend! Il have to see if it takes multiple emails for the same rancid-group alias so I can send this to multiple emails for one single group. – ssvegeta96 Jun 14 '17 at 3:45
  • It should a comma separated list of destination addresses, see man 5 virtual. – Deathgrip Jun 14 '17 at 3:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.