Postfix and main.cf

5 posts / 0 new
Last post
#1 Sat, 09/05/2009 - 15:35
kenlyle

Postfix and main.cf

I have just started up Postfix on my VPS, and it seems that every time I add a new Virtual Server, I have to manually edit the main.cf to add the domain name to the ever lengthening virtual_alias_domains line?

Is this the correct/designed behavior of Virtualmin?

If so, it seems an oversight inconsistent with how Vmin generally takes care of things for us noob/non- sysadmins.

It seems to be not just me...Google lists 465 pages on virtualmin.com with "main.cf"

Can someone please show me how to automate this process, or to bribe Jamie to fix it?

Thanks, Ken

Sat, 09/05/2009 - 20:36
andreychek

Hi Ken,

Nope, there should be no need to manually add anything to the Postfix configs.

Whenever you setup an email address for a new Virtual Server, it sets everything up for you inside the /etc/postfix/virtual file.

Now, if there was something unusual about your install (for example, you hadn't used the install.sh for whatever reason), you may not have an entry in your main.cf file telling Postfix to use that file.

You'll want to make sure you have a line in your main.cf file that looks like this:

virtual_alias_maps = hash:/etc/postfix/virtual

-Eric

Tue, 09/15/2009 - 18:29
kenlyle

Nope, I have that entry. My hosting company reports that that line was indeed missing at one point, but is now present: "/etc/postfix/main.cf was missing a virtual_alias_maps directive. I've

added that, removed that domain from the mydestination line and placed the system hostname in the mydestination line. After doing that and restarting postfix, it's receiving email. "

I'd newly created some domains after that line was added, and my recollection is that I had to add the existing domains to and still have to add new domain names manually to the line something like virtual_domains = in main.cf

The most painful thing I am stuck on right now, after 1.5 hours, is that a Virtual Server Owner is not seeing "Edit Mail Aliases", and I was trying to figure out if this might be due to some missing Postfix settings.

I'd appreciate any further assist.

Best, Ken

Tue, 09/15/2009 - 19:16
andreychek

Howdy,

and my recollection is that I had to add the existing domains to and still have to add new domain names manually to the line something like virtual_domains = in main.cf

You shouldn't ever have to add domains into main.cf, except for the primary domain of the server itself. And that should only have to occur once, during the initial setup.

The most painful thing I am stuck on right now, after 1.5 hours, is that a Virtual Server Owner is not seeing "Edit Mail Aliases", and I was trying to figure out if this might be due to some missing Postfix settings.

Well, I attempted to tackle that one in your thread here:

https://www.virtualmin.com/node/11471

If that's not working though, just let me know.

Have a good one,

-Eric

Wed, 09/16/2009 - 09:14
kenlyle

I had forgotten to subscribe to that thread, I guess. Thanks for the solution!

Ken

Topic locked