Help with setting up email

12 posts / 0 new
Last post
#1 Thu, 12/18/2008 - 05:40
ekald

Help with setting up email

Hi everyone. I am really liking the webmin and virtualmin interfaces. I have it on one dedicated hosting server I manage, and when we brought up a 2nd one, we decided to install it there too.

Anyway, long story short, I have had the typical issues (susexec, etc) and i now successfully have virtualmin running, I have postfix, dovecot and sendmail all installed.

everything seems ok, port 25 looks to be open, not occupied, and yet i cant start the mail server.

I am trying to do it from both the command line and in virtualmin. Command line claims it started (says OK) but when i try to stop it it says it can't stop it.

After starting on the command line, I go to virtualmin and it claims it is not started. So I start it in virtualmin and the page simply reloads, no change has been made, no error message, nothing.

below is a pic of the services in virtualmin.

Can someone help me to figure out my next steps here? Thank you.

[img size=166]http://www.virtualmin.com/components/com_fireboard/uploaded/images/Firef... edited by: ekald, at: 2008/12/18 05:41

Thu, 12/18/2008 - 06:16
andreychek

It sounds like Postfix may be dieing right after it launches; is there any info in the mail logs regarding the problem -- either /var/log/maillog or /var/log/mail.log?
-Eric

Thu, 12/18/2008 - 06:22 (Reply to #2)
ekald

so now for the first time the log is saying port 25 is in use...

i cant seem to find info on this like i did the first time, anyone have info for me or a link to the thread?

Thank you for your response.

Dec 14 21:00:03 localhost sendmail[16735]: mBF203kb016735: from=root, size=1698, class=0, nrcpts=1, msgid=<200812150200.mBF203kb016735@localhost.localdomain>, relay=root@localhost
Dec 14 21:00:03 localhost sendmail[16736]: mBF203GK016736: from=<root@localhost.localdomain>, size=1977, class=0, nrcpts=1, msgid=<200812150200.mBF203kb016735@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Dec 14 21:00:03 localhost sendmail[16735]: mBF203kb016735: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31698, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBF203GK016736 Message accepted for delivery)
Dec 14 21:00:03 localhost sendmail[16737]: mBF203GK016736: to=<root@localhost.localdomain>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32195, dsn=2.0.0, stat=Sent
Dec 15 04:02:03 localhost sendmail[18143]: mBF923TY018143: from=root, size=1857, class=0, nrcpts=1, msgid=<200812150902.mBF923TY018143@localhost.localdomain>, relay=root@localhost
Dec 15 04:02:03 localhost sendmail[18288]: mBF923xM018288: from=<root@localhost.localdomain>, size=2137, class=0, nrcpts=1, msgid=<200812150902.mBF923TY018143@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Dec 15 04:02:03 localhost sendmail[18143]: mBF923TY018143: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31857, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBF923xM018288 Message accepted for delivery)
Dec 15 04:02:03 localhost sendmail[18289]: mBF923xM018288: to=<root@localhost.localdomain>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32359, dsn=2.0.0, stat=Sent
Dec 15 04:02:03 localhost ctl_mboxlist[18333]: DBERROR: reading /var/lib/imap/db/skipstamp, assuming the worst: No such file or directory
Dec 15 04:02:03 localhost ctl_mboxlist[18333]: skiplist: recovered /var/lib/imap/mailboxes.db (0 records, 144 bytes) in 0 seconds
Dec 15 21:00:03 localhost sendmail[21573]: mBG203Iq021573: from=root, size=1698, class=0, nrcpts=1, msgid=<200812160200.mBG203Iq021573@localhost.localdomain>, relay=root@localhost
Dec 15 21:00:03 localhost sendmail[21574]: mBG203ah021574: from=<root@localhost.localdomain>, size=1977, class=0, nrcpts=1, msgid=<200812160200.mBG203Iq021573@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Dec 15 21:00:03 localhost sendmail[21573]: mBG203Iq021573: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31698, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBG203ah021574 Message accepted for delivery)
Dec 15 21:00:03 localhost sendmail[21575]: mBG203ah021574: to=<root@localhost.localdomain>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32195, dsn=2.0.0, stat=Sent
Dec 16 04:02:03 localhost sendmail[22848]: mBG923xZ022848: from=root, size=2455, class=0, nrcpts=1, msgid=<200812160902.mBG923xZ022848@localhost.localdomain>, relay=root@localhost
Dec 16 04:02:03 localhost sendmail[23089]: mBG923Qp023089: from=<root@localhost.localdomain>, size=2735, class=0, nrcpts=1, msgid=<200812160902.mBG923xZ022848@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Dec 16 04:02:03 localhost sendmail[22848]: mBG923xZ022848: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32455, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBG923Qp023089 Message accepted for delivery)
Dec 16 04:02:03 localhost sendmail[23090]: mBG923Qp023089: to=<root@localhost.localdomain>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32957, dsn=2.0.0, stat=Sent
Dec 16 04:02:04 localhost ctl_mboxlist[23134]: DBERROR: reading /var/lib/imap/db/skipstamp, assuming the worst: No such file or directory
Dec 16 04:02:04 localhost ctl_mboxlist[23134]: skiplist: recovered /var/lib/imap/mailboxes.db (0 records, 144 bytes) in 0 seconds
Dec 16 14:45:34 localhost postfix/postfix-script: fatal: the Postfix mail system is not running
Dec 16 14:45:34 localhost sendmail[25289]: alias database /etc/aliases rebuilt by root
Dec 16 14:45:34 localhost sendmail[25289]: /etc/aliases: 76 aliases, longest 10 bytes, 765 bytes total
Dec 16 21:00:03 localhost sendmail[27482]: mBH203Bb027482: from=root, size=1698, class=0, nrcpts=1, msgid=<200812170200.mBH203Bb027482@localhost.localdomain>, relay=root@localhost
Dec 16 21:00:03 localhost sendmail[27483]: mBH203W9027483: from=<root@localhost.localdomain>, size=1977, class=0, nrcpts=1, msgid=<200812170200.mBH203Bb027482@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Dec 16 21:00:03 localhost sendmail[27482]: mBH203Bb027482: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31698, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBH203W9027483 Message accepted for delivery)
Dec 16 21:00:03 localhost sendmail[27484]: mBH203W9027483: to=<root@localhost.localdomain>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32195, dsn=2.0.0, stat=Sent
Dec 17 04:02:04 localhost sendmail[28785]: mBH9233r028785: from=root, size=3549, class=0, nrcpts=1, msgid=<200812170902.mBH9233r028785@localhost.localdomain>, relay=root@localhost
Dec 17 04:02:04 localhost sendmail[29039]: mBH924kk029039: from=<root@localhost.localdomain>, size=3829, class=0, nrcpts=1, msgid=<200812170902.mBH9233r028785@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Dec 17 04:02:04 localhost sendmail[28785]: mBH9233r028785: to=root, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=33549, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBH924kk029039 Message accepted for delivery)
Dec 17 04:02:04 localhost sendmail[29040]: mBH924kk029039: to=<root@localhost.localdomain>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=34051, dsn=2.0.0, stat=Sent
Dec 17 04:02:04 localhost ctl_mboxlist[29084]: DBERROR: reading /var/lib/imap/db/skipstamp, assuming the worst: No such file or directory
Dec 17 04:02:04 localhost ctl_mboxlist[29084]: skiplist: recovered /var/lib/imap/mailboxes.db (0 records, 144 bytes) in 0 seconds
Dec 17 21:00:03 localhost sendmail[353]: mBI203ee000353: from=root, size=1698, class=0, nrcpts=1, msgid=<200812180200.mBI203ee000353@localhost.localdomain>, relay=root@localhost
Dec 17 21:00:03 localhost sendmail[354]: mBI2030o000354: from=<root@localhost.localdomain>, size=1977, class=0, nrcpts=1, msgid=<200812180200.mBI203ee000353@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Dec 17 21:00:03 localhost sendmail[353]: mBI203ee000353: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31698, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBI2030o000354 Message accepted for delivery)
Dec 17 21:00:03 localhost sendmail[355]: mBI2030o000354: to=<root@localhost.localdomain>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32195, dsn=2.0.0, stat=Sent
Dec 18 00:00:02 localhost sendmail[845]: mBI502jO000845: from=root, size=905, class=0, nrcpts=1, msgid=<200812180500.mBI502jO000845@localhost.localdomain>, relay=root@localhost
Dec 18 00:00:02 localhost sendmail[846]: mBI502nY000846: from=<root@localhost.localdomain>, size=1184, class=0, nrcpts=1, msgid=<200812180500.mBI502jO000845@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Dec 18 00:00:02 localhost sendmail[845]: mBI502jO000845: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30905, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBI502nY000846 Message accepted for delivery)
Dec 18 00:00:02 localhost sendmail[847]: mBI502nY000846: to=<root@localhost.localdomain>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31402, dsn=2.0.0, stat=Sent
Dec 18 04:02:05 localhost sendmail[1661]: mBI924ur001661: from=root, size=2379, class=0, nrcpts=1, msgid=<200812180902.mBI924ur001661@localhost.localdomain>, relay=root@localhost
Dec 18 04:02:05 localhost sendmail[1900]: mBI925vm001900: from=<root@localhost.localdomain>, size=2659, class=0, nrcpts=1, msgid=<200812180902.mBI924ur001661@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Dec 18 04:02:05 localhost sendmail[1661]: mBI924ur001661: to=root, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=32379, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBI925vm001900 Message accepted for delivery)
Dec 18 04:02:05 localhost sendmail[1901]: mBI925vm001900: to=<root@localhost.localdomain>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32881, dsn=2.0.0, stat=Sent
Dec 18 04:02:05 localhost ctl_mboxlist[1945]: DBERROR: reading /var/lib/imap/db/skipstamp, assuming the worst: No such file or directory
Dec 18 04:02:05 localhost ctl_mboxlist[1945]: skiplist: recovered /var/lib/imap/mailboxes.db (0 records, 144 bytes) in 0 seconds
Dec 18 08:57:02 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 08:57:02 localhost postfix/master[3487]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 08:57:16 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 08:57:16 localhost postfix/master[3682]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 08:57:17 localhost postfix/postfix-script: fatal: the Postfix mail system is not running
Dec 18 09:20:47 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 09:20:47 localhost postfix/master[5902]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 09:20:50 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 09:20:50 localhost postfix/master[5956]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 09:23:51 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 09:23:51 localhost postfix/master[6237]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 09:30:27 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 09:30:27 localhost postfix/master[6462]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 09:35:14 localhost sendmail[6661]: alias database /etc/aliases rebuilt by root
Dec 18 09:35:14 localhost sendmail[6661]: /etc/aliases: 76 aliases, longest 10 bytes, 765 bytes total
Dec 18 09:35:15 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 09:35:15 localhost postfix/master[6707]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 09:35:32 localhost sendmail[6744]: alias database /etc/aliases rebuilt by root
Dec 18 09:35:32 localhost sendmail[6744]: /etc/aliases: 76 aliases, longest 10 bytes, 765 bytes total
Dec 18 09:35:32 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 09:35:32 localhost postfix/master[6790]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 09:36:20 localhost postfix/postfix-script: fatal: the Postfix mail system is not running
Dec 18 09:37:42 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 09:37:42 localhost postfix/master[6852]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 09:37:53 localhost sendmail[6866]: alias database /etc/aliases rebuilt by root
Dec 18 09:37:53 localhost sendmail[6866]: /etc/aliases: 76 aliases, longest 10 bytes, 765 bytes total
Dec 18 09:37:53 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 09:37:53 localhost postfix/master[6912]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 09:37:57 localhost postfix/postfix-script: fatal: the Postfix mail system is not running
Dec 18 09:38:03 localhost sendmail[6928]: alias database /etc/aliases rebuilt by root
Dec 18 09:38:03 localhost sendmail[6928]: /etc/aliases: 76 aliases, longest 10 bytes, 765 bytes total
Dec 18 09:38:04 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 09:38:04 localhost postfix/master[6974]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 09:44:17 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 09:44:17 localhost postfix/master[7121]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 09:44:27 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 09:44:27 localhost postfix/master[7221]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 09:44:35 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 09:44:35 localhost postfix/master[7326]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 09:58:06 localhost sendmail[10197]: alias database /etc/aliases rebuilt by root
Dec 18 09:58:06 localhost sendmail[10197]: /etc/aliases: 76 aliases, longest 10 bytes, 765 bytes total
Dec 18 09:58:06 localhost sendmail[10202]: starting daemon (8.13.8): SMTP+queueing@01:00:00
Dec 18 09:58:06 localhost sm-msp-queue[10210]: starting daemon (8.13.8): queueing@01:00:00
Dec 18 10:10:17 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 10:10:17 localhost postfix/master[11249]: fatal: bind 127.0.0.1 port 25: Address already in use
Dec 18 10:10:23 localhost dovecot: Dovecot v1.0.7 starting up
Dec 18 10:10:23 localhost dovecot: Generating Diffie-Hellman parameters for the first time. This may take a while..
Dec 18 10:10:27 localhost dovecot: ssl-build-param: SSL parameters regeneration completed
Dec 18 10:25:21 localhost sendmail[11427]: alias database /etc/aliases rebuilt by root
Dec 18 10:25:21 localhost sendmail[11427]: /etc/aliases: 76 aliases, longest 10 bytes, 765 bytes total
Dec 18 10:25:22 localhost postfix/postfix-script: starting the Postfix mail system
Dec 18 10:25:22 localhost postfix/master[11473]: fatal: bind 127.0.0.1 port 25: Address already in use

