The Sorrow Posted August 9, 2012 Share Posted August 9, 2012 More random stuff here guys! I want to make an email server for personal use. Just like the idea of using my own domain for an email address. Anyway. Ive been trying to find a good howto on making a POP3/IMAP server with SMTP encrypted with SSL. What else interested me was using MySQL as a backend. Makes me want to make a SQL server to hold all my database stuff when its all said and done. But i digress. The few howtos and tutorials always seem to end up leaving me very confused and not sure why something is not working. I always get to the point where IMAP/POP and SMTP work, the web client i use detects the settings, but the user cant authenticate. Can i get some references or some direction from sone of you leet guys that have probably done this already? So far ive tried Postfix, Dovecot and courier with MySQL and Postfix Admin. Any other ideas? Quote Link to comment Share on other sites More sharing options...
Infiltrator Posted August 9, 2012 Share Posted August 9, 2012 Just wondering if you tried using the postfix wiki from the Ubuntu community? Quote Link to comment Share on other sites More sharing options...
The Sorrow Posted August 10, 2012 Author Share Posted August 10, 2012 This one? Quote Link to comment Share on other sites More sharing options...
MRGRIM Posted August 16, 2012 Share Posted August 16, 2012 Just to clarify you're wanting to make a server that listens / process SMTP traffic? Quote Link to comment Share on other sites More sharing options...
bobbyb1980 Posted August 16, 2012 Share Posted August 16, 2012 What language? Quote Link to comment Share on other sites More sharing options...
Infiltrator Posted August 17, 2012 Share Posted August 17, 2012 This one? Yeah that one! Quote Link to comment Share on other sites More sharing options...
The Sorrow Posted August 20, 2012 Author Share Posted August 20, 2012 Just to clarify you're wanting to make a server that listens / process SMTP traffic? yes, im trying to make the server work on intranet at first then NAT the ports to the internet. What language? Which language are you asking about? Quote Link to comment Share on other sites More sharing options...
bobbyb1980 Posted August 20, 2012 Share Posted August 20, 2012 I remember you mentioning that you coded in python, I was just going to say that if you're using smtplib on versions earlier than 2.7 the client will experience authentication issues (happened to me on win32). Quote Link to comment Share on other sites More sharing options...
The Sorrow Posted August 22, 2012 Author Share Posted August 22, 2012 (edited) Alright. So i fillowed the above walkthrough to the best of my abilities and ive come across a bit of a rut. It seems like the postfixadmin doesnt update and create users in the MySQL database. heres what i get fom /var/log/mail.log Aug 22 09:53:46 MAILSRV pop3d: Connection, ip=[::ffff:10.*.*.*]Aug 22 09:53:46 MAILSRV authdaemond: received auth request, service=pop3, authtype=loginAug 22 09:53:46 MAILSRV authdaemond: authmysql: trying this moduleAug 22 09:53:46 MAILSRV authdaemond: SQL query: SELECT username, password, "", '5000', '5000', '/home/vmail', "", concat(quota,'S'), name, "" FROM mailbox WHERE username = 'user@domain.orgAug 22 09:53:46 MAILSRV authdaemond: zero rows returnedAug 22 09:53:46 MAILSRV authdaemond: no password available to compareAug 22 09:53:46 MAILSRV authdaemond: authmysql: REJECT - try next moduleAug 22 09:53:46 MAILSRV pop3d: LOGIN FAILED, user=user@domain.org, ip=[::ffff:10.*.*.*]Aug 22 09:53:46 MAILSRV authdaemond: FAIL, all modules rejectedAug 22 09:53:51 MAILSRV pop3d: Disconnected, ip=[::ffff:10.*.*.*][/CODE]so since there is maybe ten very long config files, i was hoping you guys could continue to help me pinpoint the issue.Thanks ahead of time! Edited August 22, 2012 by The Sorrow Quote Link to comment Share on other sites More sharing options...
The Sorrow Posted September 1, 2012 Author Share Posted September 1, 2012 Alright new stuff! So i followed THIS tutorial only slightly tweaking the setup for a separately hosted MySQL server. when i try to connect to the server via thunderbird i get the following log messages Aug 31 22:19:31 InternalMAILSRV pop3d: Connection, ip=[::ffff:10.x.x.x]Aug 31 22:19:31 InternalMAILSRV pop3d: Connection, ip=[::ffff:10.x.x.x]Aug 31 22:19:31 InternalMAILSRV pop3d: LOGOUT, ip=[::ffff:10.x.x.x]Aug 31 22:19:31 InternalMAILSRV pop3d: Disconnected, ip=[::ffff:10.x.x.x]Aug 31 22:19:31 InternalMAILSRV pop3d: LOGOUT, ip=[::ffff:10.x.x.x]Aug 31 22:19:31 InternalMAILSRV pop3d: Disconnected, ip=[::ffff:10.x.x.x]Aug 31 22:19:31 InternalMAILSRV postfix/smtpd[3794]: connect from unknown[10.x.x.x]Aug 31 22:19:31 InternalMAILSRV postfix/smtpd[3794]: disconnect from unknown[10.x.x.x]Aug 31 22:19:31 InternalMAILSRV postfix/smtpd[3794]: connect from unknown[10.x.x.x]Aug 31 22:19:31 InternalMAILSRV postfix/smtpd[3794]: disconnect from unknown[10.x.x.x]Aug 31 22:19:37 InternalMAILSRV postfix/smtpd[3794]: connect from unknown[10.x.x.x]Aug 31 22:19:37 InternalMAILSRV postfix/smtpd[3794]: improper command pipelining after EHLO from unknown[10.x.x.x]: QUIT\r\nAug 31 22:19:37 InternalMAILSRV postfix/smtpd[3794]: disconnect from unknown[10.x.x.x]Aug 31 22:19:37 InternalMAILSRV postfix/smtpd[3796]: connect from unknown[10.x.x.x]Aug 31 22:19:37 InternalMAILSRV imapd: Connection, ip=[::ffff:10.x.x.x]Aug 31 22:19:37 InternalMAILSRV postfix/smtpd[3796]: lost connection after CONNECT from unknown[10.x.x.x]Aug 31 22:19:37 InternalMAILSRV postfix/smtpd[3796]: disconnect from unknown[10.x.x.x]Aug 31 22:19:37 InternalMAILSRV imapd: LOGOUT, ip=[::ffff:10.x.x.x], rcvd=24, sent=464Aug 31 22:19:38 InternalMAILSRV imapd: Connection, ip=[::ffff:10.x.x.x]Aug 31 22:19:38 InternalMAILSRV imapd: LOGIN FAILED, method=PLAIN, ip=[::ffff:10.x.x.x]Aug 31 22:19:43 InternalMAILSRV imapd: LOGIN FAILED, user=user@domain.org, ip=[::ffff:10.x.x.x][/CODE]I also installed a postfixadmin instance to manage the users and virtual domains instead of the suggested one. SMTP and all the sql integration works fine. I create users and domains, they populate in the SQL database no problem. I try to get connected via thunderbird i get the above. However if i use squirrelmail i get this:[CODE]Aug 31 22:29:11 InternalMAILSRV imapd: Connection, ip=[::ffff:127.0.0.1]Aug 31 22:29:11 InternalMAILSRV imapd: LOGIN FAILED, user=user@domain.org, ip=[::ffff:127.0.0.1]Aug 31 22:29:16 InternalMAILSRV imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=60, sent=332[/CODE]Id would like to narrow down what the issue is. My guess is its courier's POP3 and IMAP not working correctly with the SQL integration. Not sure. OS is Ubuntu 12.04.1 LTS. Any gurus got any ideas? I really want to get this to work!! Quote Link to comment Share on other sites More sharing options...
MRGRIM Posted September 3, 2012 Share Posted September 3, 2012 Is the 'LOGIN FAILED' coming from the application or MySQL? Could it be that the user you are connecting with doesn't have permissions to connect from its current host? Quote Link to comment Share on other sites More sharing options...
The Sorrow Posted September 4, 2012 Author Share Posted September 4, 2012 Is the 'LOGIN FAILED' coming from the application or MySQL? Could it be that the user you are connecting with doesn't have permissions to connect from its current host? No, its returned from IMAP. MySQL is only being accessed by the email server to query for mailboxes. Not by the users. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.