View previous topic :: View next topic |
Author |
Message |
MasquedAvenger Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/25491636041f08a8a11be0.gif)
Joined: 21 Aug 2003 Posts: 559 Location: Southern California
|
Posted: Fri Mar 09, 2007 8:33 pm Post subject: Problems with Postfix and Amavisd-new [SOLVED] |
|
|
Hey everyone. I've had a setup that's been working for months. Just today, I noticed that I wasn't getting any mail, so I checked the logs and found lots of things like this:
Code: |
Mar 9 12:26:31 colannino postfix/smtpd[20257]: connect from unknown[195.46.100.239]
Mar 9 12:26:36 colannino postfix/smtpd[20257]: 34C7D198B1: client=unknown[195.46.100.239]
Mar 9 12:26:37 colannino postfix/cleanup[20261]: 34C7D198B1: message-id=<01c76289$9dacfd30$6c822ecf@anton>
Mar 9 12:26:42 colannino postfix/qmgr[20246]: 34C7D198B1: from=<anton@westlab.com>, size=23538, nrcpt=1 (queue active)
Mar 9 12:26:42 colannino postfix/qmgr[20246]: 34C7D198B1: to=<david@colannino.org>, relay=none, delay=6.2, delays=6.2/0.01/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
|
My setup has been working for months, so I have no idea what's going on. No configuration files have changed. Amavis seems to be running just fine. So does Postfix. I've tried re-merging these two things, just to see what happens, but no luck.
I have no idea what's going on and meanwhile my postfix queue is building up Does anybody have any ideas as to what could be causing the problem? Postfix sends mail to amavisd-new for content filtering.
James _________________ "There are no uninteresting things; only uninterested people." --G.K. Chesterton
Last edited by MasquedAvenger on Fri Mar 09, 2007 8:43 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
MasquedAvenger Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/25491636041f08a8a11be0.gif)
Joined: 21 Aug 2003 Posts: 559 Location: Southern California
|
Posted: Fri Mar 09, 2007 8:43 pm Post subject: |
|
|
I fixed the problem. Apparently, there were too many files in /var/amavis/tmp (so that the filesystem could no longer save additional files in that directory), and so amavis couldn't do its work and thus postfix complained.
James _________________ "There are no uninteresting things; only uninterested people." --G.K. Chesterton |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
senduran n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 05 Aug 2005 Posts: 71
|
Posted: Tue Apr 03, 2007 7:22 pm Post subject: |
|
|
MasquedAvenger wrote: | I fixed the problem. Apparently, there were too many files in /var/amavis/tmp (so that the filesystem could no longer save additional files in that directory), and so amavis couldn't do its work and thus postfix complained.
James |
I suffered from the same problem. What are all those tmp directories used for? Is it safe just to delete them all? Right now I've just moved tmp to tmp_old and re-created a new tmp directory. I'm now able to get new emails, but I don't have the ones that were 'suspended' in their delivery. Will they eventually emerge from some queue, or were they actually all stored in that tmp directory? If so, how do I recover them?
Also, why does this happen, and how do you stop it happening in the future? (Why are so many tmp dirs getting made and not deleted?) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
MasquedAvenger Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/25491636041f08a8a11be0.gif)
Joined: 21 Aug 2003 Posts: 559 Location: Southern California
|
Posted: Tue Apr 03, 2007 8:19 pm Post subject: |
|
|
lol I just replied to your PM, and then I realized you also posted the same question here When you see this, cut and paste the response I sent you so others can benefit from it too
Good luck.
James _________________ "There are no uninteresting things; only uninterested people." --G.K. Chesterton |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
senduran n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 05 Aug 2005 Posts: 71
|
Posted: Wed Apr 04, 2007 8:44 am Post subject: |
|
|
MasquedAvenger wrote: | lol I just replied to your PM, and then I realized you also posted the same question here When you see this, cut and paste the response I sent you so others can benefit from it too
|
Yeah, sorry about that.
MasquedAvenger wrote: | Quote: |
I suffered from the same problem. What are all those tmp directories used for? Is it safe just to delete them all? Right now I've just moved tmp to tmp_old and re-created a new tmp directory. I'm now able to get new emails, but I don't have the ones that were 'suspended' in their delivery. Will they eventually emerge from some queue, or were they actually all stored in that tmp directory? If so, how do I recover them?
Also, why does this happen, and how do you stop it happening in the future? (Why are so many tmp dirs getting made and not deleted?)
|
That is in fact where the mail is stored. I don't know what would happen after you've moved your tmp directory, but I'd imagine that if you moved all those messages back you'd eventually get your emails delivered (just a guess though.) It usually takes me about an entire day for amavis to catch up when I've had mail backlogging like that, so you'll have to be patient. Once you're sure all your mail's been delivered, then you can delete all the messages in that directory. I've found that once a message gets stuck in the amavis queue, it still tends to stay there even after it's been delivered (in fact, I had another problem just like this that turned out to be because the maximum number of inodes for that directory were used up, so I had to delete a bunch of messages which turned out to have been delivered a long time ago but stayed behind in the amavis queue, so watch out for that too; if the number of messages in that directory turns out to be so large that when you do an 'ls *' it says argument list too long, you know you're headed in the red zone
Your mail could also be stored in the Postfix queue if amavis isn't even taking messages, but with the problem we're having it'll be in the amavis queue (just letting you know in case you ever have other problems and wonder where your mail is being kept.) What happens is that if amavis refuses to process the mail at all (or it's not listening on the port where postfix expects to find it), it sits in the Postfix queue. If Postfix can pass it off to amavis, but amavis then has a problem, then they're stored in /var/amavis/tmp pending later delivery.
I've had TONS of obscure problems with my mail server over the past few months, so if you ever have any other questions, feel free to send me another PM
James |
Thanks for the help, though now I'm even more confused. I really don't know enough about how this all works. Anyway, what's actually happened is that I still have all that stuff in tmp_old and never moved any of it to my new (empty) tmp directory, but I've been gradually getting the emails I expected to get from the past few days when things were queueing up.
As it turns out, most of the emails in my tmp_old seem to be addressed to amavis@mydomain, being cron failure reports because of a typo in one of amavis's cron jobs. I don't think I've set up the amavis user to have a normal email account, so all those were getting undelivered. Maybe that's why they built up. Why it would happen suddenly on one particular day I don't know.
...
Actually, "Your mail could also be stored in the Postfix queue if amavis isn't even taking messages" makes sense, but not your conclusion ("it'll be in the amavis queue"): if the problem is the directory getting too full then amavis can't queue it so it remains in the Postfix queue.
I consider this 'solved' for me as well. Thanks again. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
MasquedAvenger Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/25491636041f08a8a11be0.gif)
Joined: 21 Aug 2003 Posts: 559 Location: Southern California
|
Posted: Wed Apr 04, 2007 9:47 am Post subject: |
|
|
Hmm... well then, I guess it must've been in the Postfix queue (otherwise all that mail wouldn'tve been delivered.) Sorry for the confusion
James _________________ "There are no uninteresting things; only uninterested people." --G.K. Chesterton |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|