-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Email Aliases in Drop Down for BCC Maps under Address Rewriting #3713
Comments
Hi :) Aliases cannot be used for BCC in Postfix. You can use the API to script that, perhaps? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
A few months later now, I tried another thing, which actually works and proves that postfix happily does BCC forwards for aliases. I added additional hash tables for sender and recipient bcc via extra.cf Original: main.cf Overwrite: extra.cf
I also added the necessary files sender_bcc_maps and recipient_bcc_maps into the folder data/conf/postfix/extra/ with the following content: After But still this would be much easier to do, if I could use the WebUI Address forwarding, which would do the same via a MySQL query. |
There must have been a show stopper I cannot remember right now... There was a problem and I don't want to merge that to master to find out a week later why. I tested this. :/ |
It's all fine, then I will continue to do it the hash-table way, I will test it for a few weeks and see if some issue comes up. |
Yes, please. Let's open it up. |
Thank you @andryyy So far, tests are running well. The actual mailbox BCCs defined in the Mailcow UI still work normally with the additionally added hash table. The extra alias BCCs from the hash tables work also as expected, this goes even so far that So basically when So I will continue to watch this. |
Everything still working wonderfully, all alias mails are forwarded as expected to my email archive. I'm getting the expected log entries in postfix, because I'm using extra.conf
I've been running pflogsumm reports the last two days also, everything there looks good as well. It seems, this thing is working with the extra hash table, so it should work via mysql and gui as well. @andryyy: What do you think? |
To further test this, after some research and refreshing my mysql knowledge, I removed the hash tables again and manually added entries (deactivated) for my aliasses into the bcc_maps table of mailcow (taking care that I would have no conflicting id's) I had to do it this way, since I don't know where the SELECT statement for the drop down menu in the web UI is defined ;-) INSERT INTO `bcc_maps` (`id`, `local_dest`, `bcc_dest`, `domain`, `type`, `created`, `modified`, `active`)
VALUES (12, '[email protected]', '[email protected]', 'domain1.de', 'sender', current_timestamp(), NULL, '0'),
(13, '[email protected]', '[email protected]', 'domain1.de', 'rcpt', current_timestamp(), NULL, '0') Afterwards I opened the web UI under "Configuration" -> "Mail setup" -> "Adress rewriting" Everything works fine, exactly as with the hash tables. Nothing broken, no errors or failures, mailcows postfix just happily continues to "mooo" :D and joyously forwards the mails to the alias addresses to my mailpiler instance By the way, did I already mention that I love Mailcow and I really appreciate the great work! A big thank you to all contributors! |
@andryyy: Just wanted to give new feedback, it is now running for 2 weeks without any issues. |
Thank you, I will try to add it soon. :)
Your testing is appreciated!
… Am 19.05.2021 um 13:20 schrieb Robert Christian ***@***.***>:
@andryyy: Just wanted to give new feedback, it is now running for 2 weeks without any issues.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@soulsymphonies I will rewrite the BCC stuff to use Rspamd. This will also prevent MX-based access maps (like using a regex to determine the next hop by MX record) to apply to BCC (@patschi). I think we should simply always include all aliases to BCC then (direct and shared). What do you think? The alternative way would be to make it selectable. |
@andryyy: Thank you, sounds like a sound idea to use rspamd, I'm always amazed how you come up with such great solutions. Would it mean a lot of extra work for you, when we would have an option to have the choice "forward all aliases (direct and shared)" and "forward only selected aliases" and then the opportunity to select them individually? Because I feel that I doesn't always make sense to automatically forward all shared aliases, |
Thank you, I've seen you have already added the aliases to the drop down list in BCC, I don't know why but when I select one of the aliasses I get the following message of the Web UI "Access denied or invalid form data", maybe a permission issue although I'm logged in as full administrator? |
@soulsymphonies Sorry, I forgot about that... :) It is fixed now. The option to toggle all aliases is not there yet. :( |
Thank you very much, I really appreciate your work.
Please, no hurry with the "toggle all aliases" :)
|
I was using this function as well for mail archiving purposes. Is there something that needs to be changed anywhere? |
How does this work when the alias is the @domain.com catchall? How does the alias/bcc get defined? Specifically, I want mail destined for nonexistent mailboxes to be forwarded to a mailcow mailbox ([email protected]) AND forwarded to an external [email protected]. Defining both [email protected] and [email protected] as targets of @domain.com works, but doesn't go through rspamd so no anonymizing of headers. When it gets processed as BCC (address rewrite/bcc map/recipient map), local headers are stripped when received at [email protected]. Suggestions? |
Is your feature request related to a problem? Please describe.
I'm using mailpiler as my email archival software, I'm using BCC maps under the "Address Rewriting" to foward the emails to mailpiler's SMTP server, this works beautifully.
But I have some mailboxes that use alias adresses additionally to their main email address and mails to and from those alias addresses should also be archived.
As aliases are not shown in the drop down when I choose to create a new BCC map, the only way I have to forward those mails is to use the entire email domain in the drop down list. The issue with this is that this also forwards and therefore archives all email to and from that email domain but not all email addresses should be archived.
I tried to use a second forward to mailpiler in the aliases section, but this then only archives incoming emails to that alias address and not outgoing emails.
Describe the solution you'd like
Would it maybe be possible to add aliases that are given to mailboxes to the drop down menu in BCC maps, so that I could selectively forward mail to mailpiler to archive it?
Thank you ever so much.
The text was updated successfully, but these errors were encountered: