mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
9.03k stars 1.18k forks source link

Mailbox ICS monitoring for external invites #3639

Open basicmonkey opened 4 years ago

basicmonkey commented 4 years ago

Is your feature request related to a problem? Please describe. I receive lots of calendar/meeting invites from external organisations. They all come as a standard ICS invite. At the moment I read the email and open the ICS file and add to my calendar.

Describe the solution you'd like It would be great if Mailcow/SoGo could monitor each mailbox and add any correctly formatted ICS invite to a specified calendar for that mailbox which would then appear in CalDAV clients as a meeting invite which can be accepted/rejected.

Many thanks,

James

perteraul commented 4 years ago

This would be great to have. 👍 💯

stale[bot] commented 4 years ago

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.

dragoangel commented 4 years ago

Do actually CalDav allow to store not accepted invites? This actually sounds strange.

basicmonkey commented 4 years ago

Any word on this at all team? Thanks.

mkuron commented 4 years ago

That would indeed be quite nice. Unfortunately, SOGo does not have access to your mailbox while you are not logged in (it does not know your password), so it wouldn't be able to monitor your mailbox for incoming invitations.

Just out of curiosity, do you know of any other groupware solutions that have this feature? I expect Exchange Server and Gmail probably have it, but I would be curious whether other open-source projects have any good ideas how to solve this problem.

basicmonkey commented 4 years ago

Not open source that I know of, I believe Kerio did.

Wouldn't this be achievable at message scanning stage? Detect .ics files there (post ham/spam of course). Or, could all messages be copied to a binary file/script after scanning which looks at the .ics files? Using sieve etc.

mkuron commented 4 years ago

Kerio probably has a tighter integration between the calendar backend and the mail server, similar to Exchange and Gmail. For us the backends are completely separate, the mail server does not even know about calendars.

Wouldn't this be achievable at message scanning stage?

Yes, at the point where we have the pushover integration. That way you don't need access to the mail storage backend, but you do need access to SOGo. Writing directly to the database is generally not a good idea though, so it would need to go through CalDAV. How would the integration script authenticate to SOGo though since it doesn't have the user's password? One could go through that impersonation mechanism (#2360), but we don't enable that by default for security reasons. Maybe via SOGo's JSON API?

Related question: why do you need this feature? Many clients (Outlook, Apple Mail, ... -- not sure about SOGo though) will automatically show invitations in the calendar. Personally I've never needed it.

basicmonkey commented 4 years ago

Yeah Kerio is fully self contained so much easier for them!

I understand that Mailcow is a very nice 'sum of parts' but would hope that there would be a way of making it work without much of a security compromise.

The reason for the request is that I receive a lot of meeting requests via .ics files. Practically all my clients use some form of calendaring system (all different) and they issue a lot of .ics emails. Having to import them manually is a bit of a pain. It would be much easier if authentic .ics files (that have passed spam/virus checks or from approved domains) would automatically be reflected in the calendar. I often get an .ics for each change of notes or time. It's also nice to have the request appear in my calendar inbox (BusyCal and Fantastical) with a proposed time already in the calendar for comparison rather than just looking at the email.

andryyy commented 4 years ago

You don't have to import them. A good client can be configured to auto-update the appointments or, if it's not that good, you just click one button.

You can sponsor it at SOGo if you like. They can probably add something to auto-accept when using the web UI.

I personally don't work on requests of someone elses customers for free at the moment. Hope you don't blame me for that. :)

All in all: Neither me nor my clients did ever need that feature. :)

I think SOGo does a great job as replacement and has many, many useful features. Using it as a company is really great. Combine that with all other components and you end up with something much more flexible than Kerio.

basicmonkey commented 4 years ago

Hey André, I really don't understand your reply. I've not tried to put anything you have done down or say that anything else is better! I use mailcow exclusively now because it is the best all round package. And I certainly don't expect you to do anything for free, that's why I made a contribution in June and was planning to do so regularly as your software is working great.

How do you mean 'someone else's customers'? I'm a customer of yours.

SOGo is great, I've set up my calendars and delegation just how I'd like them, for the first time in any groupware. This is only worked thanks to mailcow. Setting up SOGo without mailcow is a beast!

Having automatic ics import working would make interfacing with other companies calendars so much easier and more seamless. To make it work seamlessly would need mailcow to do the magic as it's a crossover between mail server and SOGo.

I'm more than happy to sponsor this request with you.

stale[bot] commented 3 years ago

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.

mkrecek234 commented 3 years ago

Fully Agree - I would need to see who accepted my calendar invitation (with an external email invitation), see email invitations I received right away pencilled in my calendar. Just as Exchange and Gmail do it.

Would be the only piece of the puzzle missing for me for a full Exchabge replacement

