Griffon 1.2 - mail plugin does not look at mailhost param - griffon

I installed Griffon 1.2 and the mail plugin.
griffon install-plugin mail
I created a test:
sendMail(mailhost: '192.168.0.19',
to: 'me#home.com',
from: 'me#home.com',
subject: 'Test Mail',
text:'''
Hello
World''')
But it does not use the mailhost param. It tries to use localhost:
javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25
I verified the SMTP server via telnet commands and that works.

Line 70 from https://github.com/griffon/griffon-mail-plugin/blob/master/src/main/griffon/plugins/mail/MailSender.groovy shows that mailhost is taken into account, at least when it comes to setting properties.
However this sounds more of a bug report than an actual question. If so I'd recommend you to post the issue to the Griffon user list. If it's found to be a bug then a report should be made to http://jira.codehaus.org/browse/griffon

Related

Connect to SMTP relay in Azure VM with O365 Account fails

How can I use from a VM (linux) where a Java application is running a SMTP Server/relay?
For connecting to SMTP I want to use an O365 account, so configuration looks like:
host: smtp.office365.com
port: 587
TLS: true
uid: UID-O365
pwd: PWD-O365
As response I get:
An error has occurred with sending the test email:
MailException: com.sun.mail.smtp.SMTPSendFailedException:
501 5.1.7 Invalid address [AM4P190MB0211.EURP190.PROD.OUTLOOK.COM]
;
nested exception is:
com.sun.mail.smtp.SMTPSenderFailedException: 501 5.1.7 Invalid address
[AM4P190MB0211.EURP190.PROD.OUTLOOK.COM]
remark: The application that wants to connect runs on java, what is probably unimportant
The server is telling you that the address "AM4P190MB0211.EURP190.PROD.OUTLOOK.COM" that you're using in your message as a sender or recipient address is not a valid email address. It at least needs a "#" in there somewhere. You can get more detail in the JavaMail debug output.
The solution is simple: sender email address (what was not listed above) and UID must be the same

Atlassian-connect: Error on 'installed' event

