LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   how to make postfix send email to another postfix in local network (LAN)? (https://www.linuxquestions.org/questions/linux-server-73/how-to-make-postfix-send-email-to-another-postfix-in-local-network-lan-694423/)

h4k33m 01-02-2009 04:33 AM

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 :)

sandeeprhce5 01-02-2009 04:48 AM

How to configure postfix server for network ?
 
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

billymayday 01-02-2009 04:49 AM

First thing to do is check the logs on the sending server to see if it was sent OK, and if so, check the logs on the receiving server.

If you see errors at either end, post then here.

If not, let us know and we can think about the next step.

Edit - Sandeep, can you please turn that awful bold green text off?

h4k33m 01-06-2009 04:22 PM

Quote:

Originally Posted by billymayday (Post 3394292)
First thing to do is check the logs on the sending server to see if it was sent OK, and if so, check the logs on the receiving server.

If you see errors at either end, post then here.

If not, let us know and we can think about the next step.

Edit - Sandeep, can you please turn that awful bold green text off?


this the error in my MTA when i try to send a email to another
Code:

Jan  5 00:50:57 debian dovecot: imap-login: Login: user=<riffin>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan  5 00:50:57 debian dovecot: IMAP(riffin): Disconnected: Logged out
Jan  5 00:51:04 debian dovecot: imap-login: Login: user=<riffin>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan  5 00:51:04 debian dovecot: IMAP(riffin): Disconnected: Logged out
Jan  5 00:51:07 debian dovecot: imap-login: Login: user=<riffin>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan  5 00:51:07 debian dovecot: IMAP(riffin): Disconnected: Logged out
Jan  5 00:51:48 debian postfix/smtpd[3237]: connect from localhost[127.0.0.1]
Jan  5 00:51:48 debian postfix/smtpd[3237]: 9A94010B1F: client=localhost[127.0.0.1]
Jan  5 00:51:48 debian postfix/cleanup[3240]: 9A94010B1F: message-id=<4399.::1.1231134708.squirrel@localhost>
Jan  5 00:51:48 debian postfix/qmgr[3125]: 9A94010B1F: from=<riffin@h4k33m.com>, size=675, nrcpt=1 (queue active)
Jan  5 00:51:48 debian dovecot: imap-login: Login: user=<riffin>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan  5 00:51:48 debian postfix/smtpd[3237]: disconnect from localhost[127.0.0.1]
Jan  5 00:51:48 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")
Jan  5 00:51:48 debian postfix/qmgr[3125]: 9A94010B1F: removed
Jan  5 00:51:48 debian dovecot: IMAP(riffin): Disconnected: Logged out
Jan  5 00:51:49 debian dovecot: imap-login: Login: user=<riffin>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan  5 00:51:49 debian dovecot: IMAP(riffin): Disconnected: Logged out

thank you ... :)

billymayday 01-07-2009 12:16 AM

Something's being delivered
Code:

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?

h4k33m 01-14-2009 08:00 AM

the mail.log generator
 
Quote:

Originally Posted by billymayday (Post 3399533)
Something's being delivered
Code:

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.

what must i do to make it enable to communicate ? :newbie:

billymayday 01-14-2009 01:11 PM

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?

h4k33m 01-19-2009 04:26 PM

i can i've make riffin.com in h4k33m.com destination list, and i can post " postconf -n " on both machine, what must i do then?

morriset 06-04-2015 09:46 AM

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.

joec@home 06-04-2015 04:33 PM

Quote:

Originally Posted by morriset (Post 5372073)
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.

Example:

server1.mydomain.com 1.2.3.4
server1.mydomain.local 192.168.1.4
server2.mydomain.com 1.2.3.5
server2.mydomain.local 192.168.1.5


All times are GMT -5. The time now is 06:40 PM.