Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


mail server setup?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

mail server setup?

flyfly Member
edited March 2012 in Help

hmmm... google-fu is failing atm.
anyone have a comprehensive guide for a newbie to email servers on debian/archlinux servers? I'm looking for SMTP and IMAP, postfix + postfixadmin and webmail.

especially not sure how to work the DNS aspect of this.

Comments

  • yomeroyomero Member
    edited March 2012

    I am not sure, probably this can help

    http://www.howtoforge.com/virtual-users-with-postfix-dovecot-mysql-roundcube-iredadmin-on-debian-6-squeeze

    To be honest I've never configured one =/ but the tutos there seems good.

  • Mon5t3rMon5t3r Member
    edited March 2012

    @yomero said: but the tutos there seems good old.

    fixed..

    http://www.iredmail.org/download.html

  • Good old thing man!

    Hehe :P

  • hey, how you guys configure slave mail server in sync with master? for failover.
    any good tutorial for this?

  • Setting up postfix + dovecot is pretty easy. Just search for virtual domains and sh1t like this.

  • FLVPSFLVPS Member

    I paid for a cPanel license just for this purpose.

    Not pulling out my hair- worth it every month.

  • @NanoG6 I asked the same thing a little while ago on LET.

    Its actually pretty simple, you set up a second SMTP server, tell it to only relay email for your domains, add it as an MX with a 'higher' (numerically) number. If your primary MX server is down, the secondary one will accept mail and try to deliver it every X minutes.

  • NanoG6NanoG6 Member
    edited March 2012

    @ivanfilippov but I still dont understand about the sync part between the two, if the primary MX goes online again. Or is actually we don't need to sync at all?

  • @kbar i would go postfix mta for out and courier in-setup TLS too...

  • the iredmail looks really pretty.

    But the setup part is a little bit confusing. What if i have a couple virtual hosts how do i set up each of those domain mails?

  • @NanoG6 The two MXers don't "sync" per-se, they just follow mail relay rules. So lets say MX1 is down and MX2 received the email. MX2 will look up yourdomain.com and say:
    1. MX1 is down, so I can't relay the email there, let's see if theres any other MXers.
    2. MX2 is me, so I'm not going to try to deliver it to myself.
    3. There are no other MXers. I'm going to wait X minutes and start from step 1.

    Thanked by 1NanoG6
  • sleddogsleddog Member
    edited March 2012

    If using postfix (OP) with two mailservers, e.g. mx1.mydomain.com & mx2.mydomain.com, you'd create /etc/postfix/transport on the secondary (mx2.mydomain.com) with something like:

    domain1.com smtp:mx1.mydomain.com
    domain2.com smtp:mx1.mydomain.com
    ...

    Then create the hash database table from the text file:

    [root@server] postmap /etc/postfix/transport

    Then define the transport in Postfix's main.cf:

    ...
    transport_maps = hash:/etc/postfix/transport
    ...

    Similarly, you need to create 'relay_domains' and 'relay_recipients' files/databases for postfix, and specify them in main.cf. These contain lists of domains and recipients for which mx2 will accept mail.

    With virtual users stored in a mysql db on mx1, you can easily write a script to generate these postfix config files (transports, relay_domains, relay_recipients) and scp them to mx2, making maintenance of mx2 easier or even fully automated.

    When mx1 goes down mail is delivered to mx2 and held. mx2 periodically tries to deliver the mail to mx1. When mx1 comes back online the next delivery attempt succeeds.

    One thing to note is that spammers love to hit a domain's secondary MX (ignoring MX priorities in DNS). Don't create a backdoor by letting all mail from mx2 into mx1.... Ideally your mx2 should spam-check incoming mail just as rigorously as mx1.

    Thanked by 1NanoG6
  • I see.. Now I understand the concept. All this time I had been confused with the concept of "synchronization" between the Master and Slave :D
    Thanks guys @ivanfilippov @sleddog

Sign In or Register to comment.