Submitted by SteveAcup on Tue, 02/05/2013 - 07:11
I was playing with new toys in most recent virtualmin. tried this url:
http://mail.lucketts.net/cgi-bin/autoconfig.cgi?emailaddress=steve@lucke...
got this response:
lucketts.netLucketts.net EmailLucketts.netmail.lucketts.net993SSLpassword-cleartextsteve.lucketts.netmail.lucketts.net25plainpassword-cleartextsteve.lucketts.net
correct user name for this account on this server is "steve". This server was set up long ago when we only had one domain on it so we could use the "name" format instead of "name@domain.ext" format. We plan on migrating to "name@doman.ext" soon so bug doesn't really impact us, but I figured you would like to know it fails on the "name" formats on a FreeBSD server.
Steve
Status:
Active
Comments
Submitted by JamieCameron on Tue, 02/05/2013 - 09:40 Comment #1
If you create a new user (say called
bob
) for this domain, would his username bebob.lucketts
or justbob
?I'm not sure if this failure is due to a change in the name format policy previously, or a mis-interpretation of the current name format by Virtualmin.
Submitted by fuscata on Fri, 03/08/2013 - 14:42 Comment #2
I am having the same problem (I think).
/cgi-bin/autoconfig.cgi?emailaddress=bob@example.com
gives me:
example.com
Example Email
Example
mail.example.com
993
SSL
password-cleartext
bob.example
mail.example.com
25
plain
password-cleartext
bob.example
The username is listed as bob.example but the actual username should be just bob.
Also the socketType for the SMTP server is set to plain rather than STARTTLS, and port 25 rather than port 587. (All options are supported by the server, but I'd prefer to default to STARTTLS/587).
Submitted by danblack on Thu, 07/30/2015 - 20:05 Comment #3
sounds like it.
a way I could see it working at least with postfix (with some very careful command injection prevention) is:
$lookup=`/usr/sbin/postmap -q '${email}' /etc/postfix/virtual`
if $lookup is a unix id return $lookup
if $lookup is an email $lookup =`/usr/sbin/postmap -q '${lookup}' /etc/postfix/virtual`
if $lookup is a unix id return $lookup
# assume its an alias
$lookup = `/usr/sbin/postalias -q $lookup /etc/aliases`
if $lookup is a unix id return $lookup
base it on the $STYLE and hope for the best
Should at least cover some base cases.