Menu

#4446 email autoconfiguration issues

All
closed-fixed
None
5
2014-07-06
2014-07-05
Steven Page
No

How does Webmin/Virtualmin populate the variables for the auto-mail configuration?

I wasn't sure if it was just me, or my configuration, but this issue has now been verified against another user on the forums (so I thought I would post it here).

Basically, auto-mail configuration does not correctly populate variables for SMTP.

I have configured Sendmail to used SSL/TLS, and STARTTLS, but it does not populate the XML with either of these values. it remains stuck to port 25. $SMTP_TYPE remains: plain, and $SMTP_ENC stays as password-cleartext.

In my opinion, it does not matter whether it defaults to STARTTLS or SSL/TLS, but it should be able to detect and use atleast one of these encryption methods.

Moreover, how does it decide on the $IMAP_HOST/$SMTP_HOST? by MX Record?

This is as a reslult of my setup, but the issue is that I am using an overloaded DNS A record for my MX and SMTP (for loadbalancing and failover). and until I setup a POP3/IMAP proxy... I am stuck using a seperate address for IMAP. which means the hostname is not configured correctly (using auto-config) either.

I can manipulate the template under Server Templates, but this might, or has already tripped up some people.

Any insight into this?

Thanks!

Discussion

  • Jamie Cameron

    Jamie Cameron - 2014-07-05

    The automatic detection here may not be working completely for Sendmail, as Virtualmin is primarily designed for use with Postfix.

    What does the DaemonPortOptions line contain in your Sendmail config file? That is what Virtualmin uses to get the SMTP port.

     
  • Steven Page

    Steven Page - 2014-07-06

    after adding SSL Support, it adds a second line to the configuration:

    DAEMON_OPTIONS(`Name=SSLMTA,Address=0.0.0.0,Family=inet,Port=465,Modifiers=bcfhEs')

    Note the trailing "s" under Modifiers. this is what enables SSL. I have also noticed that if you change the options, it sometimes removes the S, and it needs to be added again.

    so the two lines together, look like this:

    DAEMON_OPTIONS(Name=MTA,Address=0.0.0.0,Family=inet,Port=25,Modifiers=bcfhE') DAEMON_OPTIONS(Name=SSLMTA,Address=0.0.0.0,Family=inet,Port=465,Modifiers=bcfhEs')

     

    Last edit: Steven Page 2014-07-06
  • Steven Page

    Steven Page - 2014-07-06

    as for StartTLS Support (i think SSL/TLS uses this file too), you could grep for this line:

    include(`/etc/mail/tls/starttls.m4')dnl

    well, atleast on my system (debian/ubuntu), this is the included configuration file used to enable secure sockets.

    or maybe just search the config for "starttls" or something. since it might not look exactly like that, or be in that plan (on other systems).

    thanks Jamie

     

    Last edit: Steven Page 2014-07-06
  • Steven Page

    Steven Page - 2014-07-06

    sorry, that is my m4 file. here is from the Configuration file:

    SMTP daemon options

    O DaemonPortOptions=Name=MTA,Address=0.0.0.0,Family=inet,Port=25,Modifiers=bcfhE
    O DaemonPortOptions=Name=SSLMTA,Address=0.0.0.0,Family=inet,Port=465,Modifiers=bcfhEs

    and starttls.m4 can be found using a search in the configuration file, when including the starttls.m4 configuration file as stated above. not sure if this can be used to help determine SSL support, or not, but figured I would add this, as it might be useful to know.

    if i recall correctly, you must include the m4 configuration file to get SSL support. if included, starttls is supported on port 25. however, to get SSL/TLS support, you but define a secondary DaemonPortOptions line, with the "s" modifier

    again, thank Jamie

     

    Last edit: Steven Page 2014-07-06
  • Jamie Cameron

    Jamie Cameron - 2014-07-06
    • status: open --> closed-fixed
     
  • Jamie Cameron

    Jamie Cameron - 2014-07-06

    Thanks - this will be supported in the next Virtualmin release.

     

Log in to post a comment.