nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.5k stars 4.08k forks source link

Double email reminder notifications sent for an event #29434

Closed meonkeys closed 3 years ago

meonkeys commented 3 years ago
I invited some people to a recurring event. I set a reminder notification email to be sent 2 hours before the event. Every attendee receives two reminder notification emails. ### Steps to reproduce 1. Create event. 2. Add email reminder 2 hours before the event. 3. Observe actual email notifications sent. ### Expected behaviour Each attendee receives a single notification email 2 hours before the event. ### Actual behaviour Each attendee receives two notification emails 2 hours before the event. ### System info ## Server configuration detail **Operating system:** Linux 5.4.0-89-generic nextcloud/calendar#100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021 x86_64 **Webserver:** Apache/2.4.51 (Debian) (apache2handler) **Database:** MariaDB 10.5.12 **PHP version:** 8.0.11 Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, PDO, pdo_sqlite, bz2, posix, Reflection, session, SimpleXML, standard, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, apache2handler, apcu, bcmath, Phar, exif, gd, gmp, imagick, imap, intl, ldap, memcached, pcntl, pdo_mysql, pdo_pgsql, redis, smbclient, sodium, zip, pdlib, libsmbclient, Zend OPcache **Nextcloud version:** 22.2.0 - 22.2.0.2 **Updated from an older Nextcloud/ownCloud or fresh install:** Updated **Where did you install Nextcloud from:** I'm using a Docker image built from `nextcloud:22-apache`. I added stuff to make face recognition work. See below for Dockerfile. ### List of activated apps ``` Enabled: - accessibility: 1.8.0 - activity: 2.15.0 - admin_audit: 1.12.0 - bruteforcesettings: 2.2.0 - calendar: 2.3.4 - circles: 22.1.1 - cloud_federation_api: 1.5.0 - comments: 1.12.0 - contacts: 4.0.3 - contactsinteraction: 1.3.0 - cookbook: 0.9.6 - dashboard: 7.2.0 - dav: 1.19.0 - drawio: 1.0.1 - event_update_notification: 1.3.0 - federatedfilesharing: 1.12.0 - files: 1.17.0 - files_external: 1.13.0 - files_fulltextsearch: 22.0.1 - files_pdfviewer: 2.3.0 - files_rightclick: 1.1.0 - files_sharing: 1.14.0 - files_trashbin: 1.12.0 - files_versions: 1.15.0 - files_videoplayer: 1.11.0 - firstrunwizard: 2.11.0 - fulltextsearch: 22.0.1 - fulltextsearch_elasticsearch: 22.0.1 - impersonate: 1.9.0 - integration_whiteboard: 0.0.14 - logreader: 2.7.0 - lookup_server_connector: 1.10.0 - maps: 0.1.9 - metadata: 0.14.0 - news: 16.1.0 - nextcloud_announcements: 1.11.0 - notes: 4.1.1 - notifications: 2.10.1 - oauth2: 1.10.0 - password_policy: 1.12.0 - passwords: 2021.10.20 - phonetrack: 0.6.9 - provisioning_api: 1.12.0 - recommendations: 1.1.0 - richdocuments: 4.2.3 - serverinfo: 1.12.0 - settings: 1.4.0 - sharebymail: 1.12.0 - spreed: 12.1.2 - support: 1.5.0 - systemtags: 1.12.0 - tasks: 0.14.2 - text: 3.3.0 - theming: 1.13.0 - twofactor_backupcodes: 1.11.0 - twofactor_nextcloud_notification: 3.2.1 - twofactor_totp: 6.1.0 - twofactor_u2f: 6.2.0 - user_status: 1.2.0 - video_converter: 1.0.3 - viewer: 1.6.0 - workflowengine: 2.4.0 Disabled: - analytics - appointments - audioplayer - audioplayer_editor - cms_pico - duplicatefinder - encryption - epubreader - facerecognition - federation - files_markdown - files_texteditor - forms - mail - photos - privacy - survey_client - updatenotification - user_ldap - weather_status ``` ### Configuration (config/config.php) ``` { "htaccess.RewriteBase": "\/", "memcache.local": "\\OC\\Memcache\\APCu", "apps_paths": [ { "path": "\/var\/www\/html\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/www\/html\/custom_apps", "url": "\/custom_apps", "writable": true } ], "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "nextcloud.example.com" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "22.2.0.2", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "3306", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "mail_smtpmode": "smtp", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_sendmailmode": "smtp", "mail_smtpport": "25", "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "forwarded_for_headers": [ "HTTP_X_FORWARDED_FOR", "HTTP_X_REAL_IP" ], "maintenance": false, "loglevel": 3, "ldapIgnoreNamingRules": false, "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory", "has_internet_connection": true, "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "password": "***REMOVED SENSITIVE VALUE***", "port": 6379 }, "enabledPreviewProviders": [ "OC\\Preview\\PNG", "OC\\Preview\\JPEG", "OC\\Preview\\GIF", "OC\\Preview\\BMP", "OC\\Preview\\XBitmap", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\Movie", "OC\\Preview\\PDF", "OC\\Preview\\SVG" ], "overwrite.cli.url": "https:\/\/nextcloud.example.com", "overwriteprotocol": "https", "app_install_overwrite": [ "cookbook", "gpxedit" ], "default_phone_region": "US" } ``` **External storages:** yes ### External storage configuration redaced **Encryption:** redacted **User-backends:** * `OC\User\Database` **Talk configuration:** STUN servers * stun.nextcloud.com:443 TURN servers * no custom server configured Signaling servers (mode: external): * https://eu01-w2hcveraomwc.cust.spreed.cloud/ - REDACTED **Browser:** Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 ### Dockerfile ``` # FIXME: this is probably out of date. I need to incorporate changes from # https://github.com/iamklaus/nextcloud/commits/main/apache/Dockerfile , probably on a regular # basis. I think that's the Dockerfile I started with. # # Same for https://github.com/nextcloud/docker/commits/master/22/apache/Dockerfile ARG NCVERSION=22-apache # # Use a temporary image to compile and test the libraries # Likely source: https://github.com/matiasdelellis/facerecognition/issues/160#issuecomment-559590851 # FROM nextcloud:$NCVERSION as builder # Build and install dlib on builder RUN apt-get update ; \ apt-get install -y build-essential wget cmake libx11-dev libopenblas-dev ARG DLIB_BRANCH=v19.19 RUN wget -c -q https://github.com/davisking/dlib/archive/$DLIB_BRANCH.tar.gz \ && tar xf $DLIB_BRANCH.tar.gz \ && mv dlib-* dlib \ && cd dlib/dlib \ && mkdir build \ && cd build \ && cmake -DBUILD_SHARED_LIBS=ON --config Release .. \ && make \ && make install # Build and install PDLib on builder ARG PDLIB_BRANCH=master RUN apt-get install unzip RUN wget -c -q https://github.com/matiasdelellis/pdlib/archive/$PDLIB_BRANCH.zip \ && unzip $PDLIB_BRANCH \ && mv pdlib-* pdlib \ && cd pdlib \ && phpize \ && ./configure \ && make \ && make install # Enable PDlib on builder # If necesary take the php settings folder uncommenting the next line # RUN php -i | grep "Scan this dir for additional .ini files" RUN echo "extension=pdlib.so" > /usr/local/etc/php/conf.d/pdlib.ini # Test PDlib instalation on builer RUN apt-get install -y git RUN git clone https://github.com/matiasdelellis/pdlib-min-test-suite.git \ && cd pdlib-min-test-suite \ && make # # If pass the tests, we are able to create the final image. # FROM nextcloud:$NCVERSION RUN set -ex; \ \ apt-get update; \ apt-get install -y --no-install-recommends \ ffmpeg \ libmagickcore-6.q16-6-extra \ procps \ smbclient \ supervisor \ libopenblas-base \ # libreoffice \ ; \ rm -rf /var/lib/apt/lists/* # Install dlib and PDlib to image COPY --from=builder /usr/local/lib/libdlib.so* /usr/local/lib/ # If is necesary take the php extention folder uncommenting the next line RUN php -i | grep extension_dir COPY --from=builder /usr/local/lib/php/extensions/no-debug-non-zts-20200930/pdlib.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/ # Enable PDlib on final image RUN echo "extension=pdlib.so" > /usr/local/etc/php/conf.d/pdlib.ini # Increse memory limits RUN echo memory_limit=1024M > /usr/local/etc/php/conf.d/memory-limit.ini RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ \ apt-get update; \ apt-get install -y --no-install-recommends \ libbz2-dev \ libc-client-dev \ libkrb5-dev \ libsmbclient-dev \ ; \ \ docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ docker-php-ext-install \ bz2 \ imap \ ; \ pecl install smbclient; \ docker-php-ext-enable smbclient; \ \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark; \ ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ | awk '/=>/ { print $3 }' \ | sort -u \ | xargs -r dpkg-query -S \ | cut -d: -f1 \ | sort -u \ | xargs -rt apt-mark manual; \ \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/* RUN mkdir -p \ /var/log/supervisord \ /var/run/supervisord \ ; COPY supervisord.conf / ENV NEXTCLOUD_UPDATE=1 # Fix real client IP detection behind Traefik reverse proxy # Source: https://github.com/docker-library/wordpress/blob/5125491823651bcd691faf415d836f911fea09cd/apache-extras.template # Test with `php-test` container, not here. RUN set -eux; \ # https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html a2enmod remoteip; \ { \ echo 'RemoteIPHeader X-Forwarded-For'; \ # these IP ranges are reserved for "private" use and should thus *usually* be safe inside Docker echo 'RemoteIPTrustedProxy 172.16.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.17.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.18.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.19.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.20.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.21.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.22.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.23.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.24.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.25.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.26.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.27.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.28.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.29.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.30.0.0/16'; \ echo 'RemoteIPTrustedProxy 172.31.0.0/16'; \ } > /etc/apache2/conf-available/remoteip.conf; \ a2enconf remoteip; \ # https://github.com/docker-library/wordpress/issues/383#issuecomment-507886512 # (replace all instances of "%h" with "%a" in LogFormat) find /etc/apache2 -name '*.conf' -exec sed -ri 's/([[:space:]]*LogFormat[[:space:]]+"[^"]*)%h([^"]*")/\1%{X-Real-IP}i\2/g' '{}' + CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"] ``` ### redacted event ICS ``` BEGIN:VCALENDAR VERSION:2.0 PRODID:-//IDN nextcloud.com//Calendar app 2.3.1//EN CALSCALE:GREGORIAN BEGIN:VTIMEZONE TZID:America/Los_Angeles BEGIN:DAYLIGHT TZOFFSETFROM:-0800 TZOFFSETTO:-0700 TZNAME:PDT DTSTART:19700308T020000 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU END:DAYLIGHT BEGIN:STANDARD TZOFFSETFROM:-0700 TZOFFSETTO:-0800 TZNAME:PST DTSTART:19701101T020000 RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU END:STANDARD END:VTIMEZONE BEGIN:VEVENT CREATED:20210725T045311Z LAST-MODIFIED:20210725T045314Z DTSTAMP:20210725T045314Z UID:redacted SUMMARY:redacted call 🚀 ORGANIZER;CN=Adam Monsen:mailto:haircut@gmail.com ATTENDEE;CN=redacted;PARTSTAT=ACCEPTED;CUTYPE=INDIVID UAL;ROLE=REQ-PARTICIPANT;SCHEDULE-STATUS=2.0:mailto:example@gmail.com ...snipped 24 other attendees... RELATED-TO;RELTYPE=SIBLING:redacted RELATED-TO;RELTYPE=SIBLING:redacted RRULE:FREQ=MONTHLY;BYDAY=SA;BYSETPOS=4 X-MOZ-LASTACK:20210519T192839Z DTSTART;TZID=America/Los_Angeles:20210724T130000 DTEND;TZID=America/Los_Angeles:20210724T140000 SEQUENCE:0 LOCATION:https://meet.jit.si/redacted DESCRIPTION:redacted X-MOZ-GENERATION:1 BEGIN:VALARM ACTION:EMAIL TRIGGER:-PT2H DESCRIPTION:Default Mozilla Description END:VALARM END:VEVENT END:VCALENDAR ``` Event details ![01 details](https://user-images.githubusercontent.com/50639/138740225-ada8dbe7-edd3-47ee-84f2-4c39ec95a9fc.png) Attendees ![02 attendees](https://user-images.githubusercontent.com/50639/138740235-cac3f509-b3ea-4e8a-b9ee-b5413a40087d.png) Reminders ![03 reminders](https://user-images.githubusercontent.com/50639/138740244-c5dce173-c379-47c0-a8eb-3acfa45fc47e.png) Recurrence ![04 repeat](https://user-images.githubusercontent.com/50639/138740255-32daa9fa-904e-47ff-a3d8-6802eacec1c9.png) Emails sent (they are sent from my gmail account, both of these are outgoing) ![05 double email notifications](https://user-images.githubusercontent.com/50639/138740270-d119c01d-4afb-461f-9231-87e416159254.png)
stefan123t commented 3 years ago

Hi @meonkeys I did probably not see all details of your issue, but I noticed you are using gmail as a backend to store your CalDAV file. Could it be that both NC and GMail send out individual notifications ? Is there some log / evidence of both mails being sent by nextcloud ? Kind regards, Stefan

meonkeys commented 3 years ago

I'm using gmail to send emails from Nextcloud. I don't use Google Calendar since I started using Nextcloud Calendar about a year ago. I have gmail "smart features and personalization" disabled and events / .ics files emailed to me do not automatically show up on my Google Calendar.

meonkeys commented 3 years ago

Verified fixed with new events created on nc 22.2.0 . :+1: