Mail configuration needs split into separate servers - SMTP

Posted by Rollbase User on 19-Jun-2012 07:42

Our mail service is split into a cluster of SMTP servers for sending mail, and a completely separate cluster for inbound mailboxes. The shared.properties mail configuration parameters for Rollbase appear to assume both inbound and outbound are the same host. Is it possible to configure separate hosts for outbound and inbound email?

All Replies

Posted by Admin on 19-Jun-2012 08:11

The Rollbase in Action doc says IMAP is req'd to be enabled on GMAIL, so I assumed there was an inbound option, but after some more searches, I did not find a mention of inbound email as a feature.



I had problems just configuring the MailHost to our "outbound" SMTP server, I think because RB is trying to login but the host does not accept authentication as it only allows relay from internal hosts.

Posted by Admin on 19-Jun-2012 10:15

Correct, we only support inbound for GMAIL accounts. There is a plan to extend this support to other types of incoming email accounts.

Posted by Admin on 20-Jun-2012 13:35

I'm not concerned about the inbound as much as the outbound. The problem I have when I tried setting Rollbase Mail Sender shared.properties without a userid/password, it does not seem to work. No email, nothing in the logs.



Should it work and if so, what should I do to troubleshoot?

Posted by Admin on 20-Jun-2012 15:24

Mail password is optional if you're behind firewall and mail server has default session. User name has to be provided, I think.

Posted by Admin on 20-Jun-2012 20:43

I just tested - and then tried to send an email to myself. It did not work, but no errors in the tomcat logs either.

Posted by Admin on 20-Jun-2012 21:52

Please check Activity records for your Object Record. Also Rollbase log files are stored per customer. You can view these files from Customer View page.

Posted by Admin on 21-Jun-2012 10:11

Tim,



if you cannot send emails through GMAIL that most likely mean that firewall silently discards your messages.



Please try the following example or any other JavaMail example to check your settings. Perhaps we should provide some UI for similar testing.





String mailHost =

int mailPort = 25;

boolean useSSL = false;



String mailUser =

String password =



Properties props = new Properties();

props.put("mail.smtp.user", mailUser);

props.put("mail.smtp.host", mailHost);

props.put("mail.smtp.port", Integer.toString(mailPort));

props.put("mail.transport.protocol", "smtp");

props.put("mail.smtp.auth", "true");



Authenticator auth = (password == null ? null : new PasswordHolder(mailUser, password));



Session session = Session.getInstance(props, auth);



MimeMessage msg = new MimeMessage(session);

msg.setSentDate(DateUtil.today());

msg.setFrom(new InternetAddress(addrTo));

msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(addrTo, false));

msg.setSu

Posted by Admin on 21-Jun-2012 18:46

Gmail works fine. The configuration I am referring to is pointing to our internal servers which have a separate clusters for SMTP from IMAP/POP. I setup hMailServer on a Windows box with two accounts and anonymous relay to our primary SMTP relay server. I will next try to connect Rollbase to that server.



A "send test email" feature would be useful in the UI, but given the initial setup requires a working email config to get the admin password, it may be a bit chicken and egg. I'd prefer an initial setup wizard to set (and potentially change later) those email properties from the web.



In other products, when first firing up the system, if certain basic properties (ex. DB conn, email host, super-admin account/password) are not set, then the wizard is invoked for initial setup. On future startups, the properties are available so the wizard is skipped.



I'll fill in the rest of the Java class and give it a try to see if I can get a session.

Posted by Admin on 21-Jun-2012 18:50

Ah, cool. Good to learn about that!



As suspected here is the stack track... this came after creation of a new user account:



[2012-06-20 11:17:33,791] ===> Error in thread MailQueue at 06/20/2012 11:17 AM

[2012-06-20 11:17:33,791] javax.mail.AuthenticationFailedException

at javax.mail.Service.connect(Service.java:264)

at javax.mail.Service.connect(Service.java:134)

at javax.mail.Service.connect(Service.java:86)

at com.sun.mail.smtp.SMTPTransport.connect(SMTPTransport.java:144)

at javax.mail.Transport.send0(Transport.java:150)

at javax.mail.Transport.send(Transport.java:80)

at p10.a197.doJob(a197.java:82)

at com.rb.util.system.a452.run(a452.java:143)

Posted by Admin on 21-Jun-2012 18:58

First admin's password is always "welcome". So first admin at least has a chance to login.

I'll try to add UI to the next release which is due on Saturday.

Posted by Admin on 21-Jun-2012 18:59

Well, it looks like there is authentication error. Are you using anonymous session (without password)?

Posted by Admin on 21-Jun-2012 19:33

Correct. That was a test without a password.

Posted by Admin on 21-Jun-2012 22:42

I suggest you try again after update on Saturday.

Posted by Admin on 22-Jun-2012 23:20

FYI - I found a good workaround for Windows workstation developer setup. I setup hMailServer with a local rollbase account, and anonymous SMTP forwarding to our internal only SMTP relay. Works a treat.



We have the Rollbase running inside XAMPP in about a ten easy steps, and just now figured out how to get Mercury Mail (bundled with XAMPP) to do SMTP relay properly, which could make developer setup even more self-contained.

Posted by Admin on 22-Jun-2012 23:21

Thanks. I look forward to the update.

Posted by Admin on 26-Jun-2012 23:02

I just now made the time to install 3.6.8 from scratch (well, I think it's 3.6.8, I just downloaded from the download link, not sure how to tell version number.)



Short summary - the new mail configuration screen works!



I was able to point it to my relay server with just a username and send a test email with success!



Thanks for the update, Pavel!

Posted by Admin on 26-Jun-2012 23:17

Glad it works for you. Let me know if we can help further.

Posted by Admin on 29-Jun-2012 13:10

marking as addressed

This thread is closed