Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Aliases location #17

Open
xavierba opened this issue Dec 21, 2017 · 2 comments
Open

Aliases location #17

xavierba opened this issue Dec 21, 2017 · 2 comments

Comments

@xavierba
Copy link
Collaborator

Hi Soji,

Currently the sympa aliases are located in 3 places:

  • /etc/sympa/aliases.sympa.sendmail for sendmail robot aliases
  • /etc/sympa/aliases.sympa.postfix for postfix robot aliases
  • /var/lib/sympa/sympa_aliases for list aliases

First, I'm not sure the tiny difference between the sendmail and postfix aliases file really needs to split them in two. Probably, merging them and adding a comment would be enough.
Also, the rpm would need to ship empty /etc/sympa/aliases.sympa.sendmail.db and /etc/sympa/aliases.sympa.postfix.db owned by root:root and mode 644 so the newaliases command would work out of the box.

Second, I'm not sure to understand why the split between the robot and list aliases is done. My uneducated opinion is it adds yet another complexity to the setup, one needs to define 2 aliases files in the MTA.
Also, same issue as above with the missing 644 root:root /var/lib/sympa/sympa_aliases.db
Both files would need to be created in %post, only if they don't exist.
I'd rather have them directly shipped in the rpm and marked as %config(noreplace), but then rpmlint would rightly complain about config files not in /etc.

I would like to suggest to gather them all in /etc/sympa/aliases, for ease of setup and packaging.

I have a branch which implements these changes (although the merge of sendmail/postfix aliases and .db creation is in one commit which would be better split in two).
https://github.com/xavierba/sympa-rpm/tree/aliases
In case we follow that path, some additional commits will be needed to update the doc and ensure smooth migration of the aliases, but I'd rather add them once we have an agreement on the way forward.

I'm probably missing some background and all my changes might not make sense. You know the codebase much better than I ever will, so I'd really like to have your educated opinion.
I think this is the last thing to address before the package is ready for a review.

Regards,
Xavier

@ikedas
Copy link
Owner

ikedas commented Dec 22, 2017

First, I'm not sure the tiny difference between the sendmail and postfix aliases file really needs to split them in two. Probably, merging them and adding a comment would be enough.

Alias with wildcard (bounce+*) is impossible with Postfix, and Sendmail does not have recipient_delimiter parameter. I suppose merging aliases.sympa.* into one file may confuse Postfix users with no expericences of Sendmail, and vice versa. If possible, I prefer to treat them as separate files (I'll write on this again in below).

Also, the rpm would need to ship empty /etc/sympa/aliases.sympa.sendmail.db and /etc/sympa/aliases.sympa.postfix.db owned by root:root and mode 644 so the newaliases command would work out of the box.

Looks a good idea.

Second, I'm not sure to understand why the split between the robot and list aliases is done. My uneducated opinion is it adds yet another complexity to the setup, one needs to define 2 aliases files in the MTA.

I guess the reason as below:

  • The aliases in the file defined by sendmail_aliases are managed by Sympa: List aliases are appended or removed on this file by Sympa automatically. So it would be better not to edit this file manually.
  • The other aliases not related to the lists while required by Sympa (and addresses to be excluded from list service) are not managed by Sympa. So the file would be better to be edited manually.

For example, when the disk crashed and alias files were lost, list aliases can be regenerated by sympa.pl --make_alias_file (if it had never been modified), and the file for other aliases have to be recreated by hand.

Also, same issue as above with the missing 644 root:root /var/lib/sympa/sympa_aliases.db
Both files would need to be created in %post, only if they don't exist.
I'd rather have them directly shipped in the rpm and marked as %config(noreplace), but then rpmlint would rightly complain about config files not in /etc.

In a sense, these alias files are not mandatory. Because their contents are differ from MTA by MTA, and there are several ways for single MTA (e.g. P, S, O). I feel it is possible that these may be provided as sample files, not as working configuration.

I would like to suggest to gather them all in /etc/sympa/aliases, for ease of setup and packaging.

I have a branch which implements these changes (although the merge of sendmail/postfix aliases and .db creation is in one commit which would be better split in two).
https://github.com/xavierba/sympa-rpm/tree/aliases
In case we follow that path, some additional commits will be needed to update the doc and ensure smooth migration of the aliases, but I'd rather add them once we have an agreement on the way forward.

I'm probably missing some background and all my changes might not make sense. You know the codebase much better than I ever will, so I'd really like to have your educated opinion.
I think this is the last thing to address before the package is ready for a review.

Regards,
Xavier

@xavierba
Copy link
Collaborator Author

xavierba commented Dec 22, 2017

Thanks for the detailed explanations.
I opened a pull request with just the .db files creation: #18

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants