Jump to content

Email Server


The Sorrow

Recommended Posts

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?

Link to comment
Share on other sites

Just wondering if you tried using the postfix wiki from the Ubuntu community?

Link to comment
Share on other sites

Yeah that one!

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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=login
Aug 22 09:53:46 MAILSRV authdaemond: authmysql: trying this module
Aug 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.org
Aug 22 09:53:46 MAILSRV authdaemond: zero rows returned
Aug 22 09:53:46 MAILSRV authdaemond: no password available to compare
Aug 22 09:53:46 MAILSRV authdaemond: authmysql: REJECT - try next module
Aug 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 rejected
Aug 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 by The Sorrow
Link to comment
Share on other sites

  • 2 weeks later...

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\n
Aug 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=464
Aug 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!!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...