Cannot get email

24 posts / 0 new
Last post
#1 Wed, 07/29/2009 - 02:10
everisk

Cannot get email

Hi,

I'm on Ubuntu version and I'm very new to Linux so please bear with me. It appears that I can send email out to local address (?) because I get Outlook test message in the mail box read from POSTFIX but cannot send out to outside address such as email@gmail.com.

I also cannot retrieve email with Outlook and on running check I get error at 'Log on to POP3.' I check in the mail log and it shows.

Jul 29 12:55:10 www dovecot: POP3(support.wise-hosting.net): mkdir(/var/lib/dovecot/index/support.wise-hosting.net/.INBOX) failed: Permission denied Jul 29 12:55:10 www dovecot: POP3(support.wise-hosting.net): mkdir(/var/lib/dovecot/control/support.wise-hosting.net/.INBOX) failed: Permission denied Jul 29 12:55:10 www dovecot: POP3(support.wise-hosting.net): mkdir(/var/lib/dovecot/index/support.wise-hosting.net/.INBOX) failed: Permission denied Jul 29 12:55:10 www dovecot: POP3(support.wise-hosting.net): mkdir(/var/lib/dovecot/control/support.wise-hosting.net/.INBOX) failed: Permission denied Jul 29 12:55:10 www dovecot: POP3(support.wise-hosting.net): Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2009-07-29 12:55:10] Jul 29 12:55:10 www dovecot: POP3(support.wise-hosting.net): Couldn't open INBOX top=0/0, retr=0/0, del=0/0, size=0 Jul 29 12:55:10 www dovecot: pop3-login: Login: user=<support.wise-hosting.net>, method=PLAIN, rip=125.25.93.62, lip=122.155.5.66, TLS

Another thing is that I have to uncheck 'My outgoing server (SMTP) requires authentication' to pass the SMTP test. What do i need to do the make sure that this has to be checked to prevent abuse of the system.

Thanks a lot!

Wed, 07/29/2009 - 09:12
andreychek

Howdy,

Which Ubuntu version are you using?

