What does "setup email restrict <add|del|list> <send|receive> [<EMAIL ADDRESS>]" do? #3624
-
|
Can I block or "whitelist" an email address with this command? The help isn't very ... helpful ;) |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 13 replies
-
|
If you're comfortable reading the related script, this is the interesting part: docker-mailserver/target/bin/restrict-access Lines 34 to 45 in f674232 You can look up the two postfix options on the Postfix config docs:
Both appear to configure a recipient or sender
To be fair, it does say "most" commands support docker-mailserver/target/bin/setup Lines 24 to 25 in f674232 It is an old feature contributed from community a while back I think, so it's not in as good shape as other parts of DMS. I don't think we have any official documentation tied to it either :( |
Beta Was this translation helpful? Give feedback.
-
Don't get me wrong, this is an awesome mailserver-inna-box solution. Amazing I run it in a 1 GB VM where most others would require 4 or even 8 GB to run reliable. I was just looking for a way to block/reject specific mail addresses and domains and it seemed this might be it. I had a look at the linked docs, but it's unfortubately a bit too technical for my paygrade. |
Beta Was this translation helpful? Give feedback.
-
|
From the
The last part notes that you can use it for sender and recipient addresses which the related Further down in that When you add an address into this config file, it will append it like this with the Further down the
The current help message is what you already shared in your log output: We just need that extra clarity of what docker-mailserver/target/bin/restrict-access Lines 34 to 40 in f674232
Great so if you want to block mail:
You can use the
Hope the above helps clarify the feature better. Looks like it'll reject any mail address that matches a sender or recipient config described above with a generic message. You should be able to test it yourself with some other email address? Since the command reloads Postfix after making the config change, it should apply immediately without needing to restart DMS. If you manually edit the config files instead you'd probably have to restart for it to notice the change. |
Beta Was this translation helpful? Give feedback.
-
|
Indeed, |
Beta Was this translation helpful? Give feedback.
-
|
... 1.5 year later ... So it's essentially a blacklist functionality, right? How about a whitelist functionality, i.e. a way to disable all spam checking on mail from certain email addresses? Does this exist too somehow? |
Beta Was this translation helpful? Give feedback.
-
|
I'm not sure if I read this right but it seems like you have a lot of unsaved work in open browsers and other apps. Perhaps a quaint question, but maybe you could save to disk (or cloud, whatever) from time to time? No judgement, just curious? Anyway I will dig into your Amavis link and see if I can understand what it does and make it do what I need. :) |
Beta Was this translation helpful? Give feedback.
-
|
Hello. Am i doing something wrong? We have created an email account via:
and then we want to disable the sending functonality from this account:
The problem is that we still can send emails from |
Beta Was this translation helpful? Give feedback.
I have briefly touched on this feature in earlier comments on this discussion, for reference:
Which for your case the relevance is restricting incoming mail to Postfix via
smtpd_sender_restrictions->check_sender_access:docker-mailserver/target/bin/restrict-access
Lines 32 to 37 in fcd9909
Now something I did not appea…