Re[2]: [SOGo] 3.0.2 nightly email reminders broken

2016-04-12 Thread qm...@top-consulting.net
You don't need to provide credentials. Make sure that the IP address of the 
SOGO server is allowed to relay through the smtp server and that you have this 
line in sogo.conf
SOGoMailingMechanism = smtp;
make sure you DO NOT have this line:
SOGoSMTPAuthenticationType
On Tue, Apr 12, 2016 at 06:19 AM, Peter B  wrote:
On 11/04/2016 13:42, t...@aon.at (mailto:t...@aon.at) wrote:
Hi Peter,
I still think you should specify "-p /path/to/credFile".

Can you try and do a strace while doing the test.

Regards,
Thomas

Hi,

I put in a credentials file and email is now sent. I'm kind of unhappy 
about having the credentials on the filesystem but hey. The mail server 
will allow delivery to local addresses with no credentials (as any 
server accepting inbound mail would) so I'm surprised it's necessary.

Certainly the documentation suggests that it's not required - "If your 
mail server requires use of SMTP AUTH" - mine doesn't require it, so why 
do I need to provide credentials?

Peter.
-- 
users@sogo.nu (mailto:users@sogo.nu)
https://inverse.ca/sogo/lists (https://inverse.ca/sogo/lists)
-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Re: [SOGo] 3.0.2 nightly email reminders broken

2016-04-12 Thread Peter B

On 11/04/2016 13:42, t...@aon.at wrote:

Hi Peter,
I still think you should specify "-p /path/to/credFile".

Can you try and do a strace while doing the test.

Regards,
Thomas


Hi,

I put in a credentials file and email is now sent. I'm kind of unhappy 
about having the credentials on the filesystem but hey. The mail server 
will allow delivery to local addresses with no credentials (as any 
server accepting inbound mail would) so I'm surprised it's necessary.


Certainly the documentation suggests that it's not required - "If your 
mail server requires use of SMTP AUTH" - mine doesn't require it, so why 
do I need to provide credentials?


Peter.
--
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] 3.0.2 nightly email reminders broken

2016-04-11 Thread Peter B

On 11/04/2016 06:20, t...@aon.at wrote:

Hi Peter!
I think problem occurs some where in
- (NSException *) _smtpSendData: (NSData *) mailData
toRecipients: (NSArray *) recipients
  sender: (NSString *) sender
   withAuthenticator: (id ) authenticator
   inContext: (WOContext *) woContext


Please post you content of sogo.conf.

Regards,
Thomas


Sanitized sogo.conf:

