how to make postfix send email to another postfix in local network (LAN)?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how to make postfix send email to another postfix in local network (LAN)?
i've been installing postfix and squirrelmail, and it is done completely and work for sending via internet, but when i 've set another postfix and squirrelmail up on my local network, then i tried to send email, it has generated sent item that this email sent, but when i see to another squirrelmail that i've sent to, i couldn't find my email that i've send from another postfix. what must i do to make both postfix and squirrelmail can sommunicate each other without via accesing internet? thank you very much
It is very easy to configure postfix server for your server i am using RedHat 5.0.
#yum install postfix*
#vim /etc/postfix/main.cf
line no. 77 mydomain = san.com
93 myorigin = $mydomain -----------uncomment this line
69 myhostname = pc1.san.com
115 mydestination = $myhostname, localhost.$mydomain, localhost
(uncomment this line if it is commented)
225 mynetworks = 192.168.0.0/24 (define your network here)
107 inet_interfaces = all (uncomment this line)
:wq! save and exit now
#yum install system-switch-mail*
#system-switch-mail
and select MTA agent Postfix and ok
#service postfix start
Now u can send mail using postfix server by sandeeprhce5
debian postfix/local[3241]: 9A94010B1F: to=<sukmana@riffin.com>, relay=local, delay=0.3, delays=0.08/0.18/0/0.04, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Which machine was this log from?
this log is from the sender PC, i have two PC, then i configure it for my LAN. both email server configuration is same, the hostnames are h4k33m.com and riffin.com, when i have sent an email from h4k33m.com to riffin.com, then i have checked the log, mail.log of h4k33m.com generate that log.
Well sender postfix seems to think that's a local account. Do you have riffin.com listed in mydestination on the sender? Can you post "postconf -n" for both machines?
I know this post may not be relevant anymore. Having said that, I decided to post since it may help others.
If I got it right, what you are trying to accomplish is to send an e-mail from postfix to postfix on different servers on the same LAN. I've got into that situation time ago and the solution is to deal with the transport file.
Verify that you have this configuration on your main.cf on both servers:
transport_maps = hash:/etc/postfix/transport
Now edit the transport file as follows:
On Server 1:
MyServer2.domainame.com smtp:[a2.b2.c2.d2]
On Server 2:
MyServer1.domainame.com smtp:[a1.b1.c1.d1]
Please have a look on the transport(5) man page, since you may have to do it on a db.
Now make a test by sending an e-mail using the full domain you wrote on the transport file.
I know this post may not be relevant anymore. Having said that, I decided to post since it may help others.
If I got it right, what you are trying to accomplish is to send an e-mail from postfix to postfix on different servers on the same LAN. I've got into that situation time ago and the solution is to deal with the transport file.
Verify that you have this configuration on your main.cf on both servers:
transport_maps = hash:/etc/postfix/transport
Now edit the transport file as follows:
On Server 1:
MyServer2.domainame.com smtp:[a2.b2.c2.d2]
On Server 2:
MyServer1.domainame.com smtp:[a1.b1.c1.d1]
Please have a look on the transport(5) man page, since you may have to do it on a db.
Now make a test by sending an e-mail using the full domain you wrote on the transport file.
Just to add to this, are the server multi homed? That is to say, they have two physical network cards, one public and one private? If so then it helps to map them in the /etc/hosts file with the local directive, to be placed on both servers.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.