Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Postfix external-internal

    Hi everybody,

    I have a little problem with my external MailServer configuration.

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

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

    The 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

    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 =
    mydestination = localhost, localhost.localdomain
    inet_interfaces = all
    mynetworks =
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    relayhost =
    mailbox_size_limit = 0
    recipient_delimiter = +
    Any ideas?



  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    North Carolina
    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
    tail -f /var/log/name_of_log_file

  3. #3
    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

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

    Then, the internal MailServer ( has the IP

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

    Then I have added a rule into iptables of the Firewall to send messages received from to

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



  4. $spacer_open
  5. #4
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    North Carolina
    User unknown in local recipient table; from=<> to=<
    does exist on the internal box, if thats where the error is coming from?

  6. #5
    Excuse me,

    the last capture was wrong.

    here is the real capture of the external MailServer:

    Jun  2 17:10:13 MailServer postfix/smtp[2665]: 8C55C12405A: to=<>, relay=[], delay=48
    0, status=sent (250 2.6.0 Ok, id=03391-08, from MTA([]: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=<>, relay=none, delay=5, status=bounced
    ([]: Name or service not known)
    Jun  2 17:10:17 MailServer postfix/cleanup[2995]: 6E4EE12403F: message-id=<>
    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:

    This is the Postfix program at host
    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
    <>: []: Name or service not known
    And finally, I don't have a DNS into the LAN.... I think the problem is into iptables....


Posting Permissions

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