So received a phone call from my isp today asking questions about emails they received *some 6K emails over a short time
Looking in the logs I found repeated messages in my mail log pointing to successfully sent emails, but where the recipient is firstname.lastname@example.org *just happened to be a valid email with my isp.
the www user seem to be tied to the cron job running as www scheduled every 15 minutes
crontab -u www -e # minute (0-59), # | hour (0-23), # | | day of the month (1-31), # | | | month of the year (1-12), # | | | | day of the week (0-6 with 0=Sunday). # | | | | | commands */15 * * * * /usr/local/bin/php -f /usr/local/www/nextcloud/cron.php
The mail log show this…
Jul 2 17:50:00 nextcloud postfix/pickup: B35FC1CAD8: uid=80 from=<www> Jul 2 17:50:00 nextcloud postfix/cleanup: B35FC1CAD8: message-id=<20200702095000.B35FC1CAD8@nextcloud.localdomain> Jul 2 17:50:00 nextcloud postfix/qmgr: B35FC1CAD8: from=<email@example.com>, size=748, nrcpt=1 (queue active) Jul 2 17:50:01 nextcloud postfix/smtp: B35FC1CAD8: to=<firstname.lastname@example.org>, orig_to=<www>, relay=smtp.iinet.net.au[188.8.131.52]:587, delay=1, delays=0.66/0.01/0.18/0.19, dsn=2.0.0, status=sent (250 ok: Message 304972311 accepted) Jul 2 17:50:01 nextcloud postfix/qmgr: B35FC1CAD8: removed
As you see there;s an attempt to send a email out to email@example.com that never reach me.
Dont understand why this is happening since the cron job simply is intended to refresh data - not actually send out an email.
postfix has been configured as this… *but still dont understand why an email is sent as part of the cron job ?
# SENDING MAIL # # The myorigin parameter specifies the domain that locally-posted # mail appears to come from. The default is to append $myhostname, # which is fine for small sites. If you run a domain with multiple # machines, you should (1) change this to $mydomain and (2) set up # a domain-wide alias database that aliases each user to # firstname.lastname@example.org. # # For the sake of consistency between sender and recipient addresses, # myorigin also specifies the default domain name that is appended # to recipient addresses that have no @domain part. # #myorigin = $myhostname #myorigin = $mydomain myorigin = iinet.net.au
Suspect that the owner *that should be www owner of the cron task ends up being the recipient when postfix builts its email and no idea how I can change this
Using FreeNAS 11.3-STABLE
nextcloud installed in its own jail.
Installed nextcloud: 184.108.40.206 (php73 version)
Sorry to hear you’re facing problems
In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
Or for longer, use three backticks above and below the code snippet:
longer example here
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can
Nextcloud version (eg, 18.0.2):
Operating system and version (eg, Ubuntu 20.04):
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.1):
The issue you are facing:
Is this the first time you’ve seen this error? (Y/N):
Steps to replicate it:
The output of your Nextcloud log in Admin > Logging:
The output of your config.php file in
/path/to/nextcloud (make sure you remove any identifiable information!):
The output of your Apache/nginx/system log in