Roundcube SMTP Failure to Sendmail - Outbound Mail Problems

SYSTEM INFORMATION
OS type and version DEBIAN12
Webmin version LATEST
Virtualmin version LATEST
Related packages ROUNDCUBE, SENDMAIL, SMTP2GO

Ok I have used virtualmin to create a domain with DoveCot and Inbound mail works great. Furthermore, I have used Virtualmin to install Roundcube, and I have that working… Any email to my domain inbound works fine.

But Roundcube keeps getting an Authentication failure on Ports 25:587:2525 all of which are open, and listening (netstat -ntl | grep port)… I also cant get Roundcube to communicate to a third party smarthost like mail.smtp2go.com.

Virtualmin creates two roundcube config files… one is called default.conf and the other is mail.config which one is used?

And BTW I can use the Console Mail Utilites to send internal mail no problem from localhost to localhost, so the MTA is operational local. External SMTP either to local sendmail, or a remote host is failing from roundcube…

I do have Thunderbird, and Bluemail working to a third party mailer, so I know the correct strings, ports, and passwords…but I cant get Roundcube to talk the right language. I need some working examples for outbound mail for a localhost smtp configuration.

smtp host ‘localhost:587’
smtp login ‘none(open relay)’.

for now I want to turn off local authentication…

The other thing I would like to do is have Sendmail receive all the mail locally, but after queueing the mail, to use a remote host to deliver the mail to the Internet.

Virtualmin uses Postfix for the MTA not Sendmail. Dovecot is used to for IMAP and POP3 connection to client. Dovecot don’t handle the inbound mail Postfix does.
Using sendmail will break the default virtualmin setup I would think.

I think Roundcube would send via Postfix and you configure postfix to handle the connection to smtp2go

calport may help you

Thanks @stefan1959. I would be happy to help, @sfriday02.

Ok so here’s my deal… my email architecture is fairly sophisticated. My goal is to support:

  1. Alpine clients to sendmail on terminal this works… and mail goes to queue. Local mail delivered as expected.
  2. Thunderbird & BlueMail clients on Linux & Mobile and this works to a local SMTPS port on 589 which at the present I am not restricting access…and mail goes to queue. Local mail delivered as expected.
  3. And I have TLS configured on Sendmail at port 465 which is appropriately configured with letsencrypt PEM files in a format I have used before.

Webmail using Roundcube does in fact work inbound, but SMTP outbound when I do as Roundcube Engineering told me to do… and leave my password and username’s blank…and point at 589… it doesnt work… I get a 535 error.

By Default Sendmail SMTP on port 25 or 587 does a PAM authentication, so if you user Virtualmin it wont work out of the box. So I guess what I need to do is get sendmail authenticating to the Roundcube DBMS instance… if you could help me with that I think I have everything else working.

Using a Smarthost, at SMTP2GO.COM I am not working yet…even though it works if I communicate directly to it. SMTP2GO has instructions on how to configure SMTP without authentication which requires validating an IP address… and as I say this platform works, DKIM is configured and SPF validated.

Without the smarthost, I am timing to to all external domains… while my host is on Google cloud. Google has just starting blocking outbound 25…but I am using 587 I think?

Everyone in the world has servers using outbound 25. If you are alone using 587, can you see the problem?

I would recommend that you get Virtualmin to work first, and then iteratively customise it to your requirements. This will help break down your sophisticated architecture into smaller and more manageable parts.

Thanks well. I have virtual min working. I can create any number of domains, and I can use Virtualmin scripts to install squirrel mail, and roundcube which I have done. Virtualmin does have an option to work with Sendmail, and I have spoken to Jamey about this on email, and we have had this working for sometime. Sendmail provides a few more console options then postfix, and its where we are heading…even if the world is not.

Example: create a domain Acme.com, and create a mail user sfriday@acme.com this works fine, and I can get roundcube to login, and receive mail. But Roundcube outbound asks for an SMTP host. By Default it uses %u(current user logged in) and %p (Current password of the user), but when you communicate this to sendmail on port 25 or 587, sendmail thinks you are trying to validate to PAM which is the local Unix/Linux host.

So I am pretty sure, Virtualmin & Roundcube is doing the right thing, its just my Sendmail configuration needs to be configured to support the same MYSQL database roundcube is using. So if you can help me with that I think this is already done.

I was having problems with this piece, and I found the Roundcube Engineers on Github, and they said if you set your SMTP port up with no authentication, and leave user and password blank, then Roundcube should simply inject the current outbound mail into the system, but that didnt work.