The problem you're seeing I believe was resolved in past versions of Virtualmin... but if you're using 9.04 (which isn't supported by the installer), that could cause a few issues :-)

Either way, to resolve that, what I would do is edit /etc/dovecot/dovecot.conf, and set the "mail_location" parameter to "mail_location = maildir:~/Maildir".

As far as checking "My outgoing server requires auth" -- you should be able to send an email to a user on your server without that being checked, so that much isn't a problem.

However, it should certainly work to check that. What error do you see in the mail.log whenever you try to authenticate for an outgoing message?

-Eric

Wed, 07/29/2009 - 09:51
ronald
ronald's picture

The SOA record is:
Primary nameserver: www.wise-hosting.net
Hostmaster E-mail address: root.www.wise-hosting.net

that doesn't sound too good. Something like ns1.wise-hosting.net as your hostname would be better. Or per haps ns5.wtmsys2.com but I don't see the relation from here.

Also there are no glue records, adding them would make things go more smoothly.
http://www.intodns.com/wise-hosting.net

Wed, 07/29/2009 - 11:08
everisk

Hi Eric and Ronald,

Thanks for the suggestion. I'm running Ubuntu 8.04.3 and Virtualmin 3.703. Should I update to see if it's fixed? I tried changing the mail location but still error. Below is the last 50 lines of the mail log. I'm seeing different error messages from before but not sure if it's because I use Outlook 2007 to test now and Outlook 2007 earlier.

This is like my 3rd time I have to do a clean install on my server in attempt to get the mail function to work :(


Jul 29 22:55:55 www dovecot: pop3-login: Disconnected: rip=125.25.131.159, lip=122.155.5.66
Jul 29 22:56:01 www dovecot: pop3-login: Disconnected: rip=125.25.131.159, lip=122.155.5.66
Jul 29 22:56:02 www postfix/smtpd[31791]: connect from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]
Jul 29 22:56:02 www postfix/smtpd[31791]: warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied
Jul 29 22:56:02 www postfix/smtpd[31791]: warning: 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]: SASL LOGIN authentication failed: generic failure
Jul 29 22:56:03 www postfix/smtpd[31791]: lost connection after AUTH from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]
Jul 29 22:56:03 www postfix/smtpd[31791]: disconnect from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]
Jul 29 22:56:15 www dovecot: pop3-login: Disconnected: rip=125.25.131.159, lip=122.155.5.66
Jul 29 22:56:17 www postfix/smtpd[31791]: connect from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]
Jul 29 22:56:17 www postfix/smtpd[31791]: warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied
Jul 29 22:56:17 www postfix/smtpd[31791]: warning: 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]: SASL LOGIN authentication failed: generic failure
Jul 29 22:56:17 www postfix/smtpd[31791]: lost connection after AUTH from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]
Jul 29 22:56:17 www postfix/smtpd[31791]: disconnect from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]
Jul 29 22:56:35 www dovecot: pop3-login: Aborted login (0 authentication attempts): rip=125.25.131.159, lip=122.155.5.66
Jul 29 22:56:35 www postfix/smtpd[31791]: connect from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]
Jul 29 22:56:35 www postfix/smtpd[31791]: lost connection after EHLO from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]
Jul 29 22:56:35 www postfix/smtpd[31791]: disconnect from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]
Jul 29 22:57:28 www spamd[31677]: prefork: sysread(9) failed after 300 secs at /usr/share/perl5/Mail/SpamAssassin/SpamdForkScaling.pm line 648.
Jul 29 22:57:28 www spamd[18386]: prefork: child states: II
Jul 29 22:57:28 www spamd[18386]: spamd: handled cleanup of child pid 31677 due to SIGCHLD
Jul 29 22:57:28 www spamd[18386]: spamd: server successfully spawned child process, pid 31825
Jul 29 22:57:28 www spamd[18386]: prefork: child states: II
Jul 29 22:58:06 www dovecot: pop3-login: Disconnected: rip=125.25.131.159, lip=122.155.5.66
Jul 29 22:58:14 www last message repeated 2 times
Jul 29 22:58:16 www postfix/smtpd[31829]: connect from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]
Jul 29 22:58:16 www postgrey[20187]: action=greylist, reason=early-retry (138s missing), client_name=125.25.131.159.adsl.dynamic.totbb.net, client_address=125.25.131.159, sender=support@wise-hosting.net, recipient=support@wise-hosting.net
Jul 29 22:58:16 www postfix/smtpd[31829]: NOQUEUE: reject: RCPT from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]: 450 4.2.0 : Recipient address rejected: Greylisted, see http://postgrey.schweikert.ch/help/wise-hosting.net.html; from= to= proto=ESMTP helo=
Jul 29 22:58:16 www postfix/smtpd[31829]: lost connection after RCPT from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]
Jul 29 22:58:16 www postfix/smtpd[31829]: disconnect from 125.25.131.159.adsl.dynamic.totbb.net[125.25.131.159]
Jul 29 22:59:00 www spamd[31710]: prefork: sysread(9) failed after 300 secs at /usr/share/perl5/Mail/SpamAssassin/SpamdForkScaling.pm line 648.
Jul 29 22:59:00 www spamd[18386]: prefork: child states: II
Jul 29 22:59:00 www spamd[18386]: spamd: handled cleanup of child pid 31710 due to SIGCHLD
Jul 29 22:59:00 www spamd[18386]: spamd: server successfully spawned child process, pid 31840
Jul 29 22:59:00 www spamd[18386]: prefork: child states: II
Jul 29 23:00:23 www postfix/postfix-script[32000]: warning: /var/spool/postfix/etc/nsswitch.conf and /etc/nsswitch.conf differ
Jul 29 23:00:23 www postfix/postfix-script[32003]: warning: /var/spool/postfix/etc/resolv.conf and /etc/resolv.conf differ
Jul 29 23:00:23 www postfix/postfix-script[32005]: warning: /var/spool/postfix/etc/localtime and /etc/localtime differ
Jul 29 23:01:36 www postfix/anvil[31793]: statistics: max connection rate 3/60s for (smtp:125.25.131.159) at Jul 29 11:56:17
Jul 29 23:01:36 www postfix/anvil[31793]: statistics: max connection count 1 for (smtp:125.25.131.159) at Jul 29 11:55:34
Jul 29 23:01:36 www postfix/anvil[31793]: statistics: max cache size 1 at Jul 29 11:55:34
Jul 29 23:02:29 www spamd[31825]: prefork: sysread(9) failed after 300 secs at /usr/share/perl5/Mail/SpamAssassin/SpamdForkScaling.pm line 648.
Jul 29 23:02:29 www spamd[18386]: prefork: child states: II
Jul 29 23:02:29 www spamd[18386]: spamd: handled cleanup of child pid 31825 due to SIGCHLD
Jul 29 23:02:29 www spamd[18386]: spamd: server successfully spawned child process, pid 32064
Jul 29 23:02:29 www spamd[18386]: prefork: child states: II
Jul 29 23:04:01 www spamd[31840]: prefork: sysread(9) failed after 300 secs at /usr/share/perl5/Mail/SpamAssassin/SpamdForkScaling.pm line 648.
Jul 29 23:04:01 www spamd[18386]: prefork: child states: II
Jul 29 23:04:01 www spamd[18386]: spamd: handled cleanup of child pid 31840 due to SIGCHLD
Jul 29 23:04:01 www spamd[18386]: spamd: server successfully spawned child process, pid 32065
Jul 29 23:04:01 www spamd[18386]: prefork: child states: II

