Postfix not Listening

13 posts / 0 new
Last post
#1 Fri, 07/14/2006 - 14:16
ChrisEyre

Postfix not Listening

I've been tryng now for a couple of days to get Postfix working. The starts OK and all apears to be well and emails gererated by virtualmin get through. It's simply not listening to the internet. I have tried telnetting on port 25 and it refuses connection.

Things I have tried. I have manually changed the myhostname setup in the Webmin Server settings and changed it back again. I have also used the 'alternative' command, detailed in another post but to no avail. Looking at main.cf things like mydomain=sampledomain.tld are commented out.

I'm sure i'm missing something really simple here but can someone point me in the right direction.

Many thanks

Fri, 07/14/2006 - 14:51
Joe
Joe's picture

Hey Chris,

You'll want to modify the inet_interfaces, not myhostname. I thought we altered this in the installer, but something might still be wrong with that bit of code.

In Webmin's Postfix module, this option is under[b>General Options</b> and is labeled "Network interfaces for receiving mail". Set it to "all" and save and apply changes.

--

Check out the forum guidelines!

Fri, 07/14/2006 - 16:51
ChrisEyre

Great Joe, that did the trick with Postfix.

Nearly there.......

Postfix now delivers internally generated emails to /var/mail/username and externally-generated emails to ~/mail/Sent Messages.

What's the best way to get Dovecot to deliver both mailstores to an external client? Or should Postfix be tweaked?

Thanks,