I'm trying to run example Jira add-on.
I have created credentials.json file and have run npm i and node app.js.
But I have problems with installed event. Here is nodejs log:
Watching atlassian-connect.json for changes
Add-on server running at http://MacBook-Air.local:3000
Initialized sqlite3 storage adapter
Local tunnel established at https://a277dbdf.ngrok.io/
Check http://127.0.0.1:4040 for tunnel status
Registering add-on...
GET /atlassian-connect.json 200 13.677 ms - 784
Saved tenant details for 608ff294-74b9-3edf-8124-7efae2c16397 to database
{ key: 'my-add-on',
clientKey: '608ff294-74b9-3edf-8124-7efae2c16397',
publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCtKxrEBipTMXhRHlv9zcSLR2Y9h5YQgNQ5vpJ40tF9RmuIzByjkKTurCLHFwMAWU6aLQM+H+Z8wAlpL9AVlN5NKrEP8+a3mGFUOj/5nSJ7ZWHjgju0sqUruyEkKLvKuhWkKkd9NqBxogN0hxv7ue5msP5ezwei/nTJXmnmA5qOAQIDAQAB',
sharedSecret: 'LfT9elHM7iHkto5pHr+MnpH0SR1ypunIDoCyt6ugVJ1Q4hWHurG8k5DjVzLcvT2C98DDbiJiA89VNB0e3DiUvQ',
serverVersion: '100075',
pluginsVersion: '1.3.407',
baseUrl: 'https://gleb-olololololo-22.atlassian.net',
productType: 'jira',
description: 'Atlassian JIRA at https://gleb-olololololo-22.atlassian.net ',
eventType: 'installed' }
POST /installed?user_key=admin 204 51.021 ms - -
Failed to register with host https://gleb-olololololo-22%40yopmail.com:gleb-olololololo-22#gleb-olololololo-22.atlassian.net (200)
The add-on host did not respond when we tried to contact it at "https://a277dbdf.ngrok.io/installed" during installation (the attempt timed out). Please try again later or contact the add-on vendor.
{"type":"INSTALL","pingAfter":300,"status":{"done":true,"statusCode":200,"contentType":"application/vnd.atl.plugins.task.install.err+json","errorMessage":"The add-on host did not respond when we tried to contact it at \"https://a277dbdf.ngrok.io/installed\" during installation (the attempt timed out). Please try again later or contact the add-on vendor.","source":"https://a277dbdf.ngrok.io/atlassian-connect.json","name":"https://a277dbdf.ngrok.io/atlassian-connect.json"},"links":{"self":"/rest/plugins/1.0/pending/80928cb9-f64e-42d0-9a7e-a1fe8ba81055","alternate":"/rest/plugins/1.0/tasks/80928cb9-f64e-42d0-9a7e-a1fe8ba81055"},"timestamp":1513692335651,"userKey":"admin","id":"80928cb9-f64e-42d0-9a7e-a1fe8ba81055"}
Add-on not registered; no compatible hosts detected
I have reviewed tons of information in Google, but didn't found an answer.
More details, that can helps you to answer.
It happens suddenly. It worked OK, but about 1 week ago I start to get this error and cannot fix it. So I didn't change anything, just run add-on again, as I did it every day.
If I try to upload add-on manually I got error in terminal
GET / 302 17.224 ms - 0
GET /atlassian-connect.json 200 2.503 ms - 783
Found existing settings for client 608ff294-74b9-3edf-8124-7efae2c16397. Authenticating reinstall request
Authentication verification error: 401 Could not find authentication data on request
POST /installed?user_key=admin 401 22.636 ms - 45
The most possible reason (that I've found in google) is that I have wrong server time. But the time on my local machine is correct (at least for my timezone).
Anyone has any thoughts about this problem?
Thanks!
I kept randomly having this happen to me. It would be working, then run npm start and I would get the error. Since I'm not using a database right now, I simply removed all references to the juggling-sqlite database. This was in package.json, package-lock.json, config.json, and I just removed store.db. That got it working for me. Pretty frustrating that this happens, not sure a better way around it.

How is another IP sending email through my qMail?

My first question on here...
I have a VPS which I have a few small websites on and also run my email services, every now and then I see messages in my mail queue that I did not send.
Firstly my setup:
Ubuntu 12.04
Latest Plesk Panel
qMail SMTP Server
Courier-imap
Using the Plesk panel I have set up qmail to not act as an open relay, and must use SMTP authentication to send to remote accounts, also short mailbox names are not allowed only the full account names.
Today I received bounced messages, upon checking my mail queue I have found again emails in there with multiple recipients that I have not sent.
These are not being sent by a script on my server as I would see different header information with uid 33 being specified, instead I see invoked from network in the mail header, an example below...
Received: (qmail 17710 invoked from network); 2 Feb 2016 11:34:10 +0000
Received: from unknown (HELO mx1.variationdesign.co.uk) (182.190.250.238)
by lvps212-67-205-193.vps.webfusion.co.uk with ESMTPA;
2 Feb 2016 11:34:09 +0000
From: Merel de Bruin - Van de Beek <seth#variationdesign.co.uk>
Content-Type: multipart/alternative;
boundary=Apple-Mail-29D34A60-FB4E-38B5-1BBF-7DDE23285FD2
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)
Subject: Re(4): Surprise
Message-Id: <91925fdeae7d$78ac5f73$dfad0a17$#variationdesign.co.uk>
Date: Mon, 2 Feb 2016 12:33:59 +0000
To: "sanderdejong" <sanderdejong#hotmail.com>,
"Sanne van Roon" <sannevanroon#hotmail.com>,
"Sarah Dormaar" <sarahdormaar#hotmail.com>,
"Sarah Tempelaar" <bordeaux84#hotmail.com>, "saskia middel" <s.middel#jvo.nl>,
"Saskia Roovers" <matrixspijkertje#hotmail.com>,
"sinta sinta ss" <sinta_sinta_ss#hotmail.com>,
"Sinta de Wildt" <sinta_de_wildt#hotmail.com>,
"skizonespijkertje" <skizonespijkertje#hotmail.com>,
"spijkertje matrix" <spijkertje_matrix#hotmail.com>,
"sroovers007" <sroovers007#hotmail.com>, "sroovers75" <sroovers75#hotmail.com>,
"stali n" <stali_n#hotmail.com>, "stingarts" <stingarts#hotmail.com>,
"suus rem" <suus_rem#post.com>, "svdbersselaar" <svdbersselaar#hotmail.com>,
"teresa villalobos" <teresavs#hotmail.com>, "teresavs" <teresavs#home.nl>,
"Thomas Bollen" <T.P.F.Bollen#students.uu.nl>
X-Mailer: iPad Mail (13A452)
X-PPP-Message-ID: <20160202113410.17689.25881#lvps212-67-205-193.vps.webfusion.co.uk>
X-PPP-Vhost: variationdesign.co.uk
The IP: 182.190.250.238 is nothing to do with me, I also never use mx1.variationdesign.co.uk.
Every time I want to send an email, I have to send my username and password to be able to send through this server.
My question is, how on earth is this person/people able to physically send emails through my VPS without authenticating?
I see in the logs around the same time "smtp_auth' for username seth#variationdesign.co.uk, which is odd because that is actually just an alias and not an email account, the account itself uses my full name and a couple of numbers at the end, I did this to try and stop spammers from guessing the correct username.
My server is definitely sending these emails out and I can't figure out how they are doing it, what ma I missing here?
I appreciate any help you can give me on this matter.
Kind regards
Seth
qMail SMTP Server comes with a default configuration to be a open relay, make sure you disable that and only authenticaed users can send emails. And stop your server before you get into a blacklist for spam.
https://qmail.jms1.net/relay.shtml

