Welcome, Guest. Please login or register.
Did you miss your activation email?
September 04, 2010, 04:29:16 am
Home Help Search Login Register

SysCP Forum  |  SysCP Discussions  |  English Discussions  |  Topic: mail not working after standard installation 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: mail not working after standard installation  (Read 3961 times)
guti
Jr. Member
**
Offline Offline

Posts: 68


« on: September 12, 2006, 12:06:28 pm »

First the problem I am having: I cannot login with POP3 to fetch email, "login failed" is the error message. Incoming e-mails appear to not get delivered, as the maildirs stay empty. E-Mail forwarding works, but sender still gets a bounce message. (SMTP authentication is not working either, so relaying doesn't work, but I wil tackle this one later).

This is what I did:
I installed SysCp on my Debian Sarge system using the .deb packages. I also installed all other required .deb packages, so Postfix and Courier were fresh installations with no prior configuration done.
Then I followed the "Basic Installtion" HowTo from the SysCp web site (http://www.syscp.de/wiki/docs/Installation/basic).

The SysCp web interface works fine. When I create new users via the web interface they can create e-mail addresses and these are added correctly to the syscp MySQL database. In /var/kunden/mail a directory for each user gets created, but stays empty, even if I send e-mail to the user. These e-mails bounce.

Here is what /var/log/syslog says:

Quote
Sep 12 12:26:06 localhost postfix/smtpd[4119]: unable to get certificate from '/path/to/smtpd.pem'
Sep 12 12:26:06 localhost postfix/smtpd[4119]: 4119:error:02001002:system library:fopen:No such file or directory:bss_file.c:278:fop
en('/path/to/smtpd.pem','r'):
Sep 12 12:26:06 localhost postfix/smtpd[4119]: 4119:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:280:
Sep 12 12:26:06 localhost postfix/smtpd[4119]: 4119:error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:ssl_rs
a.c:760:
Sep 12 12:26:06 localhost postfix/smtpd[4119]: TLS engine: cannot load RSA cert/key data
Sep 12 12:26:07 localhost postfix/smtpd[4121]: unable to get certificate from '/path/to/smtpd.pem'
Sep 12 12:26:07 localhost postfix/smtpd[4121]: 4121:error:02001002:system library:fopen:No such file or directory:bss_file.c:278:fop
en('/path/to/smtpd.pem','r'):
Sep 12 12:26:07 localhost postfix/smtpd[4121]: 4121:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:280:
Sep 12 12:26:07 localhost postfix/smtpd[4121]: 4121:error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:ssl_rs
a.c:760:
Sep 12 12:26:07 localhost postfix/smtpd[4121]: TLS engine: cannot load RSA cert/key data
Sep 12 12:26:09 localhost postfix/smtpd[4121]: connect from gd-austria.com[81.169.155.169]
Sep 12 12:26:09 localhost postfix/smtpd[4119]: connect from gd-austria.com[81.169.155.169]
Sep 12 12:26:09 localhost postfix/trivial-rewrite[4122]: warning: do not list domain example.com in BOTH mydestination and vi
rtual_mailbox_domains
Sep 12 12:26:09 localhost postfix/trivial-rewrite[4122]: warning: do not list domain example.com in BOTH mydestination and virtual_
mailbox_domains
Sep 12 12:26:09 localhost postfix/smtpd[4121]: 873ED240275: client=gd-austria.com[81.169.155.169]
Sep 12 12:26:09 localhost postfix/smtpd[4119]: 88583240276: client=gd-austria.com[81.169.155.169]
Sep 12 12:26:09 localhost postfix/cleanup[4125]: 873ED240275: message-id=<785580089.20060912122655@example.com>
Sep 12 12:26:09 localhost postfix/cleanup[4127]: 88583240276: message-id=<785580089.20060912122655@example.com>
Sep 12 12:26:09 localhost postfix/smtpd[4121]: disconnect from gd-austria.com[81.169.155.169]
Sep 12 12:26:09 localhost postfix/qmgr[2281]: 873ED240275: from=<user@example.com>, size=781, nrcpt=1 (queue active)
Sep 12 12:26:09 localhost postfix/local[4130]: 873ED240275: to=<otheruser@example.com>, relay=local, delay=0, status=sent (deliver
ed to mailbox)
Sep 12 12:26:09 localhost postfix/smtpd[4119]: disconnect from gd-austria.com[81.169.155.169]
Sep 12 12:26:09 localhost postfix/qmgr[2281]: 88583240276: from=<user@example.com>, size=774, nrcpt=2 (queue active)
Sep 12 12:26:09 localhost postfix/trivial-rewrite[4122]: warning: do not list domain example.com in BOTH mydestination and virtual_
mailbox_domains
Sep 12 12:26:09 localhost postfix/qmgr[2281]: 873ED240275: removed
Sep 12 12:26:09 localhost postfix/local[4130]: 88583240276: to=<user@example.com>, orig_to=<us@example.com>, relay=local, de
lay=0, status=bounced (unknown user: "sebastian")
Sep 12 12:33:20 localhost courierpop3login: Connection, ip=[::ffff:87.123.24.69]
Sep 12 12:33:25 localhost courierpop3login: LOGIN FAILED, ip=[::ffff:87.123.24.69]


I'm ignoring the TLS complaints so far, as I will worry about encryption and a certificate later, once unencrypted mail transfer works.

It's especially the last lines that worry me: the user user@example.com was created successfully with SysCP and exists in the MySQL database. I can manually connect to this database with the MySQL user "syscp" and the appropriate password, just like I entered them into /etc/courier/authmysqlrc.

What I don't understand either is that for the e-mail to "otheruser@example.com" it says "delivered to mailbox": The directory /var/kunden/mail/yabe is empty!

Your help will be kindly appreciated.

EDIT BY FLO: Anonymized email addresses as requested by guti
« Last Edit: October 06, 2007, 04:43:48 pm by Flo » Logged
duergner
Hero Member
*****
Offline Offline

Posts: 1778


WWW
« Reply #1 on: September 12, 2006, 02:24:46 pm »

Quote
Sep 12 12:26:09 localhost postfix/trivial-rewrite[4122]: warning: do not list domain yabe.kicks-ass.net in BOTH mydestination and vi
rtual_mailbox_domains
Sep 12 12:26:09 localhost postfix/trivial-rewrite[4122]: warning: do not list domain arkadien.org in BOTH mydestination and virtual_
mailbox_domains

Search for that in the forums. We had this a couple of times!

I'm ignoring the TLS complaints so far, as I will worry about encryption and a certificate later, once unencrypted mail transfer works.

Remove TLS stuff until you got the rest working.
Logged

Der kleine, aber feine Unterschied: unter Windows muss man als root, damit alles laeuft. Unter Linux darf man nicht als root, weil sonst nicht alles laeuft.
-Urs Traenker in dcsf-
guti
Jr. Member
**
Offline Offline

Posts: 68


« Reply #2 on: September 12, 2006, 09:37:43 pm »

Ok, I put another domain into main.cf and the error messages you quoted disappered.

But I think that's not related to the problem that mail doesn't get delivered (mail directories are compeltely empty) and that I can't connect using POP3. Just tried it again, here the error messages:

Quote
Sep 12 22:12:27 localhost postfix/smtpd[2475]: connect from mail.gmx.de[213.165.64.20]
Sep 12 22:12:27 localhost postfix/smtpd[2475]: 2EDD2240276: client=mail.gmx.de[213.165.64.20]
Sep 12 22:12:27 localhost postfix/cleanup[2480]: 2EDD2240276: message-id=<1307681089.20060912221315@gmx.de>
Sep 12 22:12:27 localhost postfix/qmgr[2283]: 2EDD2240276: from=<someone@example.com>, size=797, nrcpt=1 (queue active)
Sep 12 22:12:27 localhost postfix/smtpd[2475]: disconnect from mail.gmx.de[213.165.64.20]
Sep 12 22:12:27 localhost postfix/virtual[2482]: 2EDD2240276: to=<otheruser@example.com>, relay=virtual, delay=0, status=deferred
(recipient yabe@yabe.kicks-ass.net: bad uid 99 in virtual_uid_maps)

and

Quote
Sep 12 22:26:30 localhost courierpop3login: Connection, ip=[::ffff:87.123.51.137]
Sep 12 22:26:35 localhost courierpop3login: LOGIN FAILED, ip=[::ffff:87.123.51.137]

The user vmail has uid 99 on my system (the user already existed when I started installing SysCP), so I replaced the 2000 by 99 wherever applicable.

To me it looks like there are two problems: postfix is somehow not able to store incoming mail in the appropriate directories and courier doesn't get the authentication done.

Maybe this has something to do with it: Whenever I (re)start CRON, I get the following message:
Quote
Sep 12 22:37:15 localhost cron[2564]: Error: bad minute; while reading /etc/cron.d/syscp
Sep 12 22:37:15 localhost last message repeated 6 times

EDIT BY FLO: Anonymized email addresses as requested by guti
« Last Edit: October 06, 2007, 04:44:45 pm by Flo » Logged
duergner
Hero Member
*****
Offline Offline

Posts: 1778


WWW
« Reply #3 on: September 12, 2006, 10:09:06 pm »

Courier denies the login as there is no maildir present for that user which is not present as the virtual daemon is not able to deliver the emails. I think to remember that virtual accepts no UID below 1000. But that might be wrong. Try to set it to 2000.
Logged

Der kleine, aber feine Unterschied: unter Windows muss man als root, damit alles laeuft. Unter Linux darf man nicht als root, weil sonst nicht alles laeuft.
-Urs Traenker in dcsf-
guti
Jr. Member
**
Offline Offline

Posts: 68


« Reply #4 on: September 13, 2006, 10:56:36 am »

That was it. I changed the uid and gid in /etc/passwd, made the changes to the config files, on the SysCP web interface and in the database (where my users where already created with ID=99) and now everything works. AWESOME!

This is a great tool. Thanks a bunch for your help!
Logged
Pages: [1] Print 
SysCP Forum  |  SysCP Discussions  |  English Discussions  |  Topic: mail not working after standard installation « previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.097 seconds with 17 queries.