0

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: [email protected]. 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=<[email protected]>
Jun 13 12:15:42 rancid postfix/qmgr[22342]: 3B69A214FC: from=<[email protected]>, size=4194, nrcpt=1 (queue active)
Jun 13 12:15:42 rancid postfix/smtp[28615]: 3B69A214FC: to=<[email protected]>, orig_to=<rancid-mygroup>, relay=192.168.40.74[192.168.40.74]:25, delay=0.13, delays=0.02/0.01/0/0.1, dsn=2.6.0, status=sent (250 2.6.0  <[email protected]> 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 --

1 Answer 1

1

/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 [email protected]
# You may also need
[email protected]  [email protected]  

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 [email protected].

3
  • let me give that a go and see if it sticks. Thanks
    – ssvegeta96
    Commented Jun 14, 2017 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
    Commented Jun 14, 2017 at 3:45
  • It should a comma separated list of destination addresses, see man 5 virtual.
    – Deathgrip
    Commented Jun 14, 2017 at 3:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .