Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 13th April 2008, 23:57
jasonwashere jasonwashere is offline
Junior Member
 
Join Date: Apr 2008
Location: Boise
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Default "-ERR chdir doamin.com/user/ failed" - Postfix, Courier And MySQL

Well ehlo to all that read this. I have been working on getting the HowtoForge setup @ http://howtoforge.com/virtual-users-...-mysql-fedora8
up and going and am pretty close but still not able to get it working.

Like the title suggests I am getting the error "-ERR chdir doamin.com/user/ failed" with the domain.com/user being the domain name and user name I am trying to login with when I make a pop3 connection to the server.

I have read thru some of the other articles relating to this error seeing that the main problem people are having is that they need to send an email to the user first to create the files/dir for the pop locker. I have done this a couple dozen times now and still do not get the email or a bounce or anything, the message disappears into the great unknown bit bucket.

So I dug thru the logs to try and see what was going on and it looks to me like, don't know if I'm right or not, that the emails are not getting past ClamAV
making it so the 1st email never shows up creating the mail directory for that user.

I came to this conclusion based on the following output from /var/log/maillog
---------------------------------------------------------------------

Apr 13 15:32:33 server1 postfix/smtp[2838]: 621C3F0172: to=<user@domain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=3302, delays=3295/0.02/0.01/7.8, ds
n=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451-4.5.0 Error in processing, id=02631-06, virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED
: ClamAV-clamd av-scanner FAILED: CODE(0x91d75ac) Too many retries to talk to /var/spool/amavisd/clamd.sock (Can't connect to UNIX socket /var/spool/amavisd/c
lamd.sock: No such file or directory) at (eval 57) line 310. at (eval 57) line 511.; ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan unexpected exit 50,
output="LibClamAV Warning: ************************************************** 451-4.5.0 LibClamAV Warning: *** The virus database is older than 7 days! ***
451-4.5.0 LibClamAV Warning: *** Please update it as soon as possible. *** 451-4.5.0 LibClamAV Warning: *************************************************
* 451-4.5.0 LibClamAV Error: cli_loaddb(): No supported database files found in /var/lib/clamav/main.inc 451 4.5.0 ERROR: Not supported data format" at (eval
57) line 511. (in reply to end of DATA command))

------------------------------------------------------------------
where to=<user@domain.com> in the above is the account I'm logging in as not actually user@domain.com.

I see there is two problems here:
/var/spool/amavisd/clamd.sock: No such file or directory &
No supported database files found in /var/lib/clamav/main.inc

I'm not to sure what to do at this point and seeing as how this is my 3rd attempt at getting a postfix server running I don't want to just go dinking around trying to get it to work so any ideas would be very much appreciated.

Thanks,
- Jason
Reply With Quote
Sponsored Links
  #2  
Old 14th April 2008, 05:02
jasonwashere jasonwashere is offline
Junior Member
 
Join Date: Apr 2008
Location: Boise
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Default Update

Despite the fact I said I did not want to tinker around with this anymore with out having a better idea of what I was doing I could not resist...again. Guess thats why I like Linux.

So I did some more research and found that if I comment out the line:
$inet_socket_port = 10024; # listen on this local TCP port(s)
found in:
/etc/amavisd/amavisd.conf
that the errors go away and get replaced with the error:
status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused
when trying to process an incoming SMTP connection.

Also I can't stop the service clamd.amavisd it always fails and when it starts it looks like it is starting twice after a reboot.

The boot looks like this:
starting clamd.amavisd: starting clamd.amvisd: [OK]
[OK]

I still don't really know what this means or what to do to fix this but thought the info would be helpful to anyone that might want to help out.

Thanks,
- Jason
Reply With Quote
  #3  
Old 14th April 2008, 06:23
zcworld zcworld is offline
Senior Member
 
Join Date: Jul 2006
Location: South Australia
Posts: 329
Thanks: 2
Thanked 37 Times in 37 Posts
Send a message via MSN to zcworld Send a message via Skype™ to zcworld
Default

i was having a problem like that

i just try another domain

and see if thats works

its a pain in the ass when u done it right and its errorrs up

