Mail Server Issues...

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Mail Server Issues...

Post by pcmattman »

Hi everyone,

I followed the instructions at this location to setup a mail server on my system, however they did not work (all sorts of permission problems and directory configurations were wrong).

I did another search and found this site.

The instructions are much better on the second site and I was able to follow them and understand what was happening.

However, I have some problems. I think the switch in configurations may have caused some issues, as I cannot authenticate via POP3:

Code: Select all

Oct 31 20:27:52 matthew courierpop3login: Connection, ip=[::ffff:127.0.0.1]
Oct 31 20:27:52 matthew courierpop3login: LOGIN: ip=[::ffff:127.0.0.1], command=CAPA
Oct 31 20:27:55 matthew courierpop3login: LOGIN: ip=[::ffff:127.0.0.1], command=USER
Oct 31 20:27:55 matthew courierpop3login: LOGIN: ip=[::ffff:127.0.0.1], command=PASS
Oct 31 20:27:55 matthew courierpop3login: LOGIN: ip=[::ffff:127.0.0.1], username=postmaster@<mydomain>
Oct 31 20:27:55 matthew courierpop3login: LOGIN: ip=[::ffff:127.0.0.1], password=secret
Oct 31 20:27:55 matthew authdaemond: received auth request, service=pop3, authtype=login
Oct 31 20:27:55 matthew authdaemond: authmysql: trying this module
Oct 31 20:27:55 matthew authdaemond: SQL query: SELECT id, "", clear, uid, gid, "/home/vmail", "", "", "", "" FROM users WHERE id = "postmaster@<mydomain>" AND (enabled=1)
Oct 31 20:27:55 matthew authdaemond: mysql_query failed, reconnecting: Unknown column 'id' in 'field list'
Oct 31 20:27:55 matthew authdaemond: mysql_query failed second time, giving up: Unknown column 'id' in 'field list'
Oct 31 20:27:55 matthew authdaemond: authmysql: TEMPFAIL - no more modules will be tried
Oct 31 20:27:55 matthew courierpop3login: LOGIN FAILED, user=postmaster@<mydomain>, ip=[::ffff:127.0.0.1]
Oct 31 20:27:55 matthew courierpop3login: authentication error: Input/output error
I've been working at this for about a day now, so any help would be great.

Thanks in advance.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

SQL query: SELECT id, "", clear, uid, gid, "/home/vmail", "", "", "", "" FROM users WHERE id = "postmaster@<mydomain>" AND (enabled=1)
Have you tried running this SQL query manually? It can't find the column 'id' (essential in any relational table where the other columns are non-unique). If it's not there, you need to reflash your database. If it is, it's a permissions issue.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

The table itself does not have these columns, I think it's a remnant from the first installation (from the first tutorial). I'm not sure how I can reconfigure it to use the correct query though.

I forgot to mention earlier, I'm on Ubuntu 7.04.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Code: Select all

sudo apt-get remove pop3-server
Or whatever your server package is, then install it again. there is also a 'apt-get clean' which kills any spare config files. check 'apt-get --help'.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

OK, I realized I'd left some old options in the configuration files :oops: .

So now users can authenticate. But I have a new problem now :evil: :

Code: Select all

Nov  1 07:50:52 matthew courierpop3login: scancur opendir("cur"): No such file or directory
The user "vmail" which is ued for all mail stuff has the following home directory:

Code: Select all

matthew@matthew:~$ sudo find /home/vmail
/home/vmail
/home/vmail/.bash_logout
/home/vmail/Examples
/home/vmail/<domain>
/home/vmail/<domain>/postmaster
/home/vmail/<domain>/postmaster/tmp
/home/vmail<domain>/postmaster/new
/home/vmail/<domain>/postmaster/new/1193867615.V347I1cf233M119858.matthew
/home/vmail/<domain>/postmaster/new/1193823415.V347I1cf22fM979210.matthew
/home/vmail/<domain>/postmaster/new/1193827423.V347I1cf1e5M478150.matthew
/home/vmail/<domain>/postmaster/cur
/home/vmail/.bashrc
/home/vmail/.profile
For some strange reason it doesn't seem to be able to access the "cur" folder :? . The maildir field is set in the configuration as:

