Announcement

Collapse
No announcement yet.

Server alias for secondary domain

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Hey guys,

    first off, let me tell you I love you (resp. your willingness to help). I've been out-of-office a few days and coming back, I find you have put a lot of thoughts into my problem. Thank you very much !!!

    I went through all the suggestions and here are the results:

    JOHN: Create a new siteworx account called mail.mydomain.url, then edit the DNS and change mx record so it only shows mail.mydomain.url
    This won't work, since the email address would then be user@mail.mydomain.url instead of user@mydomain.url. Or did I get you wrong, John?

    JUSTIN: manually add the server alias to vhost of site1.com ... either delete the site2 vhost file ... or just make sure that site1.com's vhost loads first
    This works, but since we edit the vhost file manually, any change to the domain settings (add subdomain etc.) will remove the manually added vhost entry. It would be ok as a temp solution, but is way to error-prone for a permanent solution. No matter how detailed our documentation would be, in a few months or even years, this WILL lead to confusion and angry customers ;-) So I would prefer a more fail-safe way.

    JOHN: manually create the email account(s) required, and for webmail, use server domain
    This seems to be a viable solution, but it doesn't work for me :-( When trying to create the domain via "/home/vpopmail/bin/vadddomain domain.url password" it says the domain already exists. But when I try to add the mail account via "/home/vpopmail/bin/vadduser new-user@domain.url password" I get

    vmysql: sql error[2]: Data too long for column 'pw_clear_passwd' at row 1
    Failed while attempting to add user to auth backend
    Error: no authentication database connection
    I am hoping this is just some error on my part or something we have forgotten. Any ideas?

    Cheers,

    Michael

    Comment


    • #17
      Hi Michael


      Many thanks, there are a lot of very experienced users who help, and Justin is one of the very best I think.


      I have retried just adding domain into qmail only, but I think you need to add the qmail domain first, then add the domain as a server alias


      Please see pics, lets say using master.url as the WPMU account, and s-alias.url as the server alias account.


      I will not install WPMU, as you know this works, so I will just create a sitewrox account called master.url, then add s-alias.url to qmail, for email only, with first been postmaster@s-alias.url and the an actual user email account called itsme@s-alias.url,then create a server alias called s-alias.url to master.url, then test using webmail, using the server hostname as serverhostname.url/webmail


      Warning - Please Note


      s-alias.url will NOT count in space quota used for master.url, as it is created outside of the siteworx account.


      I hope that helps, and I hope you can follow the above easily


      Many thanks


      John
      Attached Files

      Comment


      • #18
        Hi John,

        it works. The "existing domain" message should have given me the hint to first create the mail account and then add the pointer domain as server alias. But it was late yesterday night, so that's gonna be my excuse ;-)

        I encountered the same error message as above, but this time while adding the domain

        vmysql: sql error[2]: Data too long for column 'pw_clear_passwd' at row 1
        Failed while attempting to add user to auth backend
        Error: no authentication database connection
        So I had to remove the domain again with

        /home/vpopmail/bin/vdeldomain domain.url
        and then added it with a shorter password. That worked and adding the mail account with a similar short password worked fine to. After re-adding the pointer domain and an Apache restart everything works now as intended. Excellent!

        Does anone have any idea, why the password length seems to be limited and to what length?

        I looked up the docs for Vpopmail here http://www.qmailwiki.org/Vpopmail and will try a few more things. Especially the "vaddaliasdomain" intrigues me, I have to play with that and see what it does. If it does what I think, this could be a very convenient way to "create" the mailaccounts we need.
        As for the quota issue, I could solve that two ways. Use either the option -q quota_in_bytes (sets the users quota, use NOQUOTA for unlimited) while adding the user or I could move the domain folder from /var/vpopmail/domains into the siteworx account folder and create a symbolic link, just like siteworx does it. Or combine both in order to limit the mail account and add it to the space quota of the siteworx account. But in our case I don't really need it, just wanted to tell others, that might need it.

        One more thing: I tested the vuserinfo command and also tried /home/vpopmail/bin/vuserinfo -C user@domain.url and that gave me the unencrypted password I entered before. This sets of all alarm bells in me. Shouldn't vpopmail be configured with the option --disable-clear-passwd by default? This is exactly the kind of oversight, that makes leeching user data from hacked servers so easy and attractive. Or am I wrong?

        Anyways, thanks a lot John and Justin, you helped me a lot.
        Last edited by mdeinhardt; 08-11-2016, 06:53 AM. Reason: Added paragraph about quota

        Comment


        • #19
          I tried the vaddaliasdomain thing and it is awesome. I simply add the alias like this

          /home/vpopmail/bin/vaddaliasdomain real_domain alias_domain
          and it maps every mail account, every forwarder, every autoresponder from the original domain to the alias domain. Users "share" the account. i.e. info@original_domain.url and info@alias_domain.url can each login under their username and the same password, each can send and receive under their user name (= email address) and all mails end up in the same inbox.

          This might not be desirable for many, but for the way we use WPMU it is perfect. We have a few customers each running a few websites, so we set those up as multisite installations in order to reduce administration overhead.

          I can now add each domain first as pointer domain/server alias and map it in WPMU and with vaddaliasdomainmail I can add each alias domain for email. Most companies have a similar set of standard mail account like info@domain.url, admin@domain.url and so on and those are now automatically available for each alias domain.

          Yay!

          Comment


          • #20
            So with the vaddaliasdomain it's basically a forwarder to the main domain for all email accounts on the main domain? Just allowing the main to also except email for the other? Does this cause any issues with replying to emails as the correct domain user?
            [ JUSTIN ]
            [ OFF unit ]
            [ WEB DESIGN / DEVELOPMENT, GRAPHIC DESIGN, OTHER STUFF
            ]

            Comment


            • #21
              It is really more an alias than a redirect/forwarder (speaking in domain terms). This command creates an entry in the qmail/users/assign file directing all transactions for the new, alias domain name, to the current, real domain. This eliminates needing symlinks, and other harddrive intensive operations. (Explanation stolen from here )

              I was able to send/reply as info@original_domain.url as well as info@alias_domain.url and both would show up at the recipient with the correct sender address. And both accounts receive everything the same, as they "share" the inbox (it is really the inbox of the original_domain). So it is ideal e.g. for the RFC mail accounts. When we addd domains as server alias, we had no way of adding the mailaccounts postmaster@, hostmaster@, webmaster@ and abuse@ but those are required according to RFC and not having those could potentially get you into trouble.

              I will now always use vaddaliasdomain when creating server aliases, even if our customers don't want email accounts for the pointer domains.

              Comment


              • #22
                I would even go as far as saying this could be a great feature in Sitworx, when adding a pointer domain as server alias (Checkbox "Also add this domain as E-Mail-Alias Domain")

                Comment


                • #23
                  Yeah, that sounds similar to what I've done with Exchange servers in the past. You make one default domain, but you can have the server accept email on other domains as well.

                  Glad you got it all squared away. This is definitely going to come in handy for other InterWorx users in the future that run into this!
                  [ JUSTIN ]
                  [ OFF unit ]
                  [ WEB DESIGN / DEVELOPMENT, GRAPHIC DESIGN, OTHER STUFF
                  ]

                  Comment


                  • #24
                    Hi Michael and Justin

                    Yep, sounds good and glad it's been resolved.

                    Sorry, I didn't think of alias, must be getting old

                    I'll email IW to have a look, it does sound like a siteworx feature which should be good to have

                    Many thanks

                    John

                    Comment


                    • #25
                      Hi Michael and Justin

                      I hope you don't mind, no guarantees it will be added but Nathan replied as below

                      I think this thread is a little special and may bypass the normal channels for feature requests, so please everyone,do not expect this every time to happen, but kudos to you guys and IW. You all rock

                      Many thanks

                      John

                      That was a great discussion! I'm going to submit a feature request regarding the alias discussion.
                      Thanks,
                      -Nathan

                      Comment


                      • #26
                        Because I just used vaddaliasdomain again I realized that one thing might not be clear resp. wrong in the description above:

                        If you want to add an e-Mail Alias via vaddaliasdomain, you have to do that before you create the server alias via "Add a Pointer Domain".

                        Comment

                        Working...
                        X