So I think when sendmail is already installed the Virtualmin installer with Roundcube is broken, and the Squirrelmail install does to this secondary source screen and doesnt work at all. But first things first, I need to try to get Roundcube finished.

Alpine, Bluemail, and Thundebird clients already work, as does MACOS mailer with a SMARTHOST.

And that means the Virtualmin installer with Dovecot is working as expected. Dovecot is not involved in the SMTP outbound process, but I understand there may be ways to do that.

Sorry just a note… Virtualmin does use Postfix as a default, but Webmin is also a supported configuration as per Jamey. The installer script for Roundcube is not modifying sendmail to work appropriately.

Ok I solved this problem… but only in part… it now works but in limited form:
BASELINE I am using Virtualmin to create users for mail.
A) I used Webmin to modify the Sendmail configuration for a Unique Port with no authentication 5XX.
B) I set roundcube up to have username " " instead of the default “%u” as Roundcube Enginering said.
C) I set roundcube up to have password " " instead of the default “%p” as Roundcube Engineering said.
D) I set the roundcube [smtp_port] to [5XX]
E) I set the roundcube [smtp_auth_type] to “NONE”;
NOTES
a)BTW the 5XX port is only available on localhost and is not accessible on the Public Internet so its fairly secure anyway. Its not a public relay.
b) the Roundcube config file for virtualmin script customers by default is in public_html/roundcube/config/config.inc.php
I got an email from a senior sendmail engineer and he told me I had to configure SASL with sendmail to authenticate to PAM(Default) or mysql…I am in process of doing this… but I have a workaround now…

Lastly someone send me a note on why I wanted Sendmail vs Postfix… the issue is that Sendmail uses a Mailbox format for delivering mail, and Postfix uses MailDir…

Alpine Mailer developed for Hosts by the University of Washington uses mailbox format, and it works in about 10 seconds with a working DNS…

The Alpine configuration for MailDir takes a patch and its about 2 hours of configuration with an engineer on the phone… so I dont recommend it although I have gotten it and Mutt to work.

Anyway all Unix Brands use Alpine, and Mutt and will work off the shelf with no configs at all.

SO IN SUMMARY MY FINAL HOST CONFIG IS GOING TO BE:

SENDMAIL->DOVECOT(POP/IMAP)–>ROUNDCUBE–>VIRTUALMIN INSTALL FOR INBOUND
SENDMAIL-SASL2->ROUNDCUBE–>VIRTUALMIN INSTALL FOR SMTP OUTBOUND

But I am working on Roundcube smarthost configuration that still includes a copy of the send mail in Dovecot Folders… as thats how Thunderbird works on Unix.

So thanks all for your help… folks, and I have made it this far… now on to Squirrel Mail :slight_smile:

OK working config files for roundmail… using Virtualmin install scripts the default location is
/virtualmindirector/config/config.inc.php

HERES WHAT YOU NEED FOR:
a) Unauthenticated SMTP Mailer:
b) SMTP2GO SMARTHOST (A Great Service)

MY ISSUES WERE THAT I HAD TWO ROUNDCUBE CONFIG FILES… ONE INSTALLED WITH VIRTUALMIN, AND ONE IN /ETC/ROUNDCUBE AS I HAD INSTALLED THE SERVICE BEFORE VIRTUALMIN…

We have one last config to work out and thats SASL authentication to local SMTP Mailer…BTW and for the record… Google Cloud is now restricting port 25 outbound for some cloud customers…they do not restrict 25 inbound…I have been a customer for 10 years… and this is the first time they have done anything like this…they have installed very complex outbound firewall configs for various reasons by default, and I dont know if I can disable them quite yet. They do things like prevent Chinese, and Russian access to Google resources…

not to get too off topic — I thought Postfix would work with either Mailbox or MailDir format? Or should I say – the Virtualmin panel lets you choose which one you want for Postfix.

well thats entirely possible. I just use Sendmail as it works on every version of Unix, Linux, and MACOS… and thats what I have more experience with. Perhaps I will try it another day… or on another server for fun… but Im in semiprod now…thanks for the feedback.

I do know this however that SASL2 supports SMTP authentication to either Sendmail or Postifx, and can be extended to Apache as well with a mod.

I am working now. So my issue can be closed unless someone wants to enlighten me on how to run SASL on 587, and dump to the queue.

You might be better to just use Webmin without virtualmin then you can load what you like.

Ok, just went through forum, you can set Virtualmin to sendmail

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.