Results 1 to 4 of 4

Thread: trying to set up a local only mail server (& failing miserably)

  1. #1
    Join Date
    Feb 2013
    Beans
    3

    trying to set up a local only mail server (& failing miserably)

    ok. 6 days in so far (didn't think it would be nearly this hard)

    have a development server. just want to send emails from drupal/php scripts & have read them in some GUI mail reader

    unfortunately, postfix + dovecot(??) + thunderbird = (so far) nothing but headaches

    postfix seems to work, but can't figure out how to read emails, where they're going or exactly who is sending them. nor have i managed to configure thunderbird (i'm not sure where its supposed to pull the emails from)

    the attached images are screen grabs of (1) the results of 'mail' in the command line, & (2) the mail log
    Attached Images Attached Images

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,617
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: trying to set up a local only mail server (& failing miserably)

    When you mean "local only" do you mean no Internet mail, just local accounts?

    Try installing the mailutils package, then send a test message from the command prompt like this:

    Code:
    echo 'this is a test' | mail -s 'test message' someone
    replacing "someone" with a valid account on the box. Does the message get delivered to /var/mail/someone?

    Are you trying to connect with Thunderbird on the same machine that runs Postfix and dovecot or from another machine on the network? If the latter, you'll need to remove the restrictions in both programs that limit them to listening on only the localhost interface. In dovecot, you need to have a "listen = *" directive. In Postfix, read this discussion of the mynetworks directive.
    Last edited by SeijiSensei; March 9th, 2013 at 03:57 AM.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Feb 2013
    Beans
    3

    some success!!!!

    [ system name: NOLi, mailutils & postfix both installed. postfix installed with 'local only' option ]

    first, major thanks. what a useful command that is you said. i've used it to figure out what's going on (as i explain below)

    regarding "Are you trying to connect with Thunderbird on the same machine that runs Postfix and dovecot or from another machine on the network?" - the answer is the same machine.

    so now, i've got to install thunderbird & dovecot -- is this correct? will this mean the mail will need to be delivered somewhere else or does it carry on being delivered to the /var/mail folder? & if so, do i have to setup up Thunderbird & Dovecot to somehow access it from this folder or what?



    HOW MY MAIL SETUP CURRENTLY SEEMS TO BE WORKING (with just Postfix & Mailutils)

    have seen that mail sent with it gets delivered to /var/mail & /var/spool/mail (they seem to be clones of each other??)

    in my /etc/aliases file i've got
    postmaster: root
    admin: root
    david: root


    so perhaps understandably all mail sent to postmaster, admin & david gets delivered to the root file in /var/mail ('root' is a simple text file i'm presuming). also, mail sent to brian@NOLi (a non-existent account) also gets delivered here, together with a MAILER-DAEMON 'Undelivered mail returned to sender' system email

    plus, by adding ', localhost.com' to the /etc/postfix/main.cf file, now mail sent to david@localhost.com, postmaster@localhost, etc also get delivered properly

    in /var/mail (or /var/spool/mail ) i've got 2 other files 'fmaster' & 'www-data'. fmaster i understand. its another user i added using the 'useradd' command - & any mail sent to it with the command goes to this file. www-data i'm not sure about as yet


    Last edited by lancsDavid; March 13th, 2013 at 12:03 AM.

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,617
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: trying to set up a local only mail server (& failing miserably)

    The www-data "user" is the one that Apache runs as.

    If you are running dovecot, then you can set up Thunderbird to use IMAP. I suspect it's possible to tell TBird simply to connect to a local file, but I've never done that. I'm usually interested in connecting to the server from multiple locations and multiple accounts, so I need an IMAP server.

    If you don't care about a GUI, you could install alpine and configure it to use /var/mail/username directly. The default "mbox" format is simply a single file that contains all the messages with an extra carriage return to delimit the end of each message.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

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
  •