Announcement

Collapse
No announcement yet.

How do servers send and receive email?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Originally posted by Feathers McGraw View Post
    I considered "going virtual" but decided it wasn't for me yet because I'm not all that comfortable with databases. The plan is to take it one step at a time, learn how to configure dovecot and postfix for "normal" users and then go back and have a crack at virtual users later. Perhaps that can be my 6 month rebuild!
    Screw that MySQL stuff -- what a ridiculous way to configure email for small installations. That's useful only in environments with thousands of mailboxes.

    You can accomplish a simple virtual mail setup using basic virtual maps and flat files:
    http://wiki2.dovecot.org/HowTo/Virtu...atFilesPostfix
    http://lukas-schulze.de/2012/02/setu...red-text-file/

    Originally posted by Feathers McGraw View Post
    Yes of course you can have a look, will upload them when I get back from work tonight. May have to clean them up first, there are so many blocks of comment that are slightly useful but make it really difficult to read! I think I remember seeing a command that generates an uncluttered version of your config files, may try that instead of doing it manually.
    No need to clean them up -- the comments actually help me keep the sections sorted as I read the files.

    Originally posted by Feathers McGraw View Post
    Will try that experiment too, thanks!
    I presume you're referring to the "Meanwhile, try this" bit I added to my post a couple moments ago.

    Comment


      #32
      Originally posted by SteveRiley View Post
      Meanwhile, try this -- create a folder foo (not under INBOX but instead at the same level). Now send an email to foo+bar. Did it arrive as expected?
      Do you mean a folder named bar?
      samhobbs.co.uk

      Comment


        #33
        Originally posted by SteveRiley View Post
        I can think of an experiment. Adding this to /etc/postfix/main.cf:
        Code:
        mailbox_command = /usr/lib/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT" -m "$EXTENSION"
        might do the trick. But: dovecot-lda doesn't run as root, so it would need access to each user's mailbox. That'll take a bit of tinkering.

        We also need to configure lda_mailbox_autocreate = yes in dovecot.conf. However, I would like to see all your Dovecot configuration files. Mind posting them to the same place?

        -----

        Meanwhile, try this -- create a folder foo (not under INBOX but instead at the same level). Now send an email to foo+bar. Did it arrive as expected?
        Added those lines to postfix and dovecot. I get the following output when I send an email to user+bar@samhobbs.co.uk

        Code:
        Nov 26 19:56:39 samhobbs postfix/smtpd[9794]: connect from dub0-omc2-s21.dub0.hotmail.com[157.55.1.160]
        Nov 26 19:56:39 samhobbs postfix/smtpd[9794]: EAA393F805: client=dub0-omc2-s21.dub0.hotmail.com[157.55.1.160]
        Nov 26 19:56:40 samhobbs postfix/cleanup[9798]: EAA393F805: message-id=<DUB122-W259678C73F1CD6D922369EF9EC0@phx.gbl>
        Nov 26 19:56:40 samhobbs postfix/qmgr[9709]: EAA393F805: from=<MY.EMAIL@outlook.com>, size=1542, nrcpt=1 (queue active)
        Nov 26 19:56:40 samhobbs postfix/smtpd[9794]: disconnect from dub0-omc2-s21.dub0.hotmail.com[157.55.1.160]
        Nov 26 19:56:40 samhobbs postfix/local[9799]: EAA393F805: to=<USER+bar@samhobbs.co.uk>, relay=local, delay=0.43, delays=0.17/0.06/0/0.2, dsn=4.3.0, status=deferred (temporary failure. Command output: lda: Error: user USER: Error reading configuration: Invalid settings: postmaster_address setting not given lda: Fatal: Internal error occurred. Refer to server log for more information. )
        Normal emails also fail to deliver with those settings. It seems it's the postfix line that was causing the problems (it's working again now I commented it out and replaced it with the original "mailbox_command = ").

        I'm having trouble pasting the dovecot config files, KDE paste marks it as spam (presumably because I haven't changed much from a default config file).

        Will clean them up and try again.

        Feathers
        samhobbs.co.uk

        Comment


          #34
          And... after combining it all into one config file and trying to upload it, KDE paste still hates me.

          I could email you it, if you don't mind sending me an address via PM? I promise I won't spam you!

          Feathers
          samhobbs.co.uk

          Comment


            #35
            Email coming in a PM.

            One bit... we are now in a spot -- making Dovecot work a little magic without virtual maps -- that is new for me. It'll be a couple days before I can spend some time with this. I am, of course, too curious to let it go unresolved

            And yes, I meant a folder named bar. Bah!

            Comment


              #36
              Thank you! No rush at all, the mail server is chugging along quite happily at the moment, will be really interesting to learn how to do this though.

              If all else fails I'll have a crack at it using virtual maps and flat files like you suggested. Will have a read of those links in the meantime.

              Feathers
              samhobbs.co.uk

              Comment


                #37
                Any luck with this?
                samhobbs.co.uk

                Comment


                  #38
                  Got home a few hours ago from SF, and the weekend has filled up with a number of performances. Sorry, haven't forgotten...

                  Comment


                    #39
                    No pressure, just wanted to make sure the email had got through!

                    I wouldn't have been surprised if some misconfiguration on my part had resulted in a blocked email.

                    Squirrelmail is up and running now too, it was probably the easiest to configure out of the three (postfix, dovecot, Squirrelmail).

                    I like that some of the Squirrelmail plugins are in the repos too, it wasn't immediately obvious that they were, and I wasn't keen on installing something that apt couldn't update when it updates Squirrelmail to a new version.
                    samhobbs.co.uk

                    Comment

                    Working...
                    X