Tag Archives: mail server
Hi,
today i received a complaint from a user, that was receiving bounced errors to the emails sent to the server. so looking at the server, i see something like this:
Nov 21 17:36:00 li72-241 amavis[18844]: (18844-01) (!!)TROUBLE in check_mail: parts_decode_ext FAILED: file(1) utility (/usr/bin/file) error: run_command (open pipe): Can’t fork at /usr/lib/perl/5.10/IO/File.pm line 66, <GEN33> line 71. at /usr/sbin/amavisd-new line 2892, <GEN33> line 71.
so looking at google for some clues, as i didn’t changed anything on the server, i saw that this is a memory/resources related problem, so making a cat under /proc/meminfo i saw that the physical memory was low and the swap memory was all occupied, so i upgraded the swap memory. upgrading the physical memory will do the same but in this case it cost money
Regards,
Shadow.
Related Post
Hi,
today a quick post, basically only to share this link that has been a great help to solve the bottleneck problem that could happen on postfix.
the bottleneck happen when the queue are stuck’s with too many request for some particular reason (like dictionary attacks or spam’s that make the active queue too busy) or something failed at processing the emails that put the request on incorrect queue.
as example, yesterday, for some reason clamav failed for lack of memory, something weird as the box have enough for everything (something that i need to look about) so, as result, the postfix failed at connect amavis, so the mail system but all the emails into deferred queue. after the restore of clamav, amavis and postifx, y run a postfix reload, that will run the cleanup daemon, to process all the emails that was on deferred and put them on the active queue.
you can diagnose this with the qshape tool, all explained on the link above, is a but difficult to understand at the beginning, but is really useful
i hope it help you in some way
Regards.
Related Post
Hi,
i’m still making server administration and a migration and i learned a few things that could help you at this matter
1) look for a tutorial that fit your needs
in my case i was needed to set up a mail server. the old server have used courier for imap and pop3 and exim for smtp. event that i tried to accomplish the same, some technical problems don’t let me to do it and i made several mistakes in the process. before you write any command on the console, make a deep research in what do you need and how you can accomplish it. in the net there are a lot of tutorial that will explain you step by step what is needed to do, just follow it and all will be fine
2) a postix with mysql is your best option
i need to say it, something that worried me was that maybe i will have performance problems using mysql with postfix and courier. really the server is do not have a high load in terms of mail but even if it have it, i will research to avoid it and still using mysql. the facility to make changes, as forwarders, accounts, and a lot of stuff worth any performance consumtion, more if you need to manage a lot of accounts.
3) if you have sendmail or exim, uninstall it before anything
postfix have their own sendmail command, so is a good action to uninstall any MTA that will not be used.
4) security and iptables
flush all iptables at the time of testing, so you don’t get anything blocked, and change the default port to others. when you finish, lock all the entrant and out traffic except the used port for your services. configure and use tls, even that is better that the user will be forced to use tls, maybe is a good option to leave both options enabled for the future.
5) commons errors
a list of commons errors you can find, usually you can get a very detailed log if you edit your master.cf and add a -v at the inet smtpd directive
/home/vmail/user is not found : that means that the directory where the user emails should be stored is empty, check it and create the correct directorie(s) (depend if you are using maildir and mailbox
invalid command : this is a esoteric error and depends a lot of the context it appear, is why the server don’t recognize the client command. could be a client error or a server misconfiguration (usually is problem of the server if you are using a popular client as thunderbird)
configure postfix to use it by PHP in the mail () function : this is something cost me to figure out, as screw up installing first postfix, and later exim and get replaced the sendmail command. for this, you should have correctly installed and configured postfix, and have the sendmail command available (if you get a command not found error, backup the config files and re-install it). to configure the php to use postfix, just edit your php.ini and set the sendmail_path = sendmail -t -i (like this, as is, whiteout a full path)
fail user authentication: if you set the -v flag, you should easily see where is the error, could be that the query’s set for postfix sasl are wrong, or the mysql user used to connect to the database is wrong, or the user data in the DB is wrong. remember that the password of the user should be encrypted, you can use the mysql function ENCRYPT for that (using phpmyadmin is very easy)
i hope this help you and save you some time in this matter





