Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th September 2009, 23:28
Roland Megens Roland Megens is offline
Junior Member
 
Join Date: Sep 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Configure postfix for 1 external ip to send email

Followed this tutorial: http://www.howtoforge.com/virtual-us...ysql-centos5.1, 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

I quite a noob with linux

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

telnet 12.34.45.67 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, user=bla@bla.nl, ip=[x.x.x.x], port=[55749]
Sep 11 21:46:39 server pop3d: LOGOUT, user=bla@bla.nl, ip=[x.x.x.x], port=[55749], top=0, retr=0, rcvd=12, sent=39, time=0

main.cf:
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
myhostname = server.bla.nl
mynetworks = 127.0.0.0/8 192.168.0.0/24 12.34.56.79
#
#12.34.56.79 ip at work
#
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
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/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_maildir_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
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:[127.0.0.1]:10024
receive_override_options = no_address_mappings

Last edited by Roland Megens; 15th September 2009 at 19:55.
Reply With Quote
Sponsored Links
  #2  
Old 12th September 2009, 12:29
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Please add the external IP to mynetworks in /etc/postfix/main.cf and restart Postfix.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 12th September 2009, 14:35
Roland Megens Roland Megens is offline
Junior Member
 
Join Date: Sep 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

mynetworks = 127.0.0.0/8 192.168.0.0/24 12.34.56.79


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 by Roland Megens; 12th September 2009 at 18:41.
Reply With Quote
  #4  
Old 13th September 2009, 16:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Try 12.34.56.79/32
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 14th September 2009, 18:35
Roland Megens Roland Megens is offline
Junior Member
 
Join Date: Sep 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

changed:
mynetworks = 127.0.0.0/8 192.168.0.0/24 12.34.56.79

to:
mynetworks = 127.0.0.0/8 192.168.0.0/24 12.34.56.79/32

doesn't change anything, the help is very appreciated
Reply With Quote
  #6  
Old 15th September 2009, 14:48
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Does your ISP maybe block port 25?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 15th September 2009, 17:30
Roland Megens Roland Megens is offline
Junior Member
 
Join Date: Sep 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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:

server.humaheftruck.nl

ip: 88.159.160.114

followed a tutorial to change to port smtp 2525, and again, locally everything is fine, from external can't get in.
Reply With Quote
  #8  
Old 16th September 2009, 13:53
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

I'm able to connect:

Code:
mh1:~# telnet server.humaheftruck.nl 25
Trying 88.159.160.114...
Connected to server.humaheftruck.nl.
Escape character is '^]'.
220 server.humaheftruck.nl ESMTP Postfix
ehlo localhost
250-server.humaheftruck.nl
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.
mh1:~#
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 16th September 2009, 17:06
Roland Megens Roland Megens is offline
Junior Member
 
Join Date: Sep 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 by Roland Megens; 16th September 2009 at 17:13.
Reply With Quote
  #10  
Old 16th September 2009, 23:59
Roland Megens Roland Megens is offline
Junior Member
 
Join Date: Sep 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

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
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How cai remove amavis from postfix ? gabrix Server Operation 16 2nd October 2012 09:58
postfix, pop3 uvbnserved Server Operation 22 24th May 2009 21:00
HELP: Postfix on Lenny: NO STARTTLS MESSAGE zeus80 HOWTO-Related Questions 2 26th March 2009 18:54
Postfix won't receive external email fred!head Server Operation 2 29th June 2008 19:30
Configure Sendmail or Postfix to only send mail from local server phantomk Installation/Configuration 5 11th June 2008 10:19


All times are GMT +2. The time now is 11:09.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.