Code: Select all

MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
Any ideas?
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

I did a hopelessly stupid thing.

The MYSQL_MAILDIR_FIELD line has been commented out the entire time :evil:
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

Actually, it's not fixed:

Code: Select all

Nov  1 20:03:22 matthew postfix/smtpd[31515]: 69B6E20325B: client=localhost[127.0.0.1]
Nov  1 20:03:27 matthew postfix/cleanup[31538]: 69B6E20325B: message-id=<[email protected]>
Nov  1 20:03:27 matthew postfix/qmgr[31513]: 69B6E20325B: from=<[email protected]>, size=384, nrcpt=1 (queue active)
Nov  1 20:03:27 matthew postfix/smtpd[31542]: connect from home.gateway[192.168.1.254]
Nov  1 20:03:27 matthew postfix/smtp[31541]: warning: host wikiforall.net[202.63.42.160]:25 greeted me with my own hostname cust0672.qld01.dataco.com.au
Nov  1 20:03:27 matthew postfix/smtp[31541]: warning: host wikiforall.net[202.63.42.160]:25 replied to HELO/EHLO with my own hostname cust0672.qld01.dataco.com.au
Nov  1 20:03:27 matthew postfix/smtp[31541]: 69B6E20325B: to=<[email protected]>, relay=wikiforall.net[202.63.42.160]:25, delay=12, delays=12/0.04/0.07/0, dsn=5.4.6, status=bounced (mail for wikiforall.net loops back to myself)
Nov  1 20:03:27 matthew postfix/smtpd[31542]: disconnect from home.gateway[192.168.1.254]
Nov  1 20:03:27 matthew postfix/cleanup[31538]: 66F1920325D: message-id=<[email protected]>
Nov  1 20:03:27 matthew postfix/bounce[31543]: 69B6E20325B: sender non-delivery notification: 66F1920325D
Nov  1 20:03:27 matthew postfix/qmgr[31513]: 69B6E20325B: removed
Nov  1 20:03:27 matthew postfix/qmgr[31513]: 66F1920325D: from=<>, size=2318, nrcpt=1 (queue active)
Nov  1 20:03:27 matthew postfix/smtpd[31542]: connect from home.gateway[192.168.1.254]
Nov  1 20:03:27 matthew postfix/smtp[31541]: warning: host wikiforall.net[202.63.42.160]:25 greeted me with my own hostname cust0672.qld01.dataco.com.au
Nov  1 20:03:27 matthew postfix/smtp[31541]: warning: host wikiforall.net[202.63.42.160]:25 replied to HELO/EHLO with my own hostname cust0672.qld01.dataco.com.au
Nov  1 20:03:27 matthew postfix/smtp[31541]: 66F1920325D: to=<[email protected]>, relay=wikiforall.net[202.63.42.160]:25, delay=0.05, delays=0.02/0/0.03/0, dsn=5.4.6, status=bounced (mail for wikiforall.net loops back to myself)
Nov  1 20:03:27 matthew postfix/smtpd[31542]: disconnect from home.gateway[192.168.1.254]
Nov  1 20:03:27 matthew postfix/qmgr[31513]: 66F1920325D: removed
Nov  1 20:03:29 matthew postfix/smtpd[31515]: disconnect from localhost[127.0.0.1]
I have two domains with their MX entries pointing to my IP - the one that I was working with in the first three posts works perfectly, this one doesn't for some weird reason.

Any ideas?
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

warning: host wikiforall.net[202.63.42.160]:25 greeted me with my own hostname cust0672.qld01.dataco.com.au
Any attempt to connect to a server from that same server is seen as an IP forged request and is promptly bounced.
66F1920325D: to=<[email protected]>, relay=wikiforall.net[202.63.42.160]:25, delay=0.05, delays=0.02/0/0.03/0, dsn=5.4.6, status=bounced (mail for wikiforall.net loops back to myself)
BOUNCE! :D

Try emailing from a different computer...
Post Reply