OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Michael Tokarev (mjttls.msk.ru)
Date: Fri Feb 02 2001 - 06:16:11 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    istvan.takacsszerencsejatek.hu wrote:
    >
    > Hi,
    >
    > We have a mail server (mail.jelenlegi.hu), and our
    > users have email addresses like usernamejelenlegi.hu
    > I have to set up this server for two new domains (egyik.hu
    > and masik.hu) in this form:
    > usernameegyik.hu
    > usernamemasik.hu
    >
    > The domains have different users, but some of them
    > are the same person for every domains e.g. postmaster,
    > hostmaster, webmaster, etc.

    Aha, this makes sense. But question remains: where mails
    comed to usermasik.hu should go?

    > I wrote the line virtual_maps = hash:/etc/postfix/virtual
    > into the main.cf, and created a new virtual file with two records:
    >
    > egyik.hu, masik.hu

    Please reread virtual manual page - it specifies format of this
    file. What you quoted here is *one* record, not two. Virtual
    file is a *map* that maps keys to values. You need to have
    something like this (man virtual!):

      egyik.hu virtual
      postmasteregyik.hu postmaster
      hostmasteregyik.hu hostmaster
      ...
      user1egyik.hu ??? (As I said - no info about what should be here)
      user2egyik.hu ???
      ...

    This is for egyik.hu, the same is for masik.hu (modulo usernames).

    > # postmap virtual
    > # postfix reload
    >
    > maillog:
    >
    > Feb 2 08:34:50 fw postfix-script: refreshing the Postfix mail system
    > Feb 2 08:34:50 fw postfix/master[493]: reload configuration
    >
    > If I try to send an email to the a user, than it writes this
    >
    > Feb 2 08:36:21 fw postfix/smtpd[14523]: reject: RCPT from
    > aramis.iif.hu[193.225.12.71]: 554 <postmasteregyik.hu>: Reci
    > pient address rejected: Relay access denied; from=<hostmasternic.hu>
    > to=<postmasteregyik.hu>

    Yes, this is right since postfix doesn't recognize egyik.hu as
    virtual domain using your virtual "table".

    > I don't know what should I set up this to work correctly.
    > And can I use the same aliases file for different domains?

    Yes you can. You can add both to mydestination parameter in
    main.cf file. This way, all domains will become synonyms, i.e.
    useregyik.hu = usermasik.hu = user... (the last is that you
    have in mydestination already), so you will be almost unable to
    distinguish them (but still can use virtual map to redirect
    individual addresses).

    > Thanks in advance!
    >
    > Regards,
    >
    > Istvan

    Regards,
     Michael.