Thu, 12/18/2008 - 06:33 (Reply to #3)
ekald

guys i have a way worse problem now...

can someone help me with this?

i can't get apache to start now... it says

Failed to start service :

Starting httpd: [Thu Dec 18 11:32:42 2008] [warn] module php5_module is already loaded, skipping
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(98)Address already in use: make_sock: could not bind to address (myip):80
no listening sockets available, shutting down
Unable to open logs
[FAILED]

I replaced my ip with (myip)

How do I tell what's conflicting with it?

Thu, 12/18/2008 - 06:48 (Reply to #4)
andreychek

It sounds as if there may be a few issues going on :-)

But rather than starting Apache, what happens if you restart it:

/etc/init.d/httpd restart

That should stop any current instance, then fire it back up (assuming you're running CentOS or RHEL).
-Eric

Thu, 12/18/2008 - 06:53 (Reply to #5)
andreychek

In regards to your Postfix startup problem -- I think I see the issue there.

First, how did you go about installing Virtualmin on this server -- did you by chance use the install.sh script? Where there any email users on the system before you installed it?

It looks like Sendmail is running, so when you attempt to load Postfix, it's not able to get ahold of port 25.

Which would explain the problem with forwarding -- Virtualmin appears to be configured to use Postfix, but if Sendmail is what's running, that would cause the forwarding directives to be ignored :-)

We can probably fix that, but I need as much info as you can give me on your setup first so we don't break anything :-)
-Eric

Thu, 12/18/2008 - 07:17 (Reply to #6)
ekald

No, we installed with the rpm file. The server is running redhat.

No email users at the time. We had sendmail on there already, everything was running fine. We actually have a tomcat 6 app running that now needs to be able to email our users... hence why i was trying to get a mail server up and running.

somewhere in the melee of fixing the errors i got this error with apache. I ended up solving it by stopping all mail servers including dovecot, then reassigning apache.

we had and still have apache set to run on :8080, with tomcat on :80 because our clients who will be using the software cant run urls with port numbers in them.

How do i configure virtualmin to use sendmail? what additional info can i provide for you? thanks for your help!!

Thu, 12/18/2008 - 07:31 (Reply to #7)
andreychek

Okay -- first, installing Virtualmin via RPM works, but it's the long and hard road :-) Virtualmin is best able to configure your system for use with it by running the install.sh script on a freshly installed system.

That said, let's get to work :-)

What all isn't working as of now -- just the email problems we were talking about?

You can tell Virtualmin what email server to use by going into System Settings -> Module Config, and changing "Mail server to configure" to Sendmail.

The trouble you'll have is that Virtualmin tried to setup your accounts within Postfix.

If you move to Sendmail, it doesn't migrate the users; so Virtualmin will think there are no email users on your system. The only ideas I can offer are:

* Manually migrate the users to Sendmail (I'm not familiar with how to do that)

* Delete any email users, switch Virtualmin to Sendmail, then re-add the email users

* Start from scratch -- get a fresh distro install, and use Virtualmin's install.sh script to get everything setup correctly from the start. This route may end up saving you time down the road

Thu, 12/18/2008 - 07:39 (Reply to #8)
andreychek

<div class='quote'>
sorry i should probably explain that this was a clean server, no users on the software at all. it will be our production server once the glitches are ironed out.
</div>

Mmmm -- well, knowing that -- if it's at all an option, I might really recommend the &quot;start fresh&quot; idea.

There's a few things that aren't likely to be working as of now in addition to what you've already seen (saslauthd for secure email auth, procmail, the Virtualmin repository, Dovecot, amongst others).

If you use the install.sh, Virtualmin will pull down and configure all the packages for the &quot;Virtualmin Stack&quot; -- some of which are from the Virtualmin repository.

At that point, you'll receive updates for those packages as well (which won't happen unless you're setup with the Virtualmin repo).

You can of course set all that up manually, but if it's a good time to start over, it might be worth it to do so.

The install.sh script is available here:

http://webmin.com/vinstall.html

Thu, 12/18/2008 - 08:01 (Reply to #9)
andreychek

If you do opt to start from scratch, Virtualmin will setup Postfix for you to use. Postfix is it's default mail server, and that's nice and easy to work with.

Also, if you installed via an RPM, you probably don't have the cool theme installed -- Virtualmin can look much nicer than what you see now :-) (and that's also setup for you by default)
-Eric

Thu, 12/18/2008 - 07:29 (Reply to #10)
ekald

sorry i should probably explain that this was a clean server, no users on the software at all. it will be our production server once the glitches are ironed out.

Thanks.

Thu, 12/18/2008 - 07:57 (Reply to #11)
ekald

wow thank you so much

im going to look to see what i want to do, but likely a fresh start is the answer.

thanks again!

Topic locked