Problems sending mail from one local machine to the other
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Problems sending mail from one local machine to the other
Hi all,
I have two FC boxes in an intranet, let's call them box1.intranet.com and box2.intranet.com.
I've configured postfix on box1 and sendmail on box2 and can send mail without any problem to an external e-mail address, say joe@example.com. But if I send the mail to root@box1 (from box2, it gets delivered to the mailbox of postfix and not root. Why?
Let me explain how I send the mail, what logs I get in /var/log/maillog and finally what my main.cf configuration file looks like.
I sent the two mails from the command line:
Code:
# mail -s "Test to outside" joe@example.com
Hello World
Cc:
# mail -s "Test to intranet" root@box1
Hello World
Cc:
No big change. Note that I sync-ed the clocks of both computers. My initial post had a difference of about 2 minutes between both machines. In the mean time I've also switched the MTA to postfix on both computers and rebooted them for checking that the right service was started. I've also emptied the queues so that no other mail is polluting the logs. Here they are:
box2 logs:
Code:
Nov 11 15:17:42 box2 postfix/pickup[6179]: E4BB831FB2: uid=0 from=<root>
Nov 11 15:17:42 box2 postfix/cleanup[6510]: E4BB831FB2: message-id=<20041111141742.E4BB831FB2@box2.intranet.com>
Nov 11 15:17:42 box2 postfix/nqmgr[6180]: E4BB831FB2: from=<root@box2.intranet.com>, size=343, nrcpt=1 (queue active)
Nov 11 15:17:43 box2 postfix/smtp[6512]: E4BB831FB2: to=<root@box1.intranet.com>, relay=box1.intranet.com[10.218.226.11], delay=1, status=sent (250 Ok: queued as ED4DC717B1)
box1 logs:
Code:
Nov 11 15:17:43 box1 postfix/smtpd[3040]: connect from box2.intranet.com[10.218.226.8]
Nov 11 15:17:43 box1 postfix/smtpd[3040]: ED4DC717B1: client=box2.intranet.com[10.218.226.8]
Nov 11 15:17:44 box1 postfix/cleanup[3042]: ED4DC717B1: message-id=<20041111141742.E4BB831FB2@box2.intranet.com>
Nov 11 15:17:44 box1 postfix/smtpd[3040]: disconnect from box2.intranet.com[10.218.226.8]
Nov 11 15:17:44 box1 postfix/nqmgr[2016]: ED4DC717B1: from=<root@box2.intranet.com>, size=560, nrcpt=1 (queue active)
Nov 11 15:17:44 box1 postfix/local[3045]: ED4DC717B1: to=<postfix@box1.intranet.com>, orig_to=<root@box1.intranet.com>, relay=local, delay=1, status=sent (mailbox)
Check /etc/aliases or /etc/postfix/aliases
In most postfix installations on most systems, root is an alias for some other user, root's e-mail is delivered to this other user, not /var/spool/mail/root
# Person who should get root's mail. This alias
# must exist.
# CHANGE THIS LINE to an account of a HUMAN
root: postfix
# Note to the user: You must create the alias above!
# The root alias *must* exist under postfix because
# postfix runs as a non-privileged user and cannot
# touch a spool file which is UID/GID root
# The mapping to the postfix user is to ensure that root's mail
# doesn't get lost on a system installed out of the box.
# mailman aliases
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.