Can´t send mails

server
10

#1

Can´t send any mails from my raspberry pi, but another server with similary config can send mails.

My mail provider is smtp.strato.de

I checked the connection with a ping and I try to send mails with the ip from strato as the host.

This error i saw on the Web GUI: "Beim Senden der E-Mail ist ein Problem aufgetreten. Bitte überprüfe Deine Einstellungen. (Fehler: Connection could not be established with host smtp.strato.de [ #0])"

I see the log, but I don´t have an idea to fix it.
And I found it unormal that on one server the config function but not on another server.

Server configuration

Operating system:
Raspbian GNU/Linux 8 (jessie)
Web server:
Apache/2.4.10 (Raspbian)
Database:
mysql Ver 14.14 Distrib 5.5.60, for debian-linux-gnu (armv8l) using readline 6.3
PHP version:
PHP 5.6.33-0+deb8u1
ownCloud version: (see ownCloud admin page)
10.0.8
Updated from an older ownCloud or fresh install:
updated from an older oC version
Where did you install ownCloud from:
webinstaller
Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:

{
    "system": {
        "instanceid": "ocoq89hwbqzx",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nas",
            "xxx"
        ],
        "datadirectory": "\/media\/owncloud\/data",
        "overwrite.cli.url": "https:\/\/xxx\/owncloud",
        "htaccess.RewriteBase": "\/owncloud",
        "dbtype": "mysql",
        "version": "10.0.8.5",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "Europe\/Berlin",
        "installed": true,
        "mail_smtpmode": "smtp",
        "default_language": "de",
        "trashbin_retention_obligation": "auto, 30",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "localhost",
            "port": 6379,
            "timeout": 0
        },
        "loglevel": 0,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "defaultapp": "files",
        "overwriteprotocol": "https",
        "updatechecker": false,
        "blacklisted_files": [
            ".htaccess"
        ],
        "enable_avatars": true,
        "asset-pipeline.enabled": true,
        "activity_expire_days": 365,
        "quota_include_external_storage": false,
        "versions_retention_obligation": "auto, 7",
        "allow_user_to_change_display_name": false,
        "knowledgebaseenabled": false,
        "session_lifetime": 86400,
        "check_for_working_htaccess": true,
        "maintenance": false,
        "theme": "",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "log_rotate_size": 104857600,
        "session_keepalive": true,
        "mail_smtpsecure": "ssl",
        "mail_smtpdebug": true
    }
}

List of activated apps:

Enabled:
  - activity: 2.3.6
  - audioplayer: 2.3.0
  - calendar: 1.5.7
  - comments: 0.3.0
  - configreport: 0.1.1
  - contacts: 1.5.4
  - dav: 0.3.2
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_antivirus: 0.12.0
  - files_external: 0.7.1
  - files_pdfviewer: 0.8.2
  - files_sharing: 0.10.1
  - files_texteditor: 2.2.1
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 16.0.2
  - market: 0.2.4
  - notifications: 0.3.3
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.3
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - external
  - theme-example
  - user_external

Are you using external storage, if yes which one: local/smb/sftp/...
local
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:

Operating system:

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

{"reqId":"PelCV9MqduMyRXejxGtU","level":0,"time":"2018-05-05T17:30:05+02:00","remoteAddr":"","user":"--","app":"cron","method":"--","url":"--","message":"Finished background job, the job took : 0 seconds, this job is an instance of class : OC\\Log\\Rotate with arguments : \/media\/owncloud\/data\/owncloud.log"}
{"reqId":"jMn0uElUUF0eZ2RJYz5L","level":0,"time":"2018-05-05T17:30:42+02:00","remoteAddr":"xx.xx.xxx.xx","user":"--","app":"webdav","method":"PROPFIND","url":"\/owncloud\/remote.php\/dav\/principals\/users\/myuser\/","message":"Exception: {\"Message\":\"HTTP\\\/1.1 401 No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotAuthenticated\",\"Code\":0,\"Trace\":\"#0 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(466): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#3 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(278): Sabre\\\\DAV\\\\Server->exec()\\n#5 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#6 \\\/var\\\/www\\\/html\\\/owncloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/html\\\/o...')\\n#7 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php\",\"Line\":168,\"User\":false}"}

Insert your ownCloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...

#2

I think this looks like a networking / connectivity or access permission issue which could explain why the same config works on a different server.


#3

Ok, thanks for the answer, i would think so too.

I think this is a local problem from my server, do you have any idea how can I test and fix it?


#4

Unfortunately i'm not familiar with such kind of topics. :confused: But maybe there are some tutorials out there in the net which could give you some pointers for debugging this?


#5

So now it works again. It was because the package "ca-certificates" was not installed.