Making postfix use an internal ip a good fix??
Hello all having a problem getting postfix to send email, i think its sort of related to virtual machine/LAN/WAN/MX i'm sure its a simple fix but i cannot seem to get postfix to do what i want when i try to send email to myseld i get the following errors in the mail.log May 31 18:03:13 erp postfix/pickup[9738]: 801FE27599: uid=0 from= May 31 18:03:13 erp postfix/cleanup[10069]: 801FE27599: message-id=<20120601000313.801FE27599@erp.localdomain> May 31 18:03:13 erp postfix/qmgr[29637]: 801FE27599: from=, size=323, nrcpt=1 (queue active) May 31 18:03:34 erp postfix/smtp[10072]: connect to mx1.computerking.ca[204.X.X.X]:25: Connection timed out May 31 18:03:34 erp postfix/smtp[10072]: 801FE27599: to=, relay=none, delay=21, delays=0.09/0.01/21/0, dsn=4.4.1, status=deferred (connect to mx1.computerking.ca[204.244.122.131]:25: Connection timed out) This machine is on the same LAN as the server its ip is 10.0.0.108 and the server is 10.0.0.102 however these machines are all virtual on the same hardware. As seen in the logs postfix trys to deliver to the external ip 204.X.X.X where sure enough it get disconnected and im not sure why however i can connect to postfix on using the interal IP telnet 10.0.0.102 25 Trying 10.0.0.102... Connected to 10.0.0.102. Escape character is '^]'. 220 mx1.computerking.ca ESMTP Postfix \ I have added mx1.computerking..ca to the hosts file to try and fix things and now i can even telnet to the hostname since i added the LAN ip in hosts telnet mx1.computerking.ca 25 Trying 10.0.0.102... Connected to mx1.computerking.ca. Escape character is '^]'. 220 mx1.computerking.ca ESMTP Postfix However Postfix insists on sending to the external ip address probably an mx record thing and i telnet does not work there telnet 204.244.122.131 25 Trying 204.244.122.131... telnet: Unable to connect to remote host: Connection timed out I'm not sure why the vm cannot connect to the other vm on the external ip, but is there anyway to make postfix use the LAN address or is there a better way to fix this? I ha Computer King CaN-Mail Surveillance King http://computerking.ca http://canmail.org http://surveillanceking.net Surveillance - Sales Service - Hosting Backup Internet Based Surveillance Systems Custom Service Pac kages Secure IMAP Email - Automated Remote Backups - Photo Blogs - Online ERP and Accounting Packages
Re: Making postfix use an internal ip a good fix??
Thanks alot for your replies and i went with the easier fix for now using a transport worked like a charm However not before I messed around with my Bind server till i got super confused i will get around to setting up a split DNS soon just not today, as i have my hands full with other things. Thanks again for the quick replies and thanks Noel for the easy way out :) - Original Message - From: "Noel Jones" To: postfix-users@postfix.org Sent: Thursday, 31 May, 2012 8:43:38 PM Subject: Re: Making postfix use an internal ip a good fix?? On 5/31/2012 7:15 PM, RYAN M. vAN GINNEKEN wrote: > Hello all having a problem getting postfix to send email, i think > its sort of related to virtual machine/LAN/WAN/MX i'm sure its a > simple fix but i cannot seem to get postfix to do what i want when i > try to send email to myseld i get the following errors in the mail.log Easy fix: http://www.postfix.org/transport.5.html # transport my.domain relay:[relay.ip.goes.here] ps. use the [ ] brackets. Not as easy complete fix: use split-horizon DNS. -- Noel Jones
Incoming relay using transport
Hello I am tring to get incoming email relay working using a transport file first off is this the correct way to get email to go from some...@gmail.com - using gmail could be anywhere >>> m...@tryingtogetincomingrelayworking.com on mx2.mail.com - my relay server >>> me@tryingtogetincomingrelayworking on mx1.mail.com - my main mail server Something is going wrong and i keep getting this error on the relay server, obviously it is stopping mail and i get nothing in the logs for the main server. Please help Relay access denied; from= to= proto=ESMTP helo= some details m...@tryingtogetincomingrelayworking.com is on the main mail server that we can call mx1.mail.com so is a different domain, however with your setup i do not think this should matter? Also the real hostname of the relay system is ns1.someserver.com, but i have added myhostname = mx2.mail.com to the below to main.cf will $domain work like this? myhostname = mx2.mail.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname #mydestination = ns1.someserver.com mx1.someserver.com, localhost.someserver.com, localhost mynetworks = 127.0.0.0/8 [:::127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = ipv4 relayhost = mx1.mail.com relay_domains = $mydomain virtual_alias_maps = hash:/etc/postfix/virtual relay_recipient_maps = hash:/etc/postfix/relay_recipients transport_maps = hash:/etc/postfix/transport relay_recipients looks like this m...@tryingtogetincomingrelayworking.com OK my virtual looks like this me m...@tryingtogetincomingrelayworking.com my transport looks like this mx2.mail.com smtp :[mx1.mail.com] All hashed of course Computer King CaN-Mail Surveillance King http://computerking.ca http://canmail.org http://surveillanceking.net Surveillance - Sales Service - Hosting Backup Internet Based Surveillance Systems Custom Service Pac kages Secure IMAP Email - Automated Remote Backups - Photo Blogs - Online ERP and Accounting Packages