I noticed another email error at the top of this forum but I don't believe its related.
I appear to be having some problem with sendmail being improperly installed or configured. I have since worked around this issue by using postfix which is working properly for me, but I still wanted to report a potential problem.
Here is the error from my mail log:
/var/log/mailerr
Apr 2 13:07:01 learn sendmail[23141]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon submission: cannot bind: Address already in use Apr 2 13:07:01 learn sendmail[23141]: daemon submission: problem creating SMTP socket
end log
At this point I checked and postfix and dovecot were not running.
Then I used netstat -pane | grep :25 which returned empty so I know that's not the problem.
I tried making some adjustments to sendmail m4 which produced even more errors and frustrated me into trying postfix instead.
I then used webmin to install postfix from the postfix module which produced this output:
apt-get output
After this operation, 1479 kB of additional disk space will be used. (Reading database ... 100755 files and directories currently installed.) Removing sendmail (8.14.4-4.1ubuntu1) ... dpkg: sendmail-bin: dependency problems, but removing anyway as you requested: sensible-mda depends on sendmail-bin | mail-transport-agent; however: Package sendmail-bin is to be removed. Package mail-transport-agent is not installed. Package sendmail-bin which provides mail-transport-agent is to be removed. Package postfix which provides mail-transport-agent is not installed. sensible-mda depends on sendmail-bin | mail-transport-agent; however: Package sendmail-bin is to be removed. Package mail-transport-agent is not installed. Package sendmail-bin which provides mail-transport-agent is to be removed. Package postfix which provides mail-transport-agent is not installed.
Removing sendmail-bin (8.14.4-4.1ubuntu1) ... Selecting previously unselected package postfix. (Reading database ... 100704 files and directories currently installed.) Preparing to unpack .../postfix_2.11.0-1ubuntu1_amd64.deb ... Unpacking postfix (2.11.0-1ubuntu1) ... Setting up postfix (2.11.0-1ubuntu1) ...
end apt output
For some reason my sendmail was installed without mail transfer agent; whether this was because of something I did wrong or because of a misconfiguration or neglected package I don't know. I hope this is useful for someone else out there.
Comments
Submitted by andreychek on Sat, 04/02/2016 - 16:26 Comment #1
Howdy -- it sounds like the error message is saying that it was listening on the "Submission" port, which is 587.
However, it doesn't sound like you're seeing a bug there, as Postfix is what Ubuntu and Virtualmin install and use by default. We actually recommend against Sendmail, if possible.
While Virtualmin can perform a Sendmail installation, that's done using the packages available to your distribution. That is, Virtualmin will install Sendmail if told to do so, but it doesn't do any configuration of it at install time.
When using the install.sh script to install Virtualmin, it will install and configure Postfix.
We do recommend Postfix -- so if that's an option, we'd highly suggest going with that.
As it sounds like that's what you have working now, you should be in good shape!
Submitted by fitkoh on Sat, 04/02/2016 - 17:11 Comment #2
This is actually really helpful and I'm glad I posted it here. For myself, working out of small vps every bit of cpu and ram I can save helps, which is why I've been working on setting up sendmail as opposed to postfix.
During my configuration though I didn't set submission port to 587 I set it to port 25, which could have been a part of my problem. This is probably due to my haste/neglect in thoroughly examining installation procedures.
Another error (maybe related?) I just noticed while attempting to create a virtual domain.
error
Adding default mail aliases .. .. Mail for domain failed! : makemap failed :
sh: 1: makemap: not found
at ../web-lib-funcs.pl line 1427.
end error
I tried good ol fashioned apt-get install makemap but there's no package found.
makemap is apparently a part of sendmail on ubuntu: http://manpages.ubuntu.com/manpages/vivid/man8/makemap.8.html
Can I safely ignore this error as I'm not using sendmail anymore? Or is there some part of my conf that will need to be reset in order to properly send mail?
Submitted by andreychek on Sat, 04/02/2016 - 17:33 Comment #3
It sounds like Virtualmin may still be configured to use Sendmail. It doesn't detect which MTA is installed -- instead, it's configured to use one or the other... and if it's still configured to use Sendmail, it would try to run makemap even though Postfix is installed.
You may want to verify the MTA it's set to use in System Settings -> Virtualmin Config -> Mail server to configure.
We're happy to help with any additional issues you're seeing. It looks like you're using Virtualmin GPL there though... if you're using Virtualmin GPL, the best place to get help is using the Forums. We monitor the Forums, along with lots of folks in the community. Thanks!
Submitted by fitkoh on Sat, 04/02/2016 - 21:36 Comment #4
I guess it's not a bug after all just the way webmin is set up. It was still set to using sendmail, which I've remedied. Thank you very much for your help, I think I've got everything running smoothly and virtualmin isn't giving me any complaints at the moment. I'll be sure to post in the forums if any future issues arise.