kcackler (User)
Posts: 66
|
| Configuring Virtualmin to work with Postfix 2007/03/01 16:14 |
|
|
Hi everyone! I'm completely new to managing my own server (moved from shared to reseller to managed VPS to unmanaged dedicated) and I'm trying to configure virtualmin to work with postfix. I've got it working absolutely beautifully with everything else, but am stuck on postfix configuration.
When I create an email address in virtualmin, it adds the mail dir (For example, for kevin@thatscriptguy.com it adds the following directory: /home/thatscri/homes/kevin)
But when I attempt to send a mail to that address, postfix bounces it back. So obviously postfix is working - it just isn't configured correctly in regards to the usermap.
Tell me what you need to know to help me fix this Thanks! Kevin
|
|
|
|
The administrator has disabled public write access. |
kcackler (User)
Posts: 66
|
| Re: Configuring Virtualmin to work with Postfix 2007/03/01 16:30 |
|
|
Also - when I go to compose an email from within webmin, the reply-to address is kevin.thatscri@thatscriptguy.com
Obviously I want the created email address to be kevin@thatscriptguy.com (perhaps why postfix bounced it?)
Kevin
|
|
|
|
The administrator has disabled public write access. |
JohnFord (User)
Posts: 52
|
| Re: Configuring Virtualmin to work with Postfix 2007/03/01 17:39 |
|
|
This is a setting that can be changed.
Browse to: Virtualmin/System Settings/Module Config/Defaults for New Domains - if your using the standard theme the "Defaults for New Domains" will be an option in the drawdown selections box.
Find the setting named: Include domain name in usernames? - set this to "Only if there is a clash" - it's probably not set to "Always" or maybe you have a clash with some other username.
You might have made your administrator "kevin" instead of the default and so when you made one for you it was already present and so added the $PREFIX (first part of domain name) to the username.
Don't forget you can click for help on almost every setup option on the setup and template pages for helpful information about the setup option.
I hope that helps
|
|
|
|
The administrator has disabled public write access. |
JohnFord (User)
Posts: 52
|
| Re: Configuring Virtualmin to work with Postfix 2007/03/01 17:47 |
|
|
I should have read my post for typos.
I mean it probably is [list] now[/list] set to "Always".
Also there is a setting in the "Default Template" that addresses this issue but it does not come into effect unless this setting dictates.
---------------------------------
What I was saying about the adminstration email/user is because when you create a domain the adminstation user is created on the system and if you change it from the default - which is the $PREFIX of the domain name or the first part of the domain name. To someone, like "Kevin", then kevin is already a user and virtualmin will have to append (or change somehow) the username because you cannot have two of the same usernames.
|
|
|
|
The administrator has disabled public write access. |
kcackler (User)
Posts: 66
|
| Re: Configuring Virtualmin to work with Postfix 2007/03/01 18:10 |
|
|
OK, an update here:
Mail sent to kevin.thatscri@thatscriptguy.com gets delivered to /var/mail Mail sent to kevin@thatscriptguy.com gets bounced back as an unknown user...
|
|
|
|
The administrator has disabled public write access. |
kcackler (User)
Posts: 66
|
| Re: Configuring Virtualmin to work with Postfix 2007/03/01 18:16 |
|
|
AHA. That default setting was it.
Now for the next question: I'm moving several hundred accounts from a cpanel server (login user@domain) to this server. the user@domain user format allows each domain to have any email address. Is there any way to set this up on webmin/virtualmin/postfix? IE kevin@thatscriptguy.com AND kevin@thecacklers.com can co-exist? Kevin
|
|
|
|
The administrator has disabled public write access. |
JohnFord (User)
Posts: 52
|
| Re: Configuring Virtualmin to work with Postfix 2007/03/01 18:37 |
|
|
the next setting below the "always" one addresses this issue. be sure to mouse over the name of setting and you can click it for help on each setting.
|
|
|
|
The administrator has disabled public write access. |
kcackler (User)
Posts: 66
|
| Re: Configuring Virtualmin to work with Postfix 2007/03/01 18:49 |
|
|
Hmm...none of my setting titles are clickable....Is there an alternate theme that offers help for all of the settings?
The setting under the always one is
Domain name style in username and the choices are Full domain name Username or first part of domain First part of domain
None of those seem like they'd offer the ability to have user@domain (I'm sure I'm wrong though) :)
|
|
|
|
The administrator has disabled public write access. |
JohnFord (User)
Posts: 52
|
| Re: Configuring Virtualmin to work with Postfix 2007/03/01 19:27 |
|
|
I just made one myself. You caught me when I was trying to figure this out too.
I'm still trying to figure it out. I believe you'll want the FULL NAME option and set it back to "Always".
Then browse to the "System Settings/Server Templates/Default Settings - (If the Default Settings template is the one affecting your domains that you are trying to setup).
Then go to the "Mail for domain" page and set the option in "Format for usernames that include domain" to "username@domain".
Then you'll get what you want. The problem that just happened to me is that two user with same UID were created. I don't know why or how it happened or if it works. I have two browser windows open on separate machines and don't know if I clicked to quit to see changes or if deleting the same user over and over until I get it right causes issues.
I think that maybe it has something to do with my operating system (Fedora 6) and a user name with the @ symbol. I will keep playing with it.
I need the same username under separate domains too. You can also have alias once you get them set up correctly. That is my plan after I'm finished creating them.
Here's what the help windows say for the option we've been discussing.
under default templates/email for domain: Format for usernames that include domain ------------------------------------------------------------ When a username has the domain name appended, this option selects the format. Not all options are available on all OS platforms, as some characters are not allowed in usernames. Whether the domain name is the full username, i.e. "virtualmin.com", or just the first part, i.e. "virtualmin", is dictated by the next option.
------------------------------------------------------------
under module config/default for new domains: Include domain name in usernames?
-------------------------------------------------------------------------------- This option selects how usernames will be generated. By default, Virtualmin will use the base username requested, but if it clashes with an existing username it will append the domainname in the manner specified in the next option. If consistency is preferable, set this to "Always", and all usernames within sub-servers will have the domain name appended.
--------------------------------------------------------------------------------
Domain name style in usernames
-------------------------------------------------------------------------------- This option determines whether the domain name used in usernames that contain the domain will be the full domain name, i.e. "virtualmin.com", just the first part, i.e. "virtualmin", or the user/group name for the domain. By default, the group name is used for new top-level servers, and the first part of the domain is used for sub-servers. In some environments, it may be easier for users to understand a username like "joeuser@virtualmin.com" for their POP/IMAP or FTP login name than "joeuser.virtualmin". ---------------------------------------
I am using the "Virtualmin Framed Theme" which provides help links under the titles of each option.
|
|
|
|
The administrator has disabled public write access. |
kcackler (User)
Posts: 66
|
| Re: Configuring Virtualmin to work with Postfix 2007/03/01 19:27 |
|
|
OK, I found the online docs and read up in chapter 6, but my changes still aren't taking affect.
I've got the following set in the module config:
Include domain names in usernames: Always Domain name style in username: Full domain
But when I create a new email user (kevin@thatscriptguy.com) the username is still created as kevin.thatscri
I don't see any other settings in the module config that control how usernames are created, so I'm really puzzled here...
Kevin
|
|
|
|
The administrator has disabled public write access. |
|