{
  WOPort = 127.0.0.1:3;
  WOWorkersCount = 10;
  SOGoIMAPServer = localhost;
  SOGoSMTPServer = localhost;
  SOGoMailingMechanism = smtp;
  SOGoSMTPAuthenticationType = PLAIN;
  SOGoForceExternalLoginWithEmail = YES;
  SOGoProfileURL = 
"mysql://domain1.com:password@localhost:5432/sogo/sogo_user_profile";
  OCSFolderInfoURL = 
"mysql://domain1.com:password@localhost:5432/sogo/sogo_folder_info";
  OCSSessionsFolderURL = 
"mysql://domain1.com:password@localhost:5432/sogo/sogo_sessions_folder";
  OCSEMailAlarmsFolderURL = 
"mysql://domain1.com:password@localhost:5432/sogo/sogo_sogo_alarms_folder";

  SOGoSieveServer = sieve://127.0.0.1:4190;
  SOGoAppointmentSendEMailNotifications = YES;
  SOGoEnableEMailAlarms = YES;
  SOGoPasswordChangeEnabled = YES;

  domains = {
domain2.com = {
  SOGoMailDomain = domain2.com;
  SOGoUserSources = (
{
  type = ldap;
  CNFieldName = cn;
  UIDFieldName = uid;
  IDFieldName = uid; // first field of the DN for direct binds
  baseDN = "dc=users,dc=domain1,dc=com";
  canAuthenticate = YES;
  hostname = ldap://127.0.0.1:389;
  id = public_domain2com;
  isAddressBook = NO;
  filter = "(uid='*@domain2.com')";
}
  );
};
domain6.com = {
  SOGoMailDomain = domain6.com;
  SOGoUserSources = (
{
  type = ldap;
  CNFieldName = cn;
  UIDFieldName = uid;
  IDFieldName = uid; // first field of the DN for direct binds
  baseDN = "dc=users,dc=domain1,dc=com";
  canAuthenticate = YES;
  hostname = ldap://127.0.0.1:389;
  id = public_domain6com;
  isAddressBook = NO;
  filter = "(uid='*@domain6.com')";
}
  );
};
domain5.com = {
  SOGoMailDomain = domain5.com;
  SOGoUserSources = (
{
  type = ldap;
  CNFieldName = cn;
  UIDFieldName = uid;
  IDFieldName = uid; // first field of the DN for direct binds
  baseDN = "dc=users,dc=domain1,dc=com";
  canAuthenticate = YES;
  hostname = ldap://127.0.0.1:389;
  id = public_domain5com;
  isAddressBook = NO;
  filter = "(uid='*@domain5.com')";
}
  );
};
domain3.com = {
  SOGoMailDomain = domain3.com;
  SOGoUserSources = (
{
  type = ldap;
  CNFieldName = cn;
  UIDFieldName = uid;
  IDFieldName = uid; // first field of the DN for direct binds
  baseDN = "dc=users,dc=domain1,dc=com";
  canAuthenticate = YES;
  hostname = ldap://127.0.0.1:389;
  id = public_domain3com;
  isAddressBook = NO;
  filter = "(uid='*@domain3.com')";
}
  );
};
domain1.com = {
  SOGoMailDomain = domain1.com;
  SOGoUserSources = (
{
  type = ldap;
  CNFieldName = cn;
  UIDFieldName = uid;
  IDFieldName = uid; // first field of the DN for direct binds
  baseDN = "dc=users,dc=domain1,dc=com";
  canAuthenticate = YES;
  hostname = ldap://127.0.0.1:389;
  id = public_domain1com;
  isAddressBook = NO;
  filter = "(uid='*@domain1.com')";
}
  );
};
  };
  SOGoDomainsVisibility = 
((domain3.com,domain1.com,domain5.com,domain2.com,domain4.com));

  SOGoPageTitle = WebMail;
  SOGoVacationEnabled = YES;
  SOGoForwardEnabled = YES;
  SOGoSieveScriptsEnabled = YES;
  SOGoMailAuxiliaryUserAccountsEnabled = YES;
  SOGoTimeZone = Atlantic/Canary;
}

Peter.

--
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] 3.0.2 nightly email reminders broken

2016-04-10 Thread t...@aon.at
Hi Peter!
I think problem occurs some where in
- (NSException *) _smtpSendData: (NSData *) mailData
   toRecipients: (NSArray *) recipients
 sender: (NSString *) sender
  withAuthenticator: (id ) authenticator
  inContext: (WOContext *) woContext


Please post you content of sogo.conf.

Regards,
Thomas
-- 
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] 3.0.2 nightly email reminders broken

2016-04-10 Thread Peter B

On 10/04/2016 21:08, t...@aon.at wrote:

Hi Peter,
according to the EHLO reponse the server needs authenticatin (250-AUTH=PLAIN
LOGIN).

Do you call sogo-ealarms-notify with "-p  /path/to/credFile"?

Thomas


Hi Thomas,

Thanks for taking a look at this.

Auth isn't required by the SMTP server that SOGo is connecting to; the 
250-AUTH messages are informing the client of methods available (I 
wouldn't be getting your emails otherwise!).


Peter.
--
users@sogo.nu
https://inverse.ca/sogo/lists


[SOGo] 3.0.2 nightly email reminders broken

2016-04-09 Thread Peter B

Hi all,

Ubuntu 14.04, SOGo nightlies (3.0.2.20160409-1 at time of writing). Live 
server with working email. SOGo otherwise fully working.


I have SOGoEnableEMailAlarms set to yes in sogo.conf, 
OCSEMailAlarmsFolderURL correctly configured and a cron entry for the 
sogo user to run sogo-ealarms-notify.


Events with email reminders set correctly appear in 
sogo_sogo_alarms_folder in the database, and disappear at the right 
time. However, no emails.


Performing strace on sogo-ealarms-notify when it's called by cron 
reveals that the process is indeed reading the alarms folder in the 
database and reading the associated event from the database.


sogo-ealarms-notify then opens a connection to the SMTP server, and I 
see the following in strace:


connect(7, {sa_family=AF_INET, sin_port=htons(25), 
sin_addr=inet_addr("127.0.0.1")}, 16) = 0


fcntl(7, F_GETFL)   = 0x2 (flags O_RDWR)

fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK)= 0

fcntl(7, F_GETFL)   = 0x802 (flags O_RDWR|O_NONBLOCK)

getsockname(7, {sa_family=AF_INET, sin_port=htons(57822), 
sin_addr=inet_addr("127.0.0.1")}, [16]) = 0


recvfrom(7, 0x299f910, 512, 0, 0, 0)= -1 EAGAIN (Resource 
temporarily unavailable)


poll([{fd=7, events=POLLRDNORM}], 1, 360) = 1 ([{fd=7, 
revents=POLLRDNORM}])


recvfrom(7, "220 my.host.com ESMTP Postfix (Ubuntu)\r\n", 512, 0, NULL, 
NULL) = 43


stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=250, ...}) = 0

open("/etc/hosts", O_RDONLY|O_CLOEXEC)  = 8

fstat(8, {st_mode=S_IFREG|0644, st_size=176, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0x7f5069b16000


read(8, "127.0.0.1 localhost.localdomain localhost\n99.99.99.99 
my.host.com host1\n99.99.99.99 my.alias.com s18501073\n99.99.99.99 
my.alias2.com\n", 4096) = 176


close(8)= 0

munmap(0x7f5069b16000, 4096)= 0

sendto(7, "EHLO localhost.localdomain", 26, MSG_NOSIGNAL, NULL, 0) = 26

sendto(7, "\r\n", 2, MSG_NOSIGNAL, NULL, 0) = 2

recvfrom(7, 0x299f910, 512, 0, 0, 0)= -1 EAGAIN (Resource 
temporarily unavailable)


poll([{fd=7, events=POLLRDNORM}], 1, 360) = 1 ([{fd=7, 
revents=POLLRDNORM}])


recvfrom(7, "250-my.host.com\r\n250-STARTTLS\r\n250-SIZE 
1024\r\n250-VRFY\r\n250-AUTH PLAIN LOGIN\r\n250-AUTH=PLAIN 
LOGIN\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250 DSN\r\n", 512, 
0, NULL, NULL) = 155


brk(0x29cc000)  = 0x29cc000

sendto(7, "QUIT\r\n", 6, MSG_NOSIGNAL, NULL, 0) = 6

recvfrom(7, 0x299f910, 512, 0, 0, 0)= -1 EAGAIN (Resource 
temporarily unavailable)


poll([{fd=7, events=POLLRDNORM}], 1, 360) = 1 ([{fd=7, 
revents=POLLRDNORM}])


recvfrom(7, "221 2.0.0 Bye\r\n", 512, 0, NULL, NULL) = 15

recvfrom(7, 0x299f910, 512, 0, 0, 0)= -1 EAGAIN (Resource 
temporarily unavailable)


poll([{fd=7, events=POLLRDNORM}], 1, 360) = 1 ([{fd=7, 
revents=POLLRDNORM}])


recvfrom(7, "", 512, 0, NULL, NULL) = 0

shutdown(7, SHUT_RDWR)  = 0

close(7)= 0

(hostnames and IPs changed to protect a live server)

As you can see, sogo-ealarms-notify is connecting, sending EHLO, then 
QUITting without attempting to send any email. The postfix log (with 
debug) confirms this.


sogo-ealarms-notify appears to do this (connect/ehlo/quit) for every 
invitee in the event. An event with a single invitee (or none, so just 
the organiser) has one connection in strace. An event with multiple 
invitees causes sogo-ealarms-notify to make the same number of 
connections as there are invitees. However, as no data is ever sent I 
can't associate connections to invitee addresses - I'm making 
assumptions therefore.


Anyone any suggestions? Anyone got it working on 3.0.2 or 3.0.2 nightlies?

Peter.
--
users@sogo.nu
https://inverse.ca/sogo/lists