web2py: sending email: lost connection after EHLO from localhost

I'm trying to send email in web2py using the postfix server on Centos. I can send it successfully using the gmail SMTP server, but when I change the settings to:
mail.settings.server='127.0.0.1:25'
mail.settings.login = 'user:pass'
no email gets delivered. I checked the logs and I see this:
postfix/smtpd[31521]: connect from localhost[127.0.0.1]
postfix/smtpd[31521]: lost connection after EHLO from localhost[127.0.0.1]
postfix/smtpd[31521]: disconnect from localhost[127.0.0.1]
I am able to send email successfully using the local mail command. I am new to linux, so please bear with me.
depending on your version of web2py try setting
mail.settings.tls = False

Mule ESB: Retrieving email messages from Gmail using IMAP connector

I am new to Mule and im trying to create a Mule configuration that pulls sent emails from a GMail account via imap and pushes them to a php script that processes and stores them in a custom CRM that i've built.
For starters, i'm just trying to get the inbox emails dumped into a text files and i plan to work from there.
As new messages are received by the mailbox, Mule should pick up the new messages and process them automatically.
The Mule config looks like this so far:
<imaps:connector name="IMAP" mailboxFolder="INBOX" validateConnections="false" doc:name="IMAP" />
<flow name="flows1Flow1" doc:name="flows1Flow1">
<imaps:inbound-endpoint host="imap.gmail.com" port="993" user="[[username]]%40gmail.com" password="[[password]]" connector-ref="IMAP" doc:name="IMAP"/>
<file:outbound-endpoint path="D:\mailflow" outputPattern="msg_#[function:date].txt" doc:name="File"/>
</flow>
The program runs and gets to this point:
INFO 2012-01-12 13:51:06,606 [main] org.mule.DefaultMuleContext:
**********************************************************************
* Application: mailflow *
* OS encoding: Cp1252, Mule encoding: UTF-8 *
* *
* Agents Running: *
* JMX Agent *
**********************************************************************
INFO 2012-01-12 13:51:06,606 [main] org.mule.module.launcher.DeploymentService:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Started app 'mailflow' +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
And then just sits there indefinitely, doing nothing?!
There is documentation suggesting that because i'm using IMAPS i need to add a TLS client and TLS key store to the imaps connector. I'm not sure what these are or how to use them though and the documentation is highly specialized and hard to understand.
I'm also not sure that that's what the problem is in the first place as the app doesn't crash at any point.
Has anyone had success creating an imap flow with GMail?
Please Help?!
Just create the connector like this:
<imaps:connector name="IMAP">
<imaps:tls-client/>
<imaps:tls-trust-store/>
</imaps:connector>
And that should do the trick.
Also, I'd remove the "#gmail" from the user's definition, since it's not necessary.
Bye!
German
just put in a * and you wont see the error and will still work fine.
<imaps:tls-client path="*" storePassword="*"/>
<imaps:tls-trust-store path="*" storePassword="*"/>
You have to change imap:connector and imap:inbound-endpoint to imaps:connector and imaps:inbound-endpoint.
It is working fine for me. I have the same issued and now it is fixed with this little change.
Only non-deleted and unread messages are dispatched as messages (RetrieveMessageReceiver.java:148 and 149)
if (!messages[i].getFlags().contains(Flags.Flag.DELETED)
&& !messages[i].getFlags().contains(Flags.Flag.SEEN))
If the folder is big, it will take some time (potentially even hours) to get to the point to process unread messages.
Settings for the IMAP
Use the app password
https://security.google.com/settings/security/apppasswords
and finally use the correct path for the mail to be saved.

Resources