try like moo.mo as an domain
and see if its works (add it to the domain and add users to it
send an email from that account wait 2 mins and check
__________________
Shane Ebert :: Facebok
Reply With Quote
The Following User Says Thank You to zcworld For This Useful Post:
jasonwashere (15th April 2008)
  #4  
Old 14th April 2008, 15:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Quote:
Originally Posted by jasonwashere
So I did some more research and found that if I comment out the line:
$inet_socket_port = 10024; # listen on this local TCP port(s)
found in:
/etc/amavisd/amavisd.conf
that the errors go away and get replaced with the error:
status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused
when trying to process an incoming SMTP connection.
Please uncomment that line again. Postfix tries to pass on emails to amavisd which is listening on port 10024. If you disable that line, emails will never get delivered.

What's in /etc/clamd.conf?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
jasonwashere (15th April 2008)
  #5  
Old 14th April 2008, 18:19
jasonwashere jasonwashere is offline
Junior Member
 
Join Date: Apr 2008
Location: Boise
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Default Update Du

Good Morning and Thanks for the replays guys.

Quote:
try like moo.mo as an domain
and see if its works (add it to the domain and add users to it
send an email from that account wait 2 mins and check
Hi zcworld,
I am guessing that you are talking about creating a new domain/user account in the MySQL database MAIL with the commands


INSERT INTO `users` (`email`, `password`, `quota`) VALUES ('myuser@mydomain.tld', ENCRYPT('mypassword'), 52428800);
INSERT INTO `domains` (`domain`) VALUES ('mydomain.tld');


If this is right I can do this, but I'll have to forward one of my other domains to point to my IP address first, which is more of a problem that it sounds like, in the middle of some hassles with my registrar and I'm not very good with using bind to create a local domain e.g. mydoamin.local but am willing to give it a try after classes today even though I have no understand of how this would help.

Quote:
What's in /etc/clamd.conf?
Hi Falko,
I do not have a /etc/clamd.conf or a clamd.conf anywhere on my system for that matter! Maybe this is my problem ehh?
I do have a /etc/clamd.d/amavisd.conf which contains the below.
LogSyslog yes
LogFacility LOG_MAIL
PidFile /var/run/amavisd/clamd.pid
FixStaleSocket yes
User amavis
LocalSocket /var/spool/amavisd/clamd.sock


I have to mention that I do not have a clamd.sock file either as listed on LocalSocket above but I do have a
/var/spool/amavisd/amavisd.sock file.

I tried creating the clamd.sock file and making it 777 and tried adding amavisd to the clamav group and vis versa all with no results.

I also have a /etc/freshclam.conf which looks like it needs to be configured still, has the example uncommented.

I re-uncommented the $inet_socket_port = 10024; # listen on this local TCP port(s) line. actually every time I try something that is mentioned in this thread and it does not solve the problem I change it back to how it was to keep form making a mess. the the int_socket the clamd.sock the group membership changes and anything else thus far have been set back to how they were at the end of the HowtoForge walk-thru document.

Thanks,
- Jason
Reply With Quote
  #6  
Old 15th April 2008, 01:01
jasonwashere jasonwashere is offline
Junior Member
 
Join Date: Apr 2008
Location: Boise
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Default Fixed

Well I got it to work finally. It seems strange to me that it works with out a calmd.sock file of a clamd.conf file but I am able to send and receive emails and it appears to be scanning them for spam and viruses, although I have not sent a test virus thru yet I see in the maillog that it is scanning them emails.

The fix was just commenting out the example line in the /etc/freshclam.conf file.
Makes me want to punch myself missing the vi /etc/freshclam.conf command in set 11 of the walk thru.

Any case I'm glad it is working now ever though I am missing the clamd.sock and .conf which still baffles me.

Thanks,
- Jason
Reply With Quote
  #7  
Old 28th April 2008, 07:19
c4rdinal c4rdinal is offline
Member
 
Join Date: Mar 2008
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I had the same problem. I wonder if u fixed the problem already.

I copied the following:
# cp /usr/share/doc/clamav-server-0.92.1/clamd.conf /etc/clamd.d/

so I can have clamd.conf but don't know where to go afterwards.

I want to integrate ASSP and ClamAV on my fedora machine but can't go further.

If you have any progress please let me know how to fix it. I had the same error.

Thanks.
Reply With Quote
  #8  
Old 28th April 2008, 08:44
jasonwashere jasonwashere is offline
Junior Member
 
Join Date: Apr 2008
Location: Boise
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
 
Default None

Hi c4rdinal,

Yeah the fix for me was just commenting out the Example line in the freshclam.conf file that I missed in step 11 of the walk thru. even without a clamd.sock or a clamd.conf the emails are being scanned and I sent a test virus thru and it caught it so everything seems to be working at least check.
I have not had much time to play around with it after getting it setup, finals are coming up soon, so I'm not too sure why it is working without the these files. Don't known if I mess up in the walk thru if there is errors in the walk thru, something to do with the platform or what but it seems that you do not even need the clamd.conf or .sock files but instead the amavisd.conf and .sock files???
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
-ERR chdir Maildir failed Virtual Users And Domains With Postfix, Courier And MySQL jacob Installation/Configuration 18 4th November 2008 13:22
Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 6.06 LTS) err hyperyoung Server Operation 7 7th March 2008 16:37
Upgrade question for "Virtual Users And Domains With Postfix, Courier And MySQL" emresumengen HOWTO-Related Questions 3 1st December 2006 15:33
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs k1piee HOWTO-Related Questions 14 1st October 2006 13:46
Virtual Users And Domains With Postfix, Courier And MySQL - "apt-get" and Courier burritonator HOWTO-Related Questions 3 15th March 2006 20:11


All times are GMT +2. The time now is 20:23.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.