Wed, 07/29/2009 - 13:25
andreychek

Howdy,

Try restarting both Dovecot and Postfix, just to make extra sure all the settings are at their post recent versions:

/etc/init.d/postfix restart
/etc/init.d/dovecot restart

If that doesn't help, we can work from there :-)

There's no need to re-install though, those are all fixable issues :-)

-Eric

Wed, 07/29/2009 - 22:12
everisk

Still doesn't work :( I feel like Outlook 2007 and Outlook 2003 are generating different errors because now i got the "mkdir(/var/lib/dovecot/control/support.wise-hosting.net/.INBOX) failed:" error but it was gone last night when i used Outlook 2007 to test. Will it help if i post both dovecot and postfix config file? (not sure if it has any security issues though).

Wed, 07/29/2009 - 22:55
andreychek

Okay -- what does this command show:

grep mail_location /etc/dovecot/dovecot.conf

Something seems to be awry with that option...

-Eric

Thu, 07/30/2009 - 06:00
everisk

It shows ..


# path given in the mail_location setting.
mail_location = maildir:~/Maildir
# mail_location = mbox:~/mail:INBOX=/var/mail/%u
# mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
#mail_location =
mail_location = maildir:~/Maildir:mbox:~/mail/:INDEX=/var/lib/dovecot/index/%u:CONTROL=/var/lib/dovecot/control/%u
# namespaces completely, they use only the mail_location setting.
# explicitly, ie. mail_location does nothing unless you have a namespace
# mail_location, which is also the default for it.
# converted to destination storage (mail_location) when the user logs in.

Thu, 07/30/2009 - 09:03
andreychek

Ahh, do you need to comment out the one that's already in there before adding in the one that I mentioned :-)

After doing that, restart Dovecot, and that should hopefully fix up your issue.

-Eric

Thu, 07/30/2009 - 09:22
everisk

ohhHh that was stupid of me :( I didn't look through the config file and just jump to uncomment the line. Sorry~ But still it doesn't work. Outlook says the server doesn't accept my username and password while I know that it is correct.


Jul 30 21:17:15 www dovecot: pop3-login: Disconnected: rip=125.25.108.230, lip=122.155.5.66
Jul 30 21:17:25 www postfix/smtpd[7197]: connect from 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]
Jul 30 21:17:33 www postfix/smtpd[7197]: warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied
Jul 30 21:17:33 www postfix/smtpd[7197]: warning: 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]: SASL LOGIN authentication failed: generic failure
Jul 30 21:17:33 www postfix/smtpd[7197]: lost connection after AUTH from 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]
Jul 30 21:17:33 www postfix/smtpd[7197]: disconnect from 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]
Jul 30 21:17:42 www postfix/smtpd[7197]: connect from 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]
Jul 30 21:17:42 www postfix/smtpd[7197]: warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied
Jul 30 21:17:42 www postfix/smtpd[7197]: warning: 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]: SASL LOGIN authentication failed: generic failure
Jul 30 21:17:42 www postfix/smtpd[7197]: lost connection after AUTH from 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]
Jul 30 21:17:42 www postfix/smtpd[7197]: disconnect from 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]
Jul 30 21:17:42 www dovecot: pop3-login: Disconnected: rip=125.25.108.230, lip=122.155.5.66
Jul 30 21:17:45 www postfix/smtpd[7197]: connect from 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]
Jul 30 21:17:48 www postfix/smtpd[7197]: lost connection after EHLO from 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]
Jul 30 21:17:48 www postfix/smtpd[7197]: disconnect from 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]
Jul 30 21:17:52 www postfix/smtpd[7197]: connect from 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]
Jul 30 21:17:52 www postgrey[20187]: action=pass, reason=triplet found, client_name=125.25.108.230.adsl.dynamic.totbb.net, client_address=125.25.108.230, sender=support@wise-hosting.net, recipient=support@wise-hosting.net
Jul 30 21:17:52 www postfix/smtpd[7197]: E7F5D54613A: client=125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]
Jul 30 21:17:54 www postfix/cleanup[7201]: E7F5D54613A: message-id=<20090730141752.E7F5D54613A@www.wise-hosting.net>
Jul 30 21:17:54 www postfix/qmgr[20422]: E7F5D54613A: from=, size=714, nrcpt=1 (queue active)
Jul 30 21:17:54 www postfix/trivial-rewrite[7219]: warning: do not list domain wise-hosting.net in BOTH mydestination and virtual_alias_domains
Jul 30 21:17:54 www postfix/smtpd[7197]: disconnect from 125.25.108.230.adsl.dynamic.totbb.net[125.25.108.230]
Jul 30 21:17:54 www dovecot: pop3-login: Disconnected: rip=125.25.108.230, lip=122.155.5.66
Jul 30 21:17:55 www spamd[32064]: spamd: connection from localhost [127.0.0.1] at port 37432
Jul 30 21:17:55 www spamd[32064]: spamd: setuid to support.wise-hosting.net succeeded
Jul 30 21:17:55 www spamd[32064]: spamd: processing message <20090730141752.E7F5D54613A@www.wise-hosting.net> for support.wise-hosting.net:1002
Jul 30 21:17:56 www spamd[32064]: spamd: clean message (2.4/5.0) for support.wise-hosting.net:1002 in 0.4 seconds, 890 bytes.
Jul 30 21:17:56 www spamd[32064]: spamd: result: . 2 - AWL,RCVD_IN_PBL,RDNS_DYNAMIC,SPF_NEUTRAL scantime=0.4,size=890,user=support.wise-hosting.net,uid=1002,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=37432,mid=<20090730141752.E7F5D54613A@www.wise-hosting.net>,autolearn=no
Jul 30 21:17:56 www postfix/local[7202]: E7F5D54613A: to=, orig_to=, relay=local, delay=3.4, delays=1.2/0/0/2.3, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Jul 30 21:17:56 www postfix/qmgr[20422]: E7F5D54613A: removed
Jul 30 21:17:56 www spamd[18386]: prefork: child states: II
Jul 30 21:18:00 www dovecot: pop3-login: Disconnected: rip=125.25.108.230, lip=122.155.5.66
Jul 30 21:18:00 www postfix/postfix-script[7291]: warning: /var/spool/postfix/etc/nsswitch.conf and /etc/nsswitch.conf differ
Jul 30 21:18:00 www postfix/postfix-script[7294]: warning: /var/spool/postfix/etc/resolv.conf and /etc/resolv.conf differ
Jul 30 21:18:00 www postfix/postfix-script[7296]: warning: /var/spool/postfix/etc/localtime and /etc/localtime differ

Thu, 07/30/2009 - 18:32
andreychek

Okay, sounds like we're getting closer!

You have a different error now:

warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied

There's a handful of problems that can cause that.

I'm going to take a guess that it's not able to read the dir saslauthd is using... to fix that, I'd make sure that postfix is in the sasl group by running this:

usermod -a -G sasl postfix

And then restart saslauthd by running: /etc/init.d/saslauthd restart

Thu, 07/30/2009 - 21:04
everisk

It does look like we are getting closer! But now I cannot send test message from Outlook anymore :( Not sure if it has anything to do with greylisting or not.

From the log it looks like dovecot just disconnect when i try to connect to the server? I also get greylisted (how do I turn this off?). Thanks a ton!


Jul 31 08:42:40 www dovecot: pop3-login: Disconnected: rip=125.25.102.81, lip=122.155.5.66
Jul 31 08:45:52 www dovecot: pop3-login: Disconnected: rip=125.25.102.81, lip=122.155.5.66
Jul 31 08:58:31 www postfix/smtpd[24832]: connect from 125.25.102.81.adsl.dynamic.totbb.net[125.25.102.81]
Jul 31 08:58:31 www postfix/trivial-rewrite[24835]: warning: do not list domain wise-hosting.net in BOTH mydestination and virtual_alias_domains
Jul 31 08:58:31 www postgrey[20187]: action=greylist, reason=new, client_name=125.25.102.81.adsl.dynamic.totbb.net, client_address=125.25.102.81, sender=support@wise-hosting.net, recipient=support@wise-hosting.net
Jul 31 08:58:31 www postgrey[20187]: cleaning up old logs...
Jul 31 08:58:31 www postfix/smtpd[24832]: NOQUEUE: reject: RCPT from 125.25.102.81.adsl.dynamic.totbb.net[125.25.102.81]: 450 4.2.0 : Recipient address rejected: Greylisted, see http://postgrey.schweikert.ch/help/wise-hosting.net.html; from= to= proto=SMTP helo=
Jul 31 08:58:31 www postfix/smtpd[24832]: disconnect from 125.25.102.81.adsl.dynamic.totbb.net[125.25.102.81]
Jul 31 08:58:31 www dovecot: pop3-login: Disconnected: rip=125.25.102.81, lip=122.155.5.66
Jul 31 08:58:37 www dovecot: pop3-login: Disconnected: rip=125.25.102.81, lip=122.155.5.66
Jul 31 08:58:38 www postfix/smtpd[24832]: connect from 125.25.102.81.adsl.dynamic.totbb.net[125.25.102.81]
Jul 31 08:58:38 www postgrey[20187]: action=greylist, reason=early-retry (293s missing), client_name=125.25.102.81.adsl.dynamic.totbb.net, client_address=125.25.102.81, sender=support@wise-hosting.net, recipient=support@wise-hosting.net
Jul 31 08:58:38 www postfix/smtpd[24832]: NOQUEUE: reject: RCPT from 125.25.102.81.adsl.dynamic.totbb.net[125.25.102.81]: 450 4.2.0 : Recipient address rejected: Greylisted, see http://postgrey.schweikert.ch/help/wise-hosting.net.html; from= to= proto=SMTP helo=
Jul 31 08:58:38 www postfix/smtpd[24832]: disconnect from 125.25.102.81.adsl.dynamic.totbb.net[125.25.102.81]

Thu, 07/30/2009 - 21:12
everisk

Oh found where to disable greylisting. :) And now can send testmessage.