Fri, 07/14/2006 - 19:27 (Reply to #3)
Joe
Joe's picture

Hey Chris,

Postfix is only delivering one of those (/var/mail/username). The other one is generated by your mail client (I assume Usermin, but any mail program is going to generate some kind of sent messages folder). There is no standard for the latter. The only way to share a sent messages folder is to use IMAP and configure all mail clients to put them in the same place.

Dovecot is always the software used for mail retrieval, and Postfix doesn't have any say in that part of the equation.

I'm a little bit confused, however, as I see that you've purchased Virtualmin Professional. Professional configures Postfix to deliver to Maildir format mail spools--your example is mbox. Dovecot should also be configured out of the box after you've installed Virtualmin Professional. If it isn't working, then the installer probably failed in some way.

--

Check out the forum guidelines!

Wed, 07/19/2006 - 16:10
ChrisEyre

OK, This is where I'm at. I have switched the main.cf so that postfix sends to Maildir (I could not see if this could be done in Webmin). Postfix is now listening on port 25 but it is not accepting mail for any users or aliases with the exception of the very first user set up, which seems to work OK. It would therefore seem to be an issue with virtual mailboxes perhaps?

I notice that Maidir directories are placed in two places...

/home/~/Maildir/

and

/home/~/homes/mail/Maildir

Is this normal? Dovecot has placed files in each.

Any suggestions most welcome

Many thanks

Wed, 07/19/2006 - 17:56 (Reply to #5)
ChrisEyre

Does Virtualmin & Webmin use the virtual_alias_domains command in Postfix? I see it points virtual_alias_maps to /etc/postfix/virtual. If so I can't see any valid line in the main.cf file that uses virtual_alias_domains. Could this be part of the problem?

Wed, 07/19/2006 - 18:17 (Reply to #6)
Joe
Joe's picture

Hey Chris,

Virtualmin uses virtual_alias_maps only. There is no need for a virtual_alias_domains directive if using a map file.

--

Check out the forum guidelines!

Wed, 07/19/2006 - 18:25 (Reply to #7)
Joe
Joe's picture

<i>/home/~/Maildir/

and

/home/~/homes/mail/Maildir

Is this normal? Dovecot has placed files in each.</i>

No, I don't think this is normal or right. A &quot;mail&quot; subdirectory in each ~ might be created by Usermin (depending on Usermin configuration), but there probably wouldn't be a Maildir there under any circumstance of correct configuration. And the &quot;~/homes/mail&quot; bit is wholly wrong and unworkable in any type of configuration I can think of, unless you actually have a mailbox user named &quot;mail&quot;. Perhaps Postfix put it there during an earlier configuration experiment?

Dovecot shouldn't be creating the Maildir directories, I don't think--Postfix is doing the delivery to Procmail, which then delivers to Maildir (in the standard Virtualmin Professional configuration, though it sounds like you're bypassing Procmail and having Postfix deliver directly to Maildir, which loses Spam and AV filtering). Dovecot can create folders, but I believe it would only be subdirectories of the Maildir directory (things like .Sent).

Again, I'm confused, since none of this ought to need setting up at all, if you've installed Virtualmin Professional on a fresh OS installation (and we should probably try to figure out what went wrong and fix that rather than hand-correcting every little details). If this is a Virtualmin GPL installation, then it will need to be setup manually, as you're doing, and I'm happy to guide you.

--

Check out the forum guidelines!

Thu, 07/20/2006 - 08:55 (Reply to #8)
ChrisEyre

Thanks Joe, This is Virtualmin Pro, and happy to reinstall as I'm only testing prior to migrating data from my existing server. If you think a reinstall is a good idea, do I just reinstall Postfix and Dovecot?

The server I'm using is a fresh build but is remote so I can't get a rebuild without incurring cost from the Data centre. The build specs as supplied to me are as follows...

Fedora Core 5
Hardware Specification NB 1
CPU: 2.4GHz (Celerion)
Memory: 512MB
Discs: 1 x 80GB SATA
Software Build Fedora Core 5
Apache 2.0
Perl CGI 5.8.7
PHP 4
Exim 4
MySQL 4.1

The install of Virtualmin Pro did not throw up any errors. But the mail setup did not work from the start. I did notice, however, that Sendmail was activated and I had to turn this off prior to getting Postfix running. I've done various things to PostFix and Dovecot but only to try to get them to work in the first place.

Any light shed with this info?

Regards

Thu, 07/20/2006 - 17:34 (Reply to #9)
Joe
Joe's picture

Hey Chris,

That's really very strange. It sounds like it should have just worked...fresh OS install should never have any problems during install.

Reinstalling Postfix and Dovecot won't configure them for Virtualmin (we do that stuff during the Virtualmin installation).

You've got two easy (easier than fixing everything manually, because even I can't keep up with everything that goes on during installation, in both virtualmin-base and in the install.sh script itself--the install process is maintained by both me and Jamie, and neither of us knows everything it does without looking closely at the different pieces of the code) options:

You can attempt a full re-install of Virtualmin, by using the virtualmin-uninstall.sh script first (you don't need to re-image the whole system to do this--the script removes everything that it needs to start fresh, or at least does as far as I know). It's ugly and not recommended if you already have any domains (because it will kill them without backing them up), but it will probably work. Then again, the same thing that happened durind your first install might happen again and we'll still have to figure out what failed--we might at least note an error hiding in the output somewhere (error logging in the install script isn't yet ideal...I've recently added a nice shell logging library and it's getting better with each release, but I'm having to capture errors from so many different sources, and some things don't throw errors even if something doesn't go right, that it's difficult to catch everything). The virtualmin-uninstall.sh script can be found here:

http://software.virtualmin.com/lib/virtualmin-uninstall.sh

Be sure to also download the latest install.sh before attempting this...maybe something has been fixed since the first install. When you go to http://www.virtualmin.com/serial the Download link is always the latest version of install.sh available.

Or, and this one might be simpler, you can just reinstall Postfix and Dovecot (to get fresh configuration files) and then run the standalone perl script that does the configuration steps (this is pretty much pulled verbatim out of the virtualmin-base package). This script is named virtualmin-base-standalone.pl and can be found in this directory (you'll need to use your serial number and license key as the username and password to login--these can be found in /etc/virtualmin-license, or in the serial numbers page on this website):

http://software.virtualmin.com/wbm

Or, you can email me the details for logging in, and I'll fix it for you personally. I'd kind like to see where it blew up, as I suspect there's more than just this trouble--mail is only halfway through the configuration process, and if it didn't get done, nothing after it will have gotten done. And that'll lead to surprises later. Either of the methods of resolving the issue given here will probably fix it--but I can't be sure of that. The same thing might happen again (but maybe we'll see the error this time and can address it in the install script for another go).

Sorry you've run into this trouble. I think Fedora Core 5 installs are still a bit iffy, though I didn't have trouble during my test installs. I think we just need a bit more real world work with it to get it solid. But, for all systems the logging needs to get a lot better--it shouldn't be nearly invisible when something goes so wrong with the install that major features aren't working. :-(

--

Check out the forum guidelines!

Thu, 07/20/2006 - 18:08
ChrisEyre

Hi Joe, I'll email you through the details - it's very good of you to offer. Thank you.

Regards

Chris

Thu, 07/20/2006 - 18:17
ChrisEyre

What email address can I use to send you the server details? If you'd rather not post it you can email me and I'll reply on mail@chriseyre.com

Thanks

Thu, 07/20/2006 - 18:43
ChrisEyre

Have found your email and sent details. Thank you.