1

Topic: SOGo send mail error

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer?: installer
- Linux/BSD distribution name and version: Ubuntu 18.04.4 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?: no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi guys,

So I started having a strange issue today after updating SOGo from the nightly build (current version on my system is 4.3.2.20200515-1). When trying to send mail from the webmail interface, the error below shows up in sogo.log. Same error if I try to send mail from mobile clients connected via ActiveSync:

==
2020-05-15 13:50:42.113 sogod[6016:6016] EXCEPTION: <NSException: 0x55c465184120> NAME:NSInvalidArgumentException REASON:NGSmtpClient(class) does not recognize clientWithURL: INFO:(null)
==

Google was not very helpful with this. Anyone here can give me a hint?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: SOGo send mail error

ionutb wrote:

Hi guys,

So I started having a strange issue today after updating SOGo from the nightly build (current version on my system is 4.3.2.20200515-1). When trying to send mail from the webmail interface, the error below shows up in sogo.log. Same error if I try to send mail from mobile clients connected via ActiveSync:

==
2020-05-15 13:50:42.113 sogod[6016:6016] EXCEPTION: <NSException: 0x55c465184120> NAME:NSInvalidArgumentException REASON:NGSmtpClient(class) does not recognize clientWithURL: INFO:(null)
==

Google was not very helpful with this. Anyone here can give me a hint?

I experienced exactly the same issue, also after updating the nightly build. It seems to be connected to https://github.com/inverse-inc/sogo/pull/274.

After trying various things I finally managed to get SOGo to send mail again by removing "SOGoMailingMechanism = smtp;" from /etc/sogo/sogo.conf. I can send mail again, and I haven't noticed any other side effects so far.

Hope that helps.

3

Re: SOGo send mail error

Looks like issue of the nightly build. sad

4

Re: SOGo send mail error

@cf: thank you so much. Fixed the problem for me as well. I’m honestly considering to pin sogo packages for the future, in order to avoid such blows smile

5

Re: SOGo send mail error

Ok, so now I have found a side-effect of removing "SOGoMailingMechanism=smtp;": outgoing mals are no longer DKIM signed. I suspect this is because they are now delivered differently and are somehow bypassing amavisd.

6

Re: SOGo send mail error

cf wrote:

Ok, so now I have found a side-effect of removing "SOGoMailingMechanism=smtp;": outgoing mals are no longer DKIM signed. I suspect this is because they are now delivered differently and are somehow bypassing amavisd.

In amavisd config file, make sure you have "enable_dkim_signing => 1," in policy bank 'MYNETS':

$policy_bank{'MYNETS'} = {
    originating => 1,  # is true in MYNETS by default, but let's make it explicit
    enable_dkim_signing => 1,
    ...
};

In Postfix /etc/postfix/master.cf, make sure transport `pickup` has content_filter parameter like this:

pickup ...
    -o content_filter=smtp-amavis:[127.0.0.1]:10026

Note: use port 10026, not 10024.

7

Re: SOGo send mail error

Thank you, Zhang. That fixes it for the pickup transport.

After some further digging I think I now also found the root underlying cause, which caused the error message when using the smtp transport in the first place: In my case at least it was a couple of libraries (SOPE) which are part of SOGo. It seems that something went wrong with the packaging and update process for the nightlies and these packages were installed a few days ago with version number "4.9.r1664.SHORTDATE" (instead of "4.9.r1664.20200514") and that seems to have broken things.

I resolved it now by manually installing these packages with the correct/most recent version number (it needs to be done manually, "apt update" did not show any avalaible updates). After that I could change sogo.conf back to the original and everything is working now.

8

Re: SOGo send mail error

Thanks for sharing. smile