Thu, 07/30/2009 - 23:06
andreychek

Howdy,

Well, in theory, the greylisting shouldn't block you if you've authenticated outgoing SMTP; however, if it's working for you, that's certainly good news ;-)

But, I'd double-check in your email client that outgoing SMTP is actually set to authenticate (some clients don't do that by default).

Have a good one,

-Eric

Fri, 07/31/2009 - 03:51
everisk

The strangest thing is that i have to NOT check the outgoing SMTP authentication in order to get the test message. I'd like to fix this issue too :( .. Is there any one or any service I can purchase to get this look at? I dont want to have the wrong config and have my mail server on open relay :( Thanks!

Fri, 07/31/2009 - 08:41
andreychek

Howdy,

You shouldn't have to authenticate to send a message directly to the server (every computer on the Internet can do that, and you want them to -- it's how email gets delivered).

You should only have to authenticate to relay email through that server to another server.

I don't think you're an open relay, that's a normal configuration you're seeing there ;-)

-Eric

Fri, 07/31/2009 - 10:37
everisk

Oh that's good to hear that I'm not on open relay, but still I cannot download the email messages. Look like Dovecot always disconnect whenever I try to connect to it. :(

Fri, 07/31/2009 - 10:40
andreychek

Hmm... does Usermin or any other web client work for you?

-Eric

Fri, 07/31/2009 - 11:09
everisk

Yep, I can log in Usermin and see all the emails.

Sun, 08/02/2009 - 05:36
everisk

After some more review i feel like it has something to do with 'Data source for users, homes and IDs' field in Dovecot. It is now set to "Standard Unix user database" Is this should be the case. When I create Mail user in Virtual min that user gets added to Unix user database automatically? Or is there any options I have to set. Thanks!

Sun, 08/02/2009 - 20:19
andreychek

Yeah, the user should be added to /etc/passwd whenever you create a new user in Virtualmin.

However, that much sounds like it's working right if you can log in via Usermin.

Just for fun, what happens if you connect via IMAP rather than POP?

-Eric

Sun, 08/02/2009 - 21:27
everisk

I got it working now! :) I dont remember what I did but now it's working with SMTP-AUTH. Thanks for your help!

Another unrelated question, when setting a disk space quota for a virtual server, does logs count towards that? I see that awstats logs are in user home directory. If that is the case, how to make it NOT count towards the quota?

Also, how to view awstats from browsers? I couldn't view it with /awstats/ because the folder is outside of public_html.

Many thanks!

Mon, 08/03/2009 - 09:55
andreychek

Howdy,

I see that awstats logs are in user home directory. If that is the case, how to make it NOT count towards the quota?

Yes, all files owned by the user are counted against the quota. You may be able to look into changing what user owns the logs -- but the simplest solution would probably be just to bump up the quota a few MB's to account for the logfiles :-)

how to view awstats from browsers? I couldn't view it with /awstats/ because the folder is outside of public_html.

The awstats.pl program is added to cgi-bin -- so you can browse to this URL:

http://yourdomain.com/cgi-bin/awstats.pl

Tue, 08/04/2009 - 00:46
everisk

Thank for all your help, Eric!

Topic locked