Find the answer to your Linux question:
Results 1 to 5 of 5
Hi everybody, I have a little problem with my external MailServer configuration. I have a MailServer (domain external.com) which sends and receives mails from-to outside. And then, into the LAN, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2006
    Posts
    51

    Postfix external-internal


    Hi everybody,

    I have a little problem with my external MailServer configuration.

    I have a MailServer (domain external.com) which sends and receives mails from-to outside.

    And then, into the LAN, I have another mailserver, with an internal domain called "inside.net".

    The inside.net MailServer is used to send mails between all the people in my office, and the external mail is used just for 3 o 4 workers who need to send mails outside.

    The configuration of the Internal Mailserver allows to send mails inside the office, and the External allows to send them outside.

    So, the question is:
    How can I configure External Postfix to allow it sending mails inside the office, so that Internal Mailserver could receive mails from an external account of MY external server.

    This is my External Postfix main.cf:

    Code:
    smtpd_banner = $myhostname ESMTP $mail_name
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    maximal_queue_lifetime = 2d
    message_size_limit = 5024000
    virtual_mailbox_limit = 5024000
    
    # Network parameters
    myhostname = mail.ditecsa.com
    mydestination = localhost, localhost.localdomain
    inet_interfaces = all
    mynetworks = 10.0.0.0/24
    
    ...
    
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    relayhost =
    mailbox_size_limit = 0
    recipient_delimiter = +
    Any ideas?

    Thanks!

    Aleix

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    what happens when you try to send mail from one to the other now?
    I would use telnet to test How to Send Email Using Telnet - wikiHow and then have
    Code:
    tail -f /var/log/name_of_log_file

  3. #3
    Just Joined!
    Join Date
    Jul 2006
    Posts
    51
    Hi jledhead,

    thanks for your reply...

    well, the situation is more complex than I thought...

    the external MailServer i into a DMZ, and has the IP 10.0.0.3.

    Then there is a Firewall, with IP 10.0.0.2 into eth0, and 192.168.0.1 into eth1.

    Then, the internal MailServer (inside.net) has the IP 192.168.0.1

    I have modified external /etc/hosts to have this line:

    Code:
    10.0.0.2    inside.net
    Then I have added a rule into iptables of the Firewall to send messages received from 10.0.0.3 to 192.168.0.1:

    Code:
    [11:44:58] aleix.freixa dice:-A PREROUTING -s 10.0.0.3 -d 10.0.0.2 -i eth0 -p tcp -m tcp --dport 25 -j DNAT --to-destination 192.168.0.1:25
    And this is the message I see on /var/log/mail.log from my external Mail Server:
    Code:
    Jun  2 09:23:46 MailServer postfix/smtpd[28866]: NOQUEUE: reject: RCPT from unknown[10.0.0.2]: 550 <aleix@inside.net>: 
    Recipient address rejected: User unknown in local recipient table; from=<info@outside.net> to=<aleix@inside.net> 
    proto=ESMTP helo=<[192.168.0.8]>
    Any ideas?

    Thanks!

    Aleix

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    Code:
    User unknown in local recipient table; from=<info@outside.net> to=<aleix@inside.net
    does aleix@inside.net exist on the internal box, if thats where the error is coming from?

  6. #5
    Just Joined!
    Join Date
    Jul 2006
    Posts
    51
    Excuse me,

    the last capture was wrong.

    here is the real capture of the external MailServer:

    Code:
    Jun  2 17:10:13 MailServer postfix/smtp[2665]: 8C55C12405A: to=<aleix@inside.net>, relay=127.0.0.1[127.0.0.1], delay=48
    0, status=sent (250 2.6.0 Ok, id=03391-08, from MTA([127.0.0.1]:10025): 250 Ok: queued as E1139124029)
    Jun  2 17:10:13 MailServer postfix/qmgr[29191]: 8C55C12405A: removed
    Jun  2 17:10:17 MailServer postfix/smtp[3588]: E1139124029: to=<aleix@inside.net>, relay=none, delay=5, status=bounced
    ([inside.net]: Name or service not known)
    Jun  2 17:10:17 MailServer postfix/cleanup[2995]: 6E4EE12403F: message-id=<20080602151017.6E4EE12403F@external.net>
    Jun  2 17:10:17 MailServer postfix/qmgr[29191]: 6E4EE12403F: from=<>, size=2685, nrcpt=1 (queue active)
    Jun  2 17:10:17 MailServer postfix/qmgr[29191]: E1139124029: removed
    And when a try to send from external, I receive en error mail:

    Code:
    This is the Postfix program at host mailserver.external.net.
    
    I'm sorry to have to inform you that your message could not be
    be delivered to one or more recipients. It's attached below.
    
    For further assistance, please send mail to <postmaster>
    
    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.
    
    			The Postfix program
    
    <aleix@inside.net>: [inside.net]: Name or service not known
    And finally, I don't have a DNS into the LAN.... I think the problem is into iptables....

    Aleix

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •