Hello dear people,
Please believe, I am Googling the internet about one week and I did not find any possible solutions for my issue with SendMail & Postfix. I am pretty new on Unix, Linux, Webmin & Virtualmin. Operating system of my VPS is CentOS 5. Webmin and Virtualmin (Free Version) is installed. As I require a mail server, I decided to add SendMail. I could configure SendMail enough but there was a problem, I can mention it as below that I can send e-mail messages to anywhere through 'User Mailboxes' but not Outlook Express. Authentication works correctly. The problem is that SendMail tries to relay target email domain and not my server. It is what I have found out. Anyway, I could not find any possible way to resolve it. I decided to switch to Postfix. But post on Postfix thing's gone wore. I was unable to receive emails and no emails were sent. For incoming I get "rejected error" and for outgoing I get "relay access denied". When I try SSH and telnet localhost 25, I get "relay access denied" error.
I am really confused. Please let me know what should I do.
Please help me.
Regards,
Whenever you try to send or receive a message, what error(s) show up in the error log (/var/log/maillog)?
-Eric
Dear Andreychek,
Thank you for your reply.
Unfortunately I am out and cannot get access to server to paste the maillog. But I can explain the issue some more.
About SendMail:
1) Authentication OK.
2) Receiving e-mail from anywhere OK.
3) Sending e-mails via User Mailboxes or PHP mail function OK. (sends e-mail to anywhere)
4) Sending e-mail via Local PC and Outlook express FAIL. (sends e-mails only to hosts accept Relay)
I think when I try to send an email via Local PC and Outlook Express for example from admin@mydomain.com to some@somedomain.com, the SendMail tries to set relay=somedomain.com instead of relay=localhost. For some servers like Gmail it is possible but for many other not. It is just my idea, I am a NEWBIE.
About Postfix:
1) Authentication OK. (happened after arranging permissions)
2) Receiving e-mail from anywhere FAIL. No way to receive. (even localdomain user cannot send e-mail to other localdomain user)
3) Sending e-mails FAIL. No way to send.
Currently I am working on Postfix and SendMail is stopped. I will post the mail logs as soon as possible.
Regards,
Please help!
I have switched to SendMail, because there was a large log file I decided to clear the maillog (/var/log/maillog). Webmin (View Logfile) acts interesting. When there is no maillog file or maillog file is empty View Logfile displays previous records but when I enter a line inside ,aillog file it shows new records. My problem is that SendMail does not update the log file. I have tried to restart syslog service but no thing changed. Please help me!!!!
Regards,
i think you are better off using postfix, it is the default in virtualmin.
you'll have to switch mailserver through the commandline, but i do not remember the command.
It is here in the forum somewhere though.
Also if you do not find a satisfying solution in this forum I advice to submit a support ticket in the bug tracker.
Yeah, as Ronald said, while Virtualmin does support Sendmail -- Postfix may be a bit easier to get running, and more people around these parts are familiar Postfix and can help with any odd issues that arise :-)
I'm not sure why Sendmail wouldn't be logging things -- I guess I'd verify that there isn't a different log in /var/log somewhere that contains it's logs (though I'm not sure why that might have changed).
Also, perhaps /var/log/messages contains information on what the problem is. Try restarting Sendmail, and see if anything odd shows up in that messages log.
-Eric
Thank you for replies
I have switched to Postfix again, I have changed the mail server from SendMail to Postfix via command line. I used below command:
[code:1]alternatives --config mta[/code:1]
Currently the sending problem FIXED. I can send e-mail through web and outlook express. Authentication works as well to not allow Open Relay. But still maillog does not update regularly and also all incoming messages rejected.
Please help me.
This is error:
<div class='quote'>Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 554 554 5.7.1 <qb-out-1314.google.com[72.14.204.174]>: Client host rejected: Access denied (state 14).</div>
Please advise me.
Regards,
Yeah, email programs should definitely be making log entries in the log files :-)
When you restart Postfix (/etc/init.d/postfix restart), do you see any errors listed in /var/log/messages?
-Eric
Actually I do not see anything related to Postfix. But this log file updates regularly. I can see my failure login attempts while checking authentication (saslauthd server). Also what is your idea about No Receiving emails? Also there is some notable in User Email, a strange e-mail, it is as below (Subject : DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA):
<b>Message Comment :</b>
<div class='quote'>This text is part of the internal format of your mail folder, and is not a real message. It is created automatically by the mail system software. If deleted, important folder data will be lost, and it will be re-created with the data reset to initial values.</div>
How do you think about a Reboot? May it be helpful?
regards,
Well, one issue may rely on the other, unfortunately.
I'd really need to see the email logs in order to determine why you aren't able to receive messages.
I wouldn't be concerned about the email containing the "DON'T DELETE THIS MESSAGE" email -- while I haven't seen those since the day I used pine as an email client, that are harmless and not likely a symptom of the issue here.
So, to be clear, nothing is logging to /var/log/maillog? And, nothing of interest is in /var/log/messages relating to Postfix.
Do you happen to see any other logs in the /var/log directory with Postfix related information in them?
Do you have enough disk space? You can verify that with "df -h".
Those are just some thoughts, let me know if that doesn't help.
-Eric
There is enough disk space,
<div class='quote'>/dev/simfs 6.0G 1014M 5.1G 17% /</div>
Actually there is no log related to postfix, I also checked inside of other log files and no thing found. I think I got to reboot the server, maybe it helps some. How do you think?
regards,
Ok, so you should have plenty of space.
You could always try rebooting if you want, though I'm never a big fan of that as a solution. It skips the step of learning what is wrong, and invites the problem to occur again :-)
I'm interested in logging into your system to take a look at the problem myself, if you don't mind.
What version of Virtualmin are you using, and is it Pro or GPL?
-Eric
I am using Virtualmin GPL.
Alright, if you're interesting in having me take a look, you can email login details for root SSH access to eric@virtualmin.com.
I'm just not sure what would cause the symptoms you're seeing, so I'd need to poke around myself to get a better idea.
-Eric
It is okay, but do you need Supervisor root access?
Yes, to be able to troubleshoot the problem, I'd need either root access, or access to a user level account that has full sudo privileges.
-Eric
I have sent required information, the e-mail subject is "here is the data".
Please check it.
Sorry, mistyped, the subject is "here is the info.".
Dear andreychek,
please confirm back to me that you have received the e-mail. Thank you
Altera and I went over some things via email.
The problem with syslog is that the conf file was setup to send mail.none to maillog, rather than mail.*. I corrected that.
Unfortunately, there appear to be a few problems with the Postfix setup.
Switching back and forth between Sendmail and Postfix may have caused some problems -- first, Virtualmin will use whatever mail program you tell it to, but it doesn't transfer email users back and forth. So none of your email users are setup in Postfix.
Amongst other things :-)
If this isn't yet a live system, my recommendation is to uninstall Virtualmin (by running the install.sh script with the -u option), then go through the Virtualmin installation again, allow it to configure Postfix, and then not change that :-)
At that point, when you setup your Virtual Servers and email users, it should in theory work fine.
-Eric
Thank you Eric,
Actually it is not a live system right now, but do I have to back up of Postfix Configuration? I have already installed Virtualmin through webmin, where can I find install.sh?
Thanks
Aha!
That explain a lot, actually.
The best way to install Virtualmin is using Joe's really nifty install.sh script -- which handles setting up a lot of stuff on the server that won't otherwise be setup correctly.
You'll also see the theme designed specifically for Virtualmin, and a lot of things may make more sense once, as you'll begin to see all the Virtualmin options not available to you using the Webmin theme.
You can get the install.sh script here:
http://webmin.com/vinstall.html
When you run that, it'll set up all those goodies for you.
You don't *have* to back up your Postfix configuration, only if you have something now that you want to be able to get at later :-)
-Eric
So, the uninstall option only pulls out Virtualmin specific packages...it won't clean up a botched Postfix configuration or start it from scratch. To do that, you'd want to remove the Postfix package entirely (apt will probably want to install sendmail, if you'd removed it at any point in this process), using whatever option tells the package manager to kill the config files as well (if needed, as it is on Debian/Ubuntu), and then let the install script reinstall it and configure it for you.
The -u|--uninstall option is somewhat simplistic, and can't do much to clean up anything that got botched outside of the stuff that the install mode usually handles--so, if you turned off the virtual maps file, it'll get fixed, but if you did something to logging, or the various recipient/sender maps, or whatever, they would remain the same after an uninstall/reinstall cycle.
It is an imprecise art, dealing with so many packages and so much configuration. The next major release of the install script (written in Perl) will be quite a bit smarter, and will be able to deal with numerous contingencies that the shell script can't even think about. There will also be a bit more use of meta-packages (package groups in yum, and I'm not sure what yet in apt-get, but I guess it has something similar) rather than hard dependencies.
--
Check out the forum guidelines!
I have decided to uninstall virtualmin and all virtualserver and reinstall them again? where is install.sh related to this matter?
please guide me.
OK, I am trying to uninstall it first and reinstall it again!
Sorry, where should I run it. When I execute: "./install.sh -u" I get the following messages:
<div class='quote'>error: package virtualmin-base is not installed
error: package wbm-virtual-server is not installed
error: package wbm-virtualmin-htpasswd is not installed
error: package wbm-virtualmin-dav is not installed
error: package wbm-virtualmin-mailman is not installed
error: package wbm-virtualmin-awstats is not installed
error: package wbm-virtualmin-svn is not installed
error: package wbt-virtual-server-theme is not installed
error: package ust-virtual-server-theme is not installed
error: package awstats is not installed
Done. There's probably quite a bit of related packages and such left behind
but all of the Virtualmin-specific packages have been removed.</div>
Whatcan I do?
It has mentioned here(http://webmin.com/vinstall.html) that installer should not execute at system currently running Webmin! As you know mine has Webmin running. How to deal with this issue?
The point of any warnings about running the install script is that the install script dramatically alters configuration. If you have a production system, things might break, if you run install.sh on it.
Also, if you installed Webmin using odd packages from some source other than ours (either Webmin.com or Virtualmin.com), then there will very, very, very, likely be conflicts in the way things are configured or setup, and the install will fail in possibly subtle (but time-consuming to fix) ways.
So, is this a production system? Is Webmin installed from an odd source, or from a tarball rather than the correct package type for your system? If no on both counts, running install.sh should be fine.
install.sh is most happy on a freshly installed Grade A supported operating system. If the system is not freshly installed (meaning you've installed and configured a bunch of other stuff before running install.sh, including, but not limited to Webmin) you'll just confuse the poor thing and probably break whatever configuration you've done (which may also lead to the new configuration not working either). But, there are varying degrees of "not freshly installed". I have no idea how "not freshly installed" your system is. ;-)
--
Check out the forum guidelines!
Thank you for your reply.
I have bought the VPS with installed Webmin, I am not aware of odd packages. I think I have to spend some more time on it.
Anyway, I will contact the VPS provider and wait for their answer about od packages. I think it is enough for today.
Thank you for your helps.
Thank you guys!
Reinstalling the Webnmin and Virtualmin did not resolve the problem. However after some research I found how to resolve it. By looking at master.cf file and this line :
<div class='quote'>-o smtpd_client_restrictions=permit_sasl_authenticate d,reject</div>
This line makes restriction for incoming messages from External STMP server. I have commented this line and Postfix is working fine. I must note that I found the solution somewhere on the web.
There is another problem, after reinstalling Webmin & VirtualMin the real memory usage is 128/128 and there is no free memory in real memory. Is it a risk to have several sites in this case?
Regards,
<div class='quote'>There is another problem, after reinstalling Webmin & VirtualMin the real memory usage is 128/128 and there is no free memory in real memory. Is it a risk to have several sites in this case?</div>
You need to read the Virtualmin on Low Memory Systems guide here:
http://www.virtualmin.com/documentation/id,virtualmin_on_low_memory_syst...
--
Check out the forum guidelines!
Once again the problem came back, Postfix acts as like as SendMail now. It does not send e-mail to some out servers. It brings time out error.
<div class='quote'>Nov 19 05:46:37 server postfix/smtp[18018]: 1BD1F10F59CB: to=<admin@outsite.com>, relay=mail1.outserver.net[XX.20.XX.193]:25, delay=1358, delays=1187/0.01/0.4/170, dsn=4.0.0, status=deferred (host mail1.outserver.net[XX.20.XX.193] said: 421 planet.outserver.net SMTP incoming data timeout - closing connection. (in reply to end of DATA command))</div>
<b>please help me!</b>
regards
In regards to memory usage - yeah, 128Mb is considered a low memory system. It can be coaxed to work (depending on how much a load you're expecting it to handle), though you certainly might want to consider getting some more RAM for it.
You might want to look at this guide for Virtualmin on low memory systems:
http://www.virtualmin.com/documentation/id,virtualmin_on_low_memory_syst...
I can't answer whether it'll work for your specific case, it depends more on their resource demands, how much traffic, how much email you process -- but you could always try it :-)
In regards to the problem you're seeing in sending email -- do you get the "421 incoming data timeout" for any outgoing email you send, or is it just to that one site?
-Eric
Regarding e-mail sending : yes, I get error approximately for all outgoing emails except with yahoo or gmail. (I have sent e-mails to these e-mail addresses yesterday, but now it shows error 421)
Yahoo says:
<div class='quote'>
Nov 19 07:19:48 server postfix/smtp[28000]: 2E6F810F59CB: host d.mx.mail.yahoo.com[66.196.82.7] refused to talk to me: 421 Message from (XX.8.XX.30) temporarily deferred - 4.16.50. Please refer to http://help.yahoo.com/help/us/mail/defer/defer-06.html</div>
but accepts e-mail message by delay. Other sites do not.
please guide me.
Well, the Yahoo message is okay, they're probably greylisting you, which just means the message will go through later.
I poked around a little bit searching for ideas on what might cause that 421/timeout error, and came up with some interesting possibilities.
I first ran into it here:
http://nepbabu.livejournal.com/16663.html
Which led me to this Postfix FAQ:
(search for: Mail fails consistently with timeout or lost connection)
http://www.postfix.org/faq.html
Which would explain why you're seeing the issue in both Sendmail and Postfix. So, try finding the sysctl syntax to "disable path MTU discovery", and that might just do the trick
-Eric
Thank you, but please excuse me that I am really confused.
My problem is the same as "Matt Armstrong" in http://nepbabu.livejournal.com/16663.html. But how do I drop my routers MTU to 1492 promptly (as "Matt Armstrong" noted he has resolved the problem by this way)? I do not know what is it?
Please guide me.
There are two Configuration Items contain "mtu" when I type sysctl -A :
1)net.ipv4.ip_no_pmtu_disc = 0
2)net.ipv4.tcp_mtu_probing = 0
How do I change them?
Routers have a setting in them called an "MTU". He's just saying he made sure they were set no higher than 1492.
If you colocate your box, that may be a setting with your ISP/provider.
However, in the Postfix FAQ, it says that a "bandaid" for the problem is to use the "sysctl" command to "disable path MTU discovery" on your server.
I don't know the syntax off the top of my head, but I'm sure a Google search will lead you to how to do that.
-Eric
Thank you, I decide to send first item, but when I try to execute the below command :
<div class='quote'>echo "1" >/proc/sys/net/ipv4/ip_no_pmtu_disc</div>
it says :
<div class='quote'>-bash: /proc/sys/net/ipv4/ip_no_pmtu_disc: Operation not permitted</div>
Do you know why do I see this, I am logged in as root!
regards,
Anyway, thank you guys!
It is a BIG CLUE, I keep my GOOGLING to find a way!
THANKS
Try running:
sysctl -w net.ipv4.ip_no_pmtu_disc = 1
Thank you andreycheck & joe for your comments,
I have tried many ways to change the value of net.ipv4.ip_no_pmtu_disc but all return an error about permissions. Now I have contacted with provider and waiting for their answer. No hope.
regards,
Hi Guys,
After more researching on the web, the problem has been fixed. I update this thread to make a further reference and for those who may have a similar problem.
<b>Q: Why is it impossible to update the value of ip_no_pmtu_disc in sysctl (in my case)?</b>
<i>A: Because I am on VPS (virtual Private Server) and it is not allowed by default. (My researches showed to me that OpenVZ does not allow it)</i>
<b>Q: What was the problem really and how did I overcome the problem? </b>
<i>A: I am not expert but I would like to share my experience as a newbie. Actually the problem was where SendMail or Postfix were unable to send e-mail messages completely and in brief they did not finish the messages and sending tasks. While the remote servers were waiting for task completion but no thing were being done by our server. At last the remote servers were closing the connection (after no activity from our server). After researching on it I have found that it is related to MTU size. So I have changed the MTU size to 1000 and now Postfix works as a charm.</i>
I hope the problem does not come back. If it comes back, I will come back here. :-)
Please edit my post if it contains false info.
Thanks guys