Mailcow-dockerized: Auto-BCC Option

Created on 1 May 2017  路  27Comments  路  Source: mailcow/mailcow-dockerized

Hi there!
In Webmin it is possible to choose in a binary way if a mailbox should receive mail to itself and/or forward to another address (alias) and/or send an automatic reply:
grafik

What is the best way in mailcow to have a mailbox that receives its own mail but also forwards it to another address?

enhancement

Most helpful comment

It was implemented on the dev branch a few weeks ago: ade4b9e7ae7e28535ed261535526bc4e98ff48b4. Should be coming soon.

All 27 comments

Set up a Sieve rule: log in to SOGo with that account, Preferences, Mail, Filters and create a rule that forwards all messages to the desired email address. You can also have it send an automatic reply.

So just to clarify:
If I want a mail address to have its own mailbox but to also forward it to another mail address I will have to log in to SOGo for each of those and set this up?

Then another question:
What happens in this case when the mailbox quota is reached? Is the mail still being forwarded then but just not delivered to the mailbox?

Yes, you need to create a mailbox for each, log in and set up the rule.

Sieve rules are applied before the message is stored, so the forward should happen even if the mailbox is full. Please test this though -- just set the quota to 1 MB and send a message with a larger attachment to that mailbox.

I will, after I moved all my mailboxes 馃樃.

@mkuron Thank you very much for your help! Another question came up: In SOGo I can choose to forward and to keep a copy.
If I untick keeping a copy will all mails only be forwarded without keeping them in the mailbox?

Yes, that would probably do it. But if you don't want to keep the messages, you could just create an alias instead of a mailbox.

The "Forward" setting in SOGo translates into a sieve rule like redirect "[email protected];"; ticking the checkbox adds keep; after that.

I want some addresses to be real users/mailboxes, so external apps can use them via SMTP.
For the receiving end I only want them to forward, though.

Is this use-case alright? 馃樃

Ok, makes sense.

It would be awesome, if mailcow supported this very use-case when you create mailboxes.
Just a tiny textfield saying forward to address and a checkbox if a copy should be kept. 馃樃

@mkuron Can you point me towards how to set up a mailbox that copies all outgoing mail into its inbox? In webmin you could set it via an option named "BCC Mapping".

I also think it would be cool if it was possible to set up mail forwarding as described by @Braintelligence in mailcow UI without having to touch SOGo

@Braintelligence, that "BCC Mapping" would have to be done by modifying Postfix configuration (sender_bcc_maps). Outgoing messages never go through Dovecot/Sieve, so a rule in SOGo won't help.

Is there an option for this in the mailcow ui, though? 馃樃
If not it's not that big of a deal.
Can you point me towards how to map a whole domain to a single mailbox for outgoing bcc? 馃樅

There is no GUI option for that, but adding the following line to data/conf/postfix/main.cf would probably work for your use case:

sender_bcc_maps = inline:{ @[email protected] }

Awesome, @mkuron you're the best!
I think all my main use-cases are dealt with now, so I'm closing this, or should we keep this open as a feature request for inline creation of mailboxes with forwarding?

I'm leaving this open as a feature request. It's relatively trivial to implement Auto-BCC into the web UI, so if somebody needs it they should to it and submit a PR.

Hi!

I麓m using a mail archive tool (piler) to make sure my mails get archived.
For that i have to set for some domains bcc maps and also a x-add-envelope-to.

Currently i solve it on my own mailserver setup with

recipient_bcc_maps = hash:/etc/postfix/bcc_maps
sender_bcc_maps =  hash:/etc/postfix/bcc_maps

In the maps are entries like that:

  @domain1.com                [email protected]
  @domain-two.com          [email protected]

If there are other wo need a feature like this and my current setup would also fit this enhancement, i will have a look and try to make a PR.

Cheers,
Thomas

@develth I cant program that, but really would appreciate if you could make a PR :) would also be awesome if this feature would come into the Master

@develth Are you using piler via docker? If you implemented it within the docker-compose.yml of mailcow, I would be very happy to hear how you did it. See also https://github.com/mailcow/mailcow-dockerized/issues/457

@Braintelligence no - it runs on a different secured server.

@re-host for sure, when i got time for it ;)

@andryyy how did you integrated piler? via a custom postfix config?

@develth I see, do you use it in a dockerized fashion on that other server or "natively"?

@Braintelligence currently native.

@develth Is any form of special hardware involved, or is it just meant for "normal" backups? (Last question, sorry for nagging 馃樃)

@Braintelligence special hardware and special tools (e.g. bacula) - now back to topic ;)

@develth In hosted mailcow? Pretty much the same. Hide the bcc fields, send copy to Piler. Piler sits on a different server with an audit log.

any news on this? :)

It was implemented on the dev branch a few weeks ago: ade4b9e7ae7e28535ed261535526bc4e98ff48b4. Should be coming soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

damdinsharav picture damdinsharav  路  3Comments

Adorfer picture Adorfer  路  3Comments

thannaske picture thannaske  路  3Comments

lgleim picture lgleim  路  3Comments

a3li picture a3li  路  3Comments