Add default /etc/aliases for amavis, clamav. Add bsd-mailx.#1709
Add default /etc/aliases for amavis, clamav. Add bsd-mailx.#1709MakerMatrix wants to merge 4 commits intodocker-mailserver:masterfrom
Conversation
|
I like these changes - thanks for creating this PR:) I've added some comments I'd like to resolve first, and I've requested a review from @erik-wramner as weill, which I would like to see before merging. PS: I find it very nice that the key generation error is fixed! :D |
|
On reviewing your comments I think it would be much better if we wrapped the the clamav alias inside an if stmt, to check whether the user asked for that feature or not. I put it in because I noticed that cron job(s) get run as the clamav user. But I guess only if user asked for that feature. |
I accidentally did not press the submit button. You can now see my comments, sorry:) These are the ones I was referring to. EDIT: But your idea is worth a shot - backwards compatibility and stuff... |
|
In #1706 you mentioned that |
Fair question, but if you look closely you see that line was already there - I only made the comment, and then added the two lines below to append amavis and clamav. It was always the case that /etc/aliases got recreated from scratch when these functions are called. There are some comments around this and a TODO about how the check-for-changes script overwrites things done by start-mailserver, and also about making these things atomic, here. |
|
Oh my... I totally missed that. I didn't look close enough. Resolved:) |
|
Looks somewhat fine to me now. As mentioned in #1706 I am not sure whether the change now adds the aliases for root, amavis and clam, but I really don't see why this would be case. So is this working?:) |
|
What's the status here? @erik-wramner what do you think? EDIT: I think it's fine to merge this for the moment. Only when #1721 is done, we will release |
Yeah it works. In 1706 I had made some faulty assumptions about the default testing container config, just learning how to build and test. :). It was a simple matter of getting a a couple things configured away from defaults which in any real-world deployment would be the first things somebody would set. |
|
@erik-wramner when you've reviewed this PR, feel free to either merge it or close it. SInce we are working on the alias code anyways, I will leave it up to you what to do with this PR. |
| chown -R clamav:root /var/log/mail/freshclam.log && \ | ||
| mkdir -p /var/log/supervisor && \ | ||
| touch /var/log/supervisor/supervisord.log && \ | ||
| chown -R syslog:root /var/log/supervisor && \ |
There was a problem hiding this comment.
Please explain the need for this as well and how it is related to the aliases. It looks like you are trying to solve something, but what?
There was a problem hiding this comment.
It's not related to aliases, sorry. I believe I found errors in the logs where supervisord was throwing an error when trying to write to /var/log/supervisor/supervisord.log and it did not exist. I do apologize for not documenting this one better, I see I didn't even put a comment along with the PR and frankly even I cannot remember exactly where I found this one.
There was a problem hiding this comment.
I'll amend the first sentence of the previous to say that it was tangentially related to aliases in the sense that I found it when trying to discover exactly what was going on with aliases when supervisord brings up the mail service the first time after container creation. There are some conditions where they don't get added, which appear to be based on how some of the environment variables are set. I never narrowed it down further than that but thought it important for supervisord to be able to write its logs "out of the box"
| fi | ||
|
|
||
| # Append external postifx aliases | ||
| if [[ -f /tmp/docker-mailserver/postfix-aliases.cf ]] |
There was a problem hiding this comment.
This is probably fine, but we could check if postfix-aliases.cf has a mapping for amavis. Many existing installations may already have one (mine does). Not a big deal though, perhaps it is better to keep the code simple and write something about it in the README.
There was a problem hiding this comment.
Hmmm, mine didn't. My /tmp/dockermailserver/postfix-aliases.cf is empty. If that's a better place to do these, then by all means.
| then | ||
| echo "clamav: ${POSTMASTER_ADDRESS}" >> /etc/aliases | ||
| fi | ||
|
|
There was a problem hiding this comment.
See previous comment.
|
@aendeavor @MakerMatrix I don't understand what several of the changes are for. Perhaps the important fixes are done elsewhere? If so let's close this. If not feel free to motivate and perhaps we can merge instead. It feels as if the changes are trying to fix several things that are not related to the alias issue at all? |
|
Very true. There are some hotfixes in here that could probably go in another PR, you're right. @MakerMatrix can explain them and then we can decide if we need another PR. |
|
At this point I think this can be closed out without merging. I will try to recreate the supervisord.log issue and open that as a separate PR after the migration to the docker-mailserver github account (will I know when that happens?). I think everything else here including the additional default aliases is being addressed in different fixes. |
A good decision. You will see when the repository migration is ready in the README and when the other PRs are all closed - just look out for that. |
Also fixed dovecot keygen so it doesn't generate an error msg about RANDFILE.