Page 41 of 51 FirstFirst ... 313940414243 ... LastLast
Results 401 to 410 of 506

Thread: Howto: set up a mail server in Ubuntu

  1. #401
    Join Date
    Jun 2011
    Beans
    4

    Re: Howto: set up a mail server in Ubuntu

    After getting the described server setup working I discovered that Courier has a hardcoded IMAP namespace which the default Android email client does not handle properly. Because Android is a strong requirement for my server I have decided to replace Courier with Dovecot.

    So far I'm having trouble getting started in how to configure Dovecot for the same MySQL based authentication described in this article with Ubuntu 10.04. Does anyone know if a variation of this article exists with Dovecot support?

  2. #402
    Join Date
    Feb 2011
    Beans
    8

    Re: Howto: set up a mail server in Ubuntu

    I am trying to do the same with Dovecot.

    I am following this guide: http://wiki.dovecot.org/HowTo/Doveco...tfixAdminMySQL

    I am trying to meld it with Flurdy's tutorial but so far I am having no luck. This guide has a poor explanation of the variables it needs.

    So far I do have Dovecot talking to MySQL, but I still can't authorize any accounts against my database.

    EDIT

    It's now working. Two things that were stopping me:

    1. Make sure "disable_plaintext_auth = no" It makes no sense to try debugging your server while using certificates. You can do that stuff after your SMTP, IMAP, and POP3 servers are working correctly
    2. Your crypt field must have used MD5() and not encrypt() like in Flurdy's guide.

    Here are the two query's I modified to work with Flurdy's database model.

    user_query = SELECT concat('/var/spool/mail/virtual/', maildir) as home, concat('maildir:/var/spool/mail/virtual/', maildir) as mail, 5000 as uid, 5000 as gid, concat('maildir:storage=', quota) AS quota FROM users WHERE id = '%u' AND enabled = '1'

    password_query = SELECT id as user, crypt as password, concat('/var/spool/mail/virtual/', maildir) as userdb_home, concat('maildir:/var/spool/mail/virtual/', maildir) as userdb_mail, uid as userdb_uid, gid as userdb_gid FROM users WHERE id = '%u' AND enabled = '1'

    I hope that helps. Follow the guide I linked very carefully and you should be able to figure it out. If anyone wants a more detailed explanation to supplement Flurdy's guide then I will make one.

    EDIT2

    After working more with Dovecot, I feel I have to mention a few more things:

    3. "disable_plaintext_auth = no" should only be off if you are using TLS, and even then you should be hashing your password.
    4. Don't use MD5, since it has inherit weaknesses. Use Dovecot's SSHA256 scheme. It is safer, however, I am having difficulty making it compatible with other programs.

    Right now I am trying to get Dovecot to use a custom scheme. If anyone has experience with Hash functions, Crypt, and libc let me know please.

    EDIT3

    Also, one big plus to using Dovecot is you do not need saslauthd. One less application is one less point of failure IMO.
    Last edited by highbomber; August 6th, 2011 at 07:16 PM.

  3. #403
    Join Date
    Jun 2011
    Beans
    1

    Re: Howto: set up a mail server in Ubuntu

    Hi delaTorre - did you ever get an answer or figure out the reason behind :
    Aug 18 21:08:29 home imapd: chdir Maildir: No such file or directory
    Aug 18 21:08:29 home imapd: user1@home.local: No such file or directory

    I have the same problem.
    Thanks,
    David

  4. #404
    Join Date
    Sep 2011
    Beans
    3

    Re: Howto: set up a mail server in Ubuntu

    Sorry.
    Last edited by crnieto05; September 21st, 2011 at 02:53 PM.

  5. #405
    Join Date
    Sep 2011
    Beans
    3

    Re: Problem with SMTP SASL (Howto: set up a mail server in Ubuntu)

    Hello.
    I will like to know how resolve this problem.

  6. #406
    Join Date
    Sep 2011
    Beans
    3

    Re: Howto: set up a mail server in Ubuntu

    Quote Originally Posted by hctopcu View Post
    I'm a newbee. Your guide is extremely helpfull thank you.
    I have a running apache server on my machine. I am afraid of messing up so I skipped setting up firewall for now.

    I managed to set up Courier IMAP. I can log in through imap but when I try to send mails, I get:
    Code:
    Dec 17 13:09:13 mygitarapp postfix/smtpd[24035]: connect from unknown[88.235.53.100]
    Dec 17 13:09:13 mygitarapp postfix/smtpd[24035]: NOQUEUE: reject_warning: RCPT from unknown[88.235.53.100]: 504 5.5.2 <ArGoNNB>: Helo command rejected: need fully-qualified hostname; from=<gunman@mygitar.com> to=<c@gri.in> proto=ESMTP helo=<ArGoNNB>
    Dec 17 13:09:13 mygitarapp postfix/smtpd[24035]: NOQUEUE: reject: RCPT from unknown[88.235.53.100]: 554 5.7.1 <c@gri.in>: Relay access denied; from=<gunman@mygitar.com> to=<c@gri.in> proto=ESMTP helo=<ArGoNNB>
    Dec 17 13:09:13 mygitarapp postfix/smtpd[24035]: NOQUEUE: reject_warning: RCPT from unknown[88.235.53.100]: 504 5.5.2 <ArGoNNB>: Helo command rejected: need fully-qualified hostname; from=<gunman@mygitar.com> to=<c@gri.in> proto=ESMTP helo=<ArGoNNB>
    Dec 17 13:09:13 mygitarapp postfix/smtpd[24035]: NOQUEUE: reject: RCPT from unknown[88.235.53.100]: 554 5.7.1 <c@gri.in>: Relay access denied; from=<gunman@mygitar.com> to=<c@gri.in> proto=ESMTP helo=<ArGoNNB>
    Dec 17 13:09:13 mygitarapp postfix/smtpd[24035]: NOQUEUE: reject_warning: RCPT from unknown[88.235.53.100]: 504 5.5.2 <ArGoNNB>: Helo command rejected: need fully-qualified hostname; from=<gunman@mygitar.com> to=<hctopcu@gmail.com> proto=ESMTP helo=<ArGoNNB>
    Dec 17 13:09:13 mygitarapp postfix/smtpd[24035]: NOQUEUE: reject: RCPT from unknown[88.235.53.100]: 554 5.7.1 <hctopcu@gmail.com>: Relay access denied; from=<gunman@mygitar.com> to=<hctopcu@gmail.com> proto=ESMTP helo=<ArGoNNB>
    Dec 17 13:09:14 mygitarapp postfix/smtpd[24035]: disconnect from unknown[88.235.53.100]
    I can't understand why a client need to have a hostname. (As I said I'm a rookie)
    I will like to know how resolve this problem.

  7. #407
    Join Date
    Sep 2011
    Beans
    5

    Re: Howto: set up a mail server in Ubuntu

    Hiya, I'm trying to get a hang on this.. But there's a lof of stuff I don't understand.
    Well..
    I followed the guide, but for some reason it's not working.
    I only did the first part so far (the basic setup) and without firewall (It's a cloud server and I can change firewall setting elsewhere).
    For now I have not restricted port 25 at all.

    Anyway, I tried to use telnet to send a mail as the guide tell you to, but something is wrong.
    Here's the result of the tails
    Code:
    root@ubuntu:/# tail -f /var/log/mail.log
    Sep 22 14:21:29 ubuntu postfix/qmgr[12335]: 7D23A21C1E: removed
    Sep 22 14:21:57 ubuntu postfix/smtpd[20677]: disconnect from localhost[127.0.0.1]
    Sep 22 14:26:32 ubuntu imapd: Connection, ip=[::ffff:127.0.0.1]
    Sep 22 14:28:11 ubuntu postfix/smtpd[20792]: warning: 186.213.77.50: hostname 186.213.77.50.static.host.gvt.net.br verification failed: Name or service not known
    Sep 22 14:28:11 ubuntu postfix/smtpd[20792]: connect from unknown[186.213.77.50]
    Sep 22 14:28:33 ubuntu postfix/smtpd[20792]: lost connection after UNKNOWN from unknown[186.213.77.50]
    Sep 22 14:28:33 ubuntu postfix/smtpd[20792]: disconnect from unknown[186.213.77.50]
    Sep 22 14:31:53 ubuntu postfix/anvil[20793]: statistics: max connection rate 1/60s for (smtp:186.213.77.50) at Sep 22 17:28:11
    Sep 22 14:31:53 ubuntu postfix/anvil[20793]: statistics: max connection count 1 for (smtp:186.213.77.50) at Sep 22 17:28:11
    Sep 22 14:31:53 ubuntu postfix/anvil[20793]: statistics: max cache size 1 at Sep 22 17:28:11
    Sep 22 14:54:12 ubuntu postfix/smtpd[21121]: connect from localhost[127.0.0.1]
    Sep 22 14:56:28 ubuntu postfix/smtpd[21121]: 58A6B21B62: client=localhost[127.0.0.1]
    Sep 22 14:56:38 ubuntu postfix/cleanup[21138]: 58A6B21B62: message-id=<20110922175628.58A6B21B62@mail.envisionenglish.com.br>
    Sep 22 14:56:38 ubuntu postfix/qmgr[12335]: 58A6B21B62: from=<kristianbbach@gmail.com>, size=360, nrcpt=1 (queue active)
    Sep 22 14:56:38 ubuntu postfix/virtual[21142]: 58A6B21B62: to=<klaus/@envisionenglish.com.br>, orig_to=<klaus@envisionenglish.com.br>, relay=virtual, delay=41, delays=41/0.02/0/0.05, dsn=5.1.1, status=bounced (unknown user: "klaus/@envisionenglish.com.br")
    Sep 22 14:56:38 ubuntu postfix/cleanup[21138]: CC51B21C12: message-id=<20110922175638.CC51B21C12@mail.envisionenglish.com.br>
    Sep 22 14:56:38 ubuntu postfix/qmgr[12335]: CC51B21C12: from=<>, size=2376, nrcpt=1 (queue active)
    Sep 22 14:56:38 ubuntu postfix/bounce[21144]: 58A6B21B62: sender non-delivery notification: CC51B21C12
    Sep 22 14:56:38 ubuntu postfix/qmgr[12335]: 58A6B21B62: removed
    Sep 22 14:56:41 ubuntu postfix/smtp[21145]: CC51B21C12: to=<kristianbbach@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.45.27]:25, delay=2.6, delays=0.01/0.02/0.96/1.6, dsn=2.0.0, status=sent (250 2.0.0 OK 1316714201 i16si4239653yba.88)
    Sep 22 14:56:41 ubuntu postfix/qmgr[12335]: CC51B21C12: removed
    Sep 22 14:56:43 ubuntu postfix/smtpd[21121]: disconnect from localhost[127.0.0.1]
    And:
    Code:
     * Documentation:  https://help.ubuntu.com/
    You have new mail.
    Last login: Thu Sep 22 17:17:25 2011 from 186.213.77.50
    root@ubuntu:~# tail -f /var/log/mysql.log
    
    (there's nothing happening)
    Could anyone guide me to a way to fix this?
    One thing I noticed is that it seems to add "/" after the recipients name for some reason...

    Could it be a rights problem?
    Code:
    root@ubuntu:/# ls -l /var/mail/virtual
    total 0
    root@ubuntu:/# ls -l /var/mail/
    total 8
    -rw------- 1 root    mail    1444 2011-09-22 16:01 root
    drwxr-sr-x 2 virtual virtual 4096 2011-09-22 16:44 virtual
    root@ubuntu:/#

  8. #408
    Join Date
    Sep 2011
    Beans
    5

    Re: Howto: set up a mail server in Ubuntu

    I'm getting more and more sure the problem is with the trailing slash since postfix appears to be able to send emails.
    I received the following in my private inbox:
    FROM: Mail Delivery System <MAILER-DAEMON@envisionenglish.com.br>

    Reporting-MTA: dns; mail.envisionenglish.com.br
    X-Postfix-Queue-ID: 7FF8421B62
    X-Postfix-Sender: rfc822; kristianbbach@gmail.com
    Arrival-Date: Thu, 22 Sep 2011 21:33:38 +0000 (UTC)

    Final-Recipient: rfc822; klaus/@envisionenglish.com.br
    Original-Recipient: rfc822;klaus@envisionenglish.com.br
    Action: failed
    Status: 5.1.1
    Diagnostic-Code: X-Postfix; unknown user: "klaus/@envisionenglish.com.br"
    Last edited by KriBaBa; September 23rd, 2011 at 01:03 AM. Reason: more info

  9. #409
    Join Date
    Jul 2006
    Beans
    36

    Lightbulb Try Virtualmin

    To anyone having problems with this guide, I suggest considering installing Ubuntu server 10.04.3 LTS and Virtualmin. Virtualmin gives you a browser type front-end for managing your web-server, mail-server and much more. Read this guide for starters.

    NOTE: If you do follow the guide, when you get to the section where you are told to do the following:-
    Code:
    sudo ./install.sh
    ... after the Virtualmin installation script has completed successfully, you will need to perform the following commands:-
    Code:
    sudo update-rc.d webmin defaults
    sudo update-rc.d usermin defaults
    ... this is because Virtualmin also installs Webmin 1.560 and Usermin 1.480 - for which the Upstart Jobs for both are slightly bugged and the latter two commands rectify this (see this thread).

    Addendum: Since posting this, I notice that Virualmin has been updated from version 3.87 to 3.88, but I'm unsure if this eliminates the need to run the extra commands. The best thing to do (after running the install script) is to try accessing the browser interface first:-... if you get an error - then run the extra commands.
    HTH.
    Last edited by fade2gray; September 23rd, 2011 at 04:24 AM. Reason: Addendum

  10. #410
    Join Date
    Sep 2011
    Beans
    5

    Re: Howto: set up a mail server in Ubuntu

    Sounds like it's worth a try... Thanks for the tip

Page 41 of 51 FirstFirst ... 313940414243 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •