Pegasus Mail & Mercury

Welcome to the Community for Pegasus Mail and
The Mercury Mail Transport System, the Internet's longest-serving PC e-mail system!
Welcome to Pegasus Mail & Mercury Sign in | Join | Help
in
Home Blogs Forums Downloads Pegasus Mail Overview Mercury Overview Wiki

One domain mailbox for whole domain

Last post 07-22-2008, 17:51 by Thomas R. Stephenson. 3 replies.
Sort Posts: Previous Next
  •  07-21-2008, 16:27

    • loopy is not online. Last active: 07-22-2008, 16:50 loopy
    • Not Ranked
    • Joined on 07-21-2008
    • Member
    • Points 40

    One domain mailbox for whole domain

    Hello everybody,
    I'm trying to configure ONE domain mailbox for the whole domain. All emails for this domain shall land on this one mailbox. But I dont get it Stick out tongue

    This is what I have done so far:

    Running Mercury/32, v4.62 since a few days on Windows Server2003, fix public IP-Adress and domain ('example.com', no thats not the real domain name Smile), MX-entry is set.

    On Mercury-site:
    Mercury, Core module: Adding the local domain 'example.com' and the correspondig user at Configuration=>Manage Local Users . Your help-file says the following about configuring a domain mailbox:

    Domain mailboxes:
    Mercury supports the idea of a domain mailbox, or a mailbox that accepts mail addressed to any user at a given domain. To create a domain mailbox, first create the user account that is to receive all mail addressed to the domain, then place an entry in the Domains recognized as local by this server section in the following format:

        DM=username        domain address

    username can be any valid reference to a single local user on your system. So, to create a domain mailbox where user mailserver receives all mail addressed to any user in the domain fish.net, you would create this entry:

    DM=mailserver        fish.net

    With this entry in place, mail sent to [any address]@fish.net will be delivered into user mailserver's mailbox.
    I don't get it Embarrassed 

    I opened the mercury.ini and added the following lines under the [Domains]-section

        mailserver     mailserver
        mailserver     mail.example.com
        mailserver     [XXX.XXX.XXX.XX]
    DM=username        domain address
    DM=mailserver        fish.net

    Everytime I send a test-message to that domain, I get an automated reply which says that the user <test@example.com> or any other user is not known at this site.
    I want to allow all mails for incoming, no matter if the user exists or not...

    What am I missing?

    Any help would be highly appreciated..

     

    regards.., 

    loopy 

     

     

  •  07-21-2008, 16:46

    Re: One domain mailbox for whole domain

    I opened the mercury.ini and added the following lines under the [Domains]-section

        mailserver     mailserver
        mailserver     mail.example.com
        mailserver     [XXX.XXX.XXX.XX]
    DM=username        domain address
    DM=mailserver        fish.net

    Looks like you may have missed the ":" and/or the actual creation of the username.  Here's one that works for me.

    [Domains]
    stephens: stephens
    stephens: [209.128.94.2]
    stephens: mail.tstephenson.com
    stephens: tstephenson.com
    stephens: [192.168.1.2]
    DM=novell: novelltstephenson.com
    DM=merwin: merwin.tstephenson.com
    dm=ubunto: ubunto-tstephenson.com
    dm=merc452: merc452.tstephenson.com
    DM=Novell: novell-tstephenson.com
    stephens: stephens.sj.scruznet.com
    dm=ubunto: linux-tstephenson.com

     


    Thomas R. Stephenson
    San Jose, California
    Member of Pegasus Mail Support Team

    I do not answer private messages from the forum. If you want to contact me use email to techsupp@tstephenson.com.
  •  07-22-2008, 16:30

    • loopy is not online. Last active: 07-22-2008, 16:50 loopy
    • Not Ranked
    • Joined on 07-21-2008
    • Member
    • Points 40

    Re: One domain mailbox for whole domain

    Aaaawww Big Smile

    That was the point. I forgot indeed the ":". Thank you Wink

    Ok, my domain section looks like the following now and works:

    [Domains]
    mailserver: mail
    mailserver: mail.example.com
    mailserver: [XX.XXX.XXX.XX]
    DM=user: example.com

     

    Next step is to set up mercury that it either sends all these e-mails to our internal mailserver, or our mailserver takes the mails via pop3 protocol from mercury. When i get it done i probably will buy mercury for our backup mail-system.

    Thanks for your help!

     

    regards..,

    loopy 

     

     

     

  •  07-22-2008, 17:51

    Re: One domain mailbox for whole domain

    Next step is to set up mercury that it either sends all these e-mails to our internal mailserver, or our mailserver takes the mails via pop3 protocol from mercury. When i get it done i probably will buy mercury for our backup mail-system.

    If the server can pull via POP3 from a domain mailbox then you can use that.  My Mercury NLM server on Netware does not have that capability so I push the mail using a batch file and BASIC program. I'm running the BASIC program compiled now.  All this program does is take the CNM files and add the "glue" headers and save it as a 101 file to the Mercury/32 queue.   I'm using a third party WAIT.COM program to make this happen every 5 minutes.  http://www.plop.at/en/tools.html  I've been using this for a few months now for the domain Novell-tstephenson.com and it's works quite well.

    -------------------------------------------------------------------------------------------- MX.bat ---------------------------------------------------------------------------------------------------- 

    ECHO OFF
    :LOOP
    CD c:\pmail\mail\novell
    dir c:\pmail\mail\novell\*.cnm > c:\pmail\mail\novell\files.txt
    REM CALL c:\qb45\qb /RUN c:\pmail\mail\novell\MX.BAS
    call c:\pmail\mail\novell\mx.exe
    move *.101 c:\mercury\queue
    DEL c:\pmail\mail\novell\files.txt
    call c:\pmail\mail\novell\wait -m 5
    GOTO LOOP

     ------------------------------------------------------------------------------------------ MX.BAS ------------------------------------------------------------------------------------------------

    REM MX.BAS This program was developed to send mail from a "domain" account to a different
    REM server via SMTP.  It takes the CNM RFC 2822 message body, extracts the SMTP addresses
    REM and then saves it as a 101 file.  The CNM import file is a directory listing
    REM of the CNM files in the "domain" user account.

    CLS
    REM Set the path to the domain mailbox and the new domain name.
    PATHSPEC$ = "c:\pmail\mail\novell\"
    Domain$ = "@[192.168.1.3]"

    REM Read in the CNM files
    OPEN PATHSPEC$ + "files.txt" FOR INPUT AS #1
           
    WHILE NOT EOF(1)
        REM Read the CNM directory listing
        LINE INPUT #1, Line$
        REM Check to see if this is a CNM file else skip it.  The CNM file is always 8.3.
        IF RIGHT$(Line$, 3) = "CNM" THEN File$ = RIGHT$(Line$, 12) ELSE GOTO SKIP
        
        REM Read the CNM file
        OPEN PATHSPEC$ + File$ FOR INPUT AS #2
           
        REM Get the MAIL FROM: and RCPT TO: addresses for the glue headers.
        REM I'm using the Sender: for the MAIL FROM: address. It may be blank
        REM for locally delivered mail but a blank MAIL FROM: works for me.
        WHILE NOT EOF(2)
            LINE INPUT #2, Line$
            IF LEFT$(Line$, 14) = "X-Envelope-To:" THEN RCPTTO$ = MID$(Line$, 16, LEN(Line$))
            IF LEFT$(Line$, 7) = "Sender:" THEN MAILFROM$ = MID$(Line$, 9, LEN(Line$))
        WEND
        REM Close the CNM file.
        CLOSE #2

        REM Change the domain name to the new domain in the RCPT TO: address.
        FOR I = 1 TO 100
            IF MID$(RCPTTO$, I, 1) = "@" THEN RCPT2$ = MID$(RCPTTO$, 1, I - 1) + Domain$
        NEXT I

        REM If the SMTP address was in brackets add the trailing bracket.
        IF LEFT$(RCPT2$, 1) = "<" THEN RCPT2$ = RCPT2$ + ">"

        REM Write the 101 file in Glue header format.
        OPEN PATHSPEC$ + File$ FOR INPUT AS #2
        OPEN PATHSPEC$ + LEFT$(File$, 8) + ".101" FOR OUTPUT AS #3
        REM Write the MAIL FROM:, RCPT TO: and blank line.
        PRINT #3, "$$ " + MAILFROM$
        PRINT #3, RCPT2$
        PRINT #3, ""
        REM Write the rest of the RFC 2822 body to the 101 file.
        WHILE NOT EOF(2)
            LINE INPUT #2, Line$
            PRINT #3, Line$
        WEND
        REM Close the CNM and 101 Files.     
        CLOSE 2
        CLOSE 3
        REM Delete the CNM file
        KILL PATHSPEC$ + File$
    SKIP:
    WEND
    CLOSE
    SYSTEM
    END


    Thomas R. Stephenson
    San Jose, California
    Member of Pegasus Mail Support Team

    I do not answer private messages from the forum. If you want to contact me use email to techsupp@tstephenson.com.
View as RSS news feed in XML

Contact | Advertise | Host provider: PraktIT | Terms of Use | Privacy Statement
Copyright © 2007-2011 David Harris / Peter Strömblad. | Pegasus Mail Home Page