view · edit · sidebar · attach · print · history




  • bbmb: Mail does not work
  • sandoz.xmlconv: Output of a transaction is not shown correctly
  • Keep in Mind



bbmb: Mail does not work

Also I want to add a config option mail mail_suppress_sending to inhibit sending.

The sandoz BBMB mail are sent via smtp_server: whereas for the we used smtp_server: and smtp_domain: The configuration item smtp_domain: was missing in /var/www/

I will use the test/util/test_mail.rb to see whether I can send real mails to my mail account. But somehow my authentication gets rejected. Why? Adapting the code as suggested in helped.

Pushed commits

sandoz.xmlconv: Output of a transaction is not shown correctly

Output part of a transaction shows an array instead of string. Eg.

Debugging the transaction 28288 shows at line 14 lib/xmlconv/view/preformatted.rb

[1] pry(#<XmlConv::View::Preformatted>)> @value
=> "[\",4100614181,15062016,,4124733,,,1,,130620161,\\n,4100614181,15062016,,4953990,,,1,,130620161,\\n,4100614181,15062016,,5549297,,,6,,130620161,\\n,4100614181,15062016,,4714009,,,1,,130620161,\\n,4100614181,15062016,,2965693,,,1,,130620161,\\n,4100614181,15062016,,2991118,,,2,,130620161,\\n,4100614181,15062016,,3938468,,,1,,130620161,\\n,4100614181,15062016,,4714179,,,1,,130620161,\\n,4100614181,15062016,,4497463,,,2,,130620161,\\n,4100614181,15062016,,2783905,,,3,,130620161,\\n,4100614181,15062016,,6240372,,,1,,130620161,\\n,4100614181,15062016,,5552508,,,1,,130620161,\\n\"]"

I am now sure that the problem stems from the fact that the HTTP post which created this transaction generated a wrong output string. How can I change that?

Adding a join("\n") at line 33 of lib/xmlconv/util/transaction.rb did not help.

Changed mail.rb in xmlconv to resemble even more the one in bbmb. Must add the smtp-entries in /var/www/, too. Now the HTTP-Post spec tests passes and the output looks okay.

Pushed the following commits

Some E-Mails arrived without subject. Must fix this. The came from the polling and should have a subject of "XmlConv2 - Polling-Error". Fixed this problem with commit Fixed sending mail

Now I receive the message with subject "XmlConv2 - Polling-Error". It contains

  EOFError end of file reached

I see that polling the pop server uses RMail. Polling failed because I had specied using POP+SSL instead of plain POP3 (port 110).

But xmlconv must send error messages via bbmb. But until now it has not direct dependency on bbmb. Sandoz.bbmb included bbmb and xmlconv, which share net/stmp and tmail. To make this work with the mail gem, we must configure the default delivery early (just after the bbmb gem analised the config).

Pushed commit Updated history & readme

But the XmlConv::CONFIG.mail_host is 'localhost' and on oddb-ci2 it does not accept smtp mails. But on fastpower sendmail is listening on port 25.

After emerging sendmail I get an error Errno::ECONNRESET: Connection reset by peer. Looks like my sendmail is not yet configured correctly. Reverted to use ssmtp.

Made sending e-mails work on oddb-ci2 by specifying Mail.defaults delivery_method => :sendmail. Now sending works.

Grepping for sendmail on fastpower in /var/log/messages confirmed by suspicion, that xmlconv is really using the local SMTP port for sending messages, as I find lines like

Jun 20 16:00:02 localhost sendmail[17551]: u5KE01jQ017551: from=zdavatz, size=1272, class=0, nrcpts=1, msgid=<>, relay=zdavatz@localhost
Jun 20 16:00:02 localhost sendmail[17551]: u5KE01jQ017551: to=root, ctladdr=zdavatz (1000/1005), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=31272, relay=[] [], dsn=2.0.0, stat=Sent (u5KE02Oe017558 Message accepted for delivery)

Now everything works fine locally.

Pushed commit Added possibility to send mails via sendmail

Pending problems are:

  • Rewrite Polling von POP3 to use mail gem.
view · edit · sidebar · attach · print · history
Page last modified on June 20, 2016, at 05:10 PM