LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-02-2009, 04:33 AM   #1
h4k33m
LQ Newbie
 
Registered: Nov 2007
Posts: 17

Rep: Reputation: 0
Smile 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
 
Old 01-02-2009, 04:48 AM   #2
sandeeprhce5
LQ Newbie
 
Registered: Jan 2009
Location: Bhiwani Haryana India
Distribution: RedHat and Linux
Posts: 20

Rep: Reputation: 1
Lightbulb 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
 
Old 01-02-2009, 04:49 AM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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?

Last edited by billymayday; 01-02-2009 at 04:51 AM.
 
Old 01-06-2009, 04:22 PM   #4
h4k33m
LQ Newbie
 
Registered: Nov 2007
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by billymayday View Post
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 ...
 
Old 01-07-2009, 12:16 AM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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?
 
Old 01-14-2009, 08:00 AM   #6
h4k33m
LQ Newbie
 
Registered: Nov 2007
Posts: 17

Original Poster
Rep: Reputation: 0
the mail.log generator

Quote:
Originally Posted by billymayday View Post
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 ?
 
Old 01-14-2009, 01:11 PM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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?
 
Old 01-19-2009, 04:26 PM   #8
h4k33m
LQ Newbie
 
Registered: Nov 2007
Posts: 17

Original Poster
Rep: Reputation: 0
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?
 
Old 06-04-2015, 09:46 AM   #9
morriset
LQ Newbie
 
Registered: Jul 2010
Posts: 3

Rep: Reputation: 1
Thumbs down

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.
 
1 members found this post helpful.
Old 06-04-2015, 04:33 PM   #10
joec@home
Member
 
Registered: Sep 2009
Location: Galveston Tx
Posts: 291

Rep: Reputation: 70
Quote:
Originally Posted by morriset View Post
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
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix: cant send email from my Windows pc using my postfix mailserver elvisious Linux - Software 8 08-01-2008 07:01 PM
send mail in lan using postfix pqzha1 Linux - Networking 2 05-11-2008 01:24 AM
Postfix: Do not allow local users to send mail Termina Linux - Server 1 03-22-2007 05:15 PM
Postfix can't send email squirtle Linux - Newbie 1 09-24-2006 04:57 AM
Postfix wont send email robmainella Linux - Software 3 12-04-2003 11:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration