Postfix - email getting delayed
I setup Postfix on a centos 6 box. First time I have used Postfix, usually use sendmail.
I set it up to forward all mail to an internal relay host. I just need it to send email for cron jobs that run and notify when an error happens. Every once in a while email might take up to 5 days to get from the box. I am able to test it and happens randomly. I look at /var/log/maillog but don't see any errors. I am not sure what is the best way to debug this? If anyone has any advice? Thanks |
Not much information to go on. Normally, Postfix will deliver immediately, unless there is a temporary error in which case the message will be "deferred" but still stay in the queue. Since you are able to test and see it happen, I would look for any such condition. I would also see if Postfix claims that there are messages in the queue and try to flush them and see what happens.
Can you post a log entry showing one that doesn't go through and one that does for comparison purposes? |
I should have corrected myself, it not something I can replicate easy, it seems to happen maybe once out of 100 emails sent from cron. For example I just checked que and it is empty.
I have the email that was received yesterday, and it shows that it was sent 3/29 @ 10 pm So I looked in /var/log/maillog-20120401 and could not find an exact mail at that time only thing was close was sent at 23:00 Mar 29 23:00:40 server1 postfix/smtp[23230]: 6E8D616179C: to=<user@test.com>, relay=smtp.test.com[192.168.1.1]:25, delay=0.09, delays=0.02/0.02/0.02/0.04, dsn=2.0.0, status=sent (250 2.0.0 q2TNmX8t013865 Message accepted for delivery) I am not sure if this even the email, since it only shows the to and from in the logs, is there a way to turn on more debugging information so would show maybe the subject? |
Quote:
|
Thanks I turned it on so far I found this:
warning: the Postfix sendmail command has set-uid root file permissions warning: or the command is run from a set-uid root process warning: the Postfix sendmail command must be installed without set-uid root file permissions I did a google search and looks like it is a bug with cron? Have you ever seen this? Thanks |
This is a first for me and it does raise a question: are the "delayed" mail all from a CRON task or does it happen with regular user mail?
To me these warnings sound more like a minor security issue than something that would cause mail to be delayed / deferred. |
Yes so far all the testing I have done is from cron jobs from a particular user.
|
Interesting. I wish I could offer your more specific advice at this point, but the best I have to offer at this time is to use the known facts as filters to try and sort through your mail logs. In addition to the general info log, a lot of times there is an error and warning log that might be of more value to you. In particular look for "deferred" or "reject" messages associated with this user.
|
Hi
You have to check number of the mail in "queue/deferred/active/hold/" number of smtp request & alos check the memory utilization & disk utilization #mailq |wc -l #qshap hold #qshape deferred #qshape active top & iostat check the disk i/o wait Postfix mainly utilized the memory so may you need to increase the memory but check all statics then go for that It also depend how many users you have in that postfix server some other parameter can change in that Just get all these statics & figure out where is the problem Also check the nice value of qmgr & postfix & can change to -10 |
Thanks for the help I meant to come back to this.
unfortunately whatever was happening has not replicated itself, and for the past week or so email is working right on the dot. I really don't know what happened. Thanks |
All times are GMT -5. The time now is 09:23 AM. |