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 Code:
Nov 11 13:04:38 box2 sendmail[6524]: iABD4cBA006524: from=root, size=71, class=0, nrcpts=1, msgid=<200411111304.iABD4cBA006524@localhost.localdomain>, relay=root@localhost and on box 1 Code:
Nov 11 13:10:40 box1 postfix/smtpd[8048]: connect from box2.intranet.com[yyy.yyy.yyy.8] Code:
# postconf -n Greetings and thanks in advance. |
Box 2 is configured to use sendmail, not postfix. You might want to fix that problem first. :) i.e. system-switch-mail
|
scowles, I've just noticed that box2 was _again_ configured with sendmail. Thanks for your hint of system-switch-mail.
So anyways, it doesn't matter with which MTA the mail gets sent. The problem is obviously on box1 which doesn't correctly route the mail... |
So what happens when you send an e-mail to: mail -s "Test to intranet" root@box1.intranet.com
Note the use of the FQDN in the e-mail address. |
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> Code:
Nov 11 15:17:43 box1 postfix/smtpd[3040]: connect from box2.intranet.com[10.218.226.8] |
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 |
r0b0, thanks, you hit the nail.
I had the following in /etc/postfix/aliases: Code:
# Person who should get root's mail. This alias |
All times are GMT -5. The time now is 10:23 AM. |