tuckerritti commented 2 years ago

I think that this would be a great improvement to Mailcow! This is my only complaint with Mailcow right now, because I am so used to having the ics invitations automatically import into my calendar. It is a PITA to import the ics files manually, and then accept them through my calendar program. The tradeoff is worth it though, as I enjoy not being spied on by Google ;)

daniele-athome commented 2 years ago

I'm maintaining for myself a Fuglu plugin for processing calendar invitation responses (responses are considered only when the event is found in the calendar). It is really a prototype (and it is no way secure enough) but I thought I'd put it here (I used Fuglu because I wanted to to do it on the MTA directly, not the MUA, e.g. SOGo - it has its disadvantages though - performance, for one).

ilya-kozyrev commented 1 year ago

Hi there,

I am a Mailcow and SOGo user and I am very disappointed that this product doesn't have a feature to automatically add new ics events to the calendar. It's a pain to import the files manually and then accept them through my calendar program. I know that this is a feature that is very important for many companies, and I hope that the Mailcow team can consider implementing it in the future.

RaftDigiAI commented 1 year ago

Hello everyone!

I really hope that future versions of the "mailcow-dockerized" project will include the functionality of automatically adding external meeting invitations to the calendar. This will significantly simplify the process of handling invitations and make it more convenient for users. Many mail servers, such as Gmail, already have this feature by default. In Gmail, invitations are automatically added to the calendar without the need to press the "add to calendar" button.

Unfortunately, the current version of the "mailcow-dockerized" project lacks this functionality, which can lead to difficulties and confusion for users. They have to manually add external calendar events and keep track of them, which may result in missing important meetings. Adding the feature of automatically adding external meeting invitations to the calendar will be a significant improvement for users and ensure smoother and safer handling of invitations.

Thank you very much, and I hope for a positive consideration of this request!

thxrben commented 5 months ago

So, for me the issue lies in two parts:

  1. Mailcow needs to have (somewhat full) access to your CalDAV Account, for adding and reading and modifying existing events.
  2. Actually automatically retrieving the ics file and parsing the information within.

My idea:

Adding (another) docker container to the mailcow-suite.

I know this might bloat things up, but if you had a CalDAV server (like radicale) implemented, one wouldn't need external CalDAV support and this all could happen locally over an API, internally between the containers.

With radicale being open source, we might be able to create a new API that runs locally. This might not fit with radicale, since they are a "minimalistic" CalDAV/CardDAV server, but maybe we could run some own patches to the container? (as in adding the API ourselves...)

This could be made optional, so that if a CalDAV/CardDAV server is not wanted during mailcow installation, the additional container doesnt have to be started.

Would this be an acceptable idea?

EDIT:

I would like to mention that radicale seems to support plugins. If these allow any kind of access to the calendars etc. is yet to be seen, but it looks promising for now: https://github.com/Kozea/Radicale/blob/master/DOCUMENTATION.md#plugins

mkuron commented 5 months ago

@Gandalf1783, that doesn’t actually solve any problem. Our current CalDAV server, SOGo, has APIs and user impersonation mechanisms that would probably allow writing events into it externally. The missing piece is really something that can parse all incoming mail for calendar invitation and pass them to a defined API.

wastez commented 2 weeks ago

@daniele-athome I have a look on your fuglu solution right now and want to use it for our purposes but the docker compose override file is missing. Would be great to get it.

Thanks.

daniele-athome commented 2 weeks ago

I disabled the fuglu script because it was not secure. Specifically, the mail transport chain in master.cf was causing issues with bounces - I still have not fixed that due to lack of time, it is surely a postfix configuration issue though (although the python script itself was NOT audited). Anyway here is the override:

  calendarfilter-mailcow:
    build: data/Dockerfiles/calendarfilter
    volumes:
      - ./data/conf/calendarfilter/fuglu.conf:/etc/fuglu/fuglu.conf:ro
    environment:
      - LOG_LINES=${LOG_LINES:-9999}
      - TZ=${TZ}
    restart: always
    dns:
      - ${IPV4_NETWORK:-172.22.1}.254
    networks:
      mailcow-network:
        aliases:
          - calendarfilter
wastez commented 2 weeks ago

Thank you. Right now i'm working on a solution for exact the problem described here, to get calendar previews for external invites. Can you tell me which problems did you exactly have with bounces, so i can find a solution for it?

Thanks.

Edit: Did you also try to configure it als milter, should be also a possibility?

wastez commented 2 weeks ago

@daniele-athome As i said in my post above, milter is for this case the better solution. Tested it and it worked great, and also your problems should be gone i think.

And the best is that the master config has not to be touched for it, its just configurable with the extra.cf.