Configure postfix for 1 external ip to send email

Discussion in 'Installation/Configuration' started by Roland Megens, Sep 11, 2009.

  1. Roland Megens

    Roland Megens New Member

    Followed this tutorial:, and everything is working fine on my local network.
    What I want to achieve: allow 1 external ip (at work) to send email to anywhere (recieving mails is no prob) with windows mail, i googled allot, but i can't figure it out, i think postfix is not allowing to do what i want :confused:

    I quite a noob with linux :eek:

    telnet 25 -> working, so i can locally telnet to server
    (response: 220 ESMTP Postfix)

    telnet 25 -> NOT working, can't telnet from outside (external)
    sending email, local network - working
    sending email, external - not working (email client, server requires login activated)

    No errors in mail.log
    Sep 11 21:46:39 server pop3d: Connection, ip=[x.x.x.x]
    Sep 11 21:46:39 server pop3d: LOGIN, [email protected], ip=[x.x.x.x], port=[55749]
    Sep 11 21:46:39 server pop3d: LOGOUT, [email protected], ip=[x.x.x.x], port=[55749], top=0, retr=0, rcvd=12, sent=39, time=0
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
    myhostname =
    mynetworks =
    # ip at work
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/, mysql:/etc/postfix/
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/
    virtual_mailbox_base = /home/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_use_tls = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = proxy:mysql:/etc/postfix/
    virtual_create_maildirsize = yes
    virtual_maildir_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    content_filter = amavis:[]:10024
    receive_override_options = no_address_mappings
    Last edited: Sep 15, 2009
  2. falko

    falko Super Moderator ISPConfig Developer

    Please add the external IP to mynetworks in /etc/postfix/ and restart Postfix.
  3. Roland Megens

    Roland Megens New Member

    I already did, the external ip (example) of work:

    mynetworks =

    so the external ip where i want to send email from is already in mynetworks

    from outside / external i can't telnet on port 25, from the local network telnet port 25 is working, something is blocking acces, for sure it is not firewall or router

    configured postfix to listen also on port 2525, no response also
    Last edited: Sep 12, 2009
  4. falko

    falko Super Moderator ISPConfig Developer

  5. Roland Megens

    Roland Megens New Member

    mynetworks =

    mynetworks =

    doesn't change anything, the help is very appreciated
  6. falko

    falko Super Moderator ISPConfig Developer

    Does your ISP maybe block port 25?
  7. Roland Megens

    Roland Megens New Member

    My provider blockes port 25 when you have a dynamic ip, I have a static ip and port 25 is should be open, tested it with different websites, all "test" sites say port 25 is open, can't figure out what is going on, locally everything works well.

    Feel free to test:


    followed a tutorial to change to port smtp 2525, and again, locally everything is fine, from external can't get in.
  8. falko

    falko Super Moderator ISPConfig Developer

    I'm able to connect:

    mh1:~# telnet 25
    Connected to
    Escape character is '^]'.
    220 ESMTP Postfix
    ehlo localhost
    250-SIZE 10240000
    250 DSN
    221 2.0.0 Bye
    Connection closed by foreign host.
  9. Roland Megens

    Roland Megens New Member

    hmm, still not working from work, maybe provider work is blocking port 25, will try to figure that out

    Thanks for the help so far.
    Last edited: Sep 16, 2009
  10. Roland Megens

    Roland Megens New Member

    Spend a few hours figuring it out, isp of work blocks ALL trafic over port 25. Trying to setup postfix so it works on port 25 AND 587, no luck yet
  11. Roland Megens

    Roland Megens New Member

    In my router :) linked port 587 to 25 and that solved it :)

    wish i knew litlle bit more of linux, can't figure out why i can't get postfix to listen on port 25 AND 587

Share This Page