In order for postfix to be used to get everyones mail you need to have people send mail to
user@postfixhostname.domainname
This is the normal operation of postfix. It listens on port 25 for someone to connect and send mail to one of the servers users. Here is a way to test it.
Code:
telnet hostname.domainname 25
if you have no dns for the servername use it's ip address
[david@zeus david]$ telnet mail.mydomain.com 25
Trying 67.1.234.34...
Connected to mail.mydomain.com(67.1.234.34).
Escape character is '^]'.
220 mail.mydomain.com ESMTP Postfix
250 OK
250 OK
354 End data with <CR><LF>.<CR><LF>
250 Ok: queued as AA398142FB
221 Bye
Connection closed by foreign host.
as root check log file
tail -f /var/log/maillog
Mar 22 11:00:32 www postfix/nqmgr[5705]: AA398142FB: from=<david@mydomain.com>, size=350, nrcpt=1 (queue active)
Mar 22 11:00:32 www postfix/local[7583]: AA398142FB: to=<david@mydomain.com>, relay=local, delay=219, status=sent (mailbox)
Mar 22 11:00:44 www postfix/smtpd[7560]: disconnect from unknown[192.168.0.6]
now try to send to another address not on the server to make sure it is able to connect to the outside mailserver and send the mail to it's user.
here is the dialog
Code:
[david@zeus david]$ telnet mail.mydomain.com 25
Trying 67.1.234.34...
Connected to mail.mydomain.com (67.1.234.34).
Escape character is '^]'.
220 mail.mydomain.com ESMTP Postfix
mail from: david@mydomain.com
250 Ok
rcpt to:doodlebuggerr@hotmail.com
250 Ok
data
354 End data with <CR><LF>.<CR><LF>
testing 123
.
250 Ok: queued as 57E23142FB
and the log file
Mar 22 11:11:13 www postfix/cleanup[7674]: 57E23142FB: message-id=<20030322171052.57E23142FB@mail.mydomain.com>
Mar 22 11:11:13 www postfix/nqmgr[5705]: 57E23142FB: from=<david@mydomain.com>, size=355, nrcpt=1 (queue active)
Mar 22 11:11:14 www postfix/smtp[7688]: 57E23142FB: to=<doodlebuggerr@hotmail.com>, relay=mx2.hotmail.com[65.54.166.230], delay=22, status=sent (250 <20030322171052.57E23142FB@mail.myomain.com> Queued mail for delivery)
the mail server finds the MX record for hotmail from dns and connects to the server (mx2.hotmail.com) to relay the mail
have someone send mail to you from outside
check log file
tail -f /var/log/maillog
Mar 22 11:00:23 www postfix/smtpd[7581]: connect from mx.linuxquestions.org[64.246.34.13]
Mar 22 11:00:23 www postfix/smtpd[7581]: C9609142FC: client=mx.linuxquestions.org[64.246.34.13]
Mar 22 11:00:24 www postfix/cleanup[7582]: C9609142FC: message-id=<200303221647.h2MGlD205179@linuxquestions.org>
Mar 22 11:00:24 www postfix/nqmgr[5705]: C9609142FC: from=<nobody@linuxquestions.org>, size=1644, nrcpt=1 (queue active)
Mar 22 11:00:24 www postfix/local[7583]: C9609142FC: to=<david@mydomain.com>, relay=local, delay=1, status=sent (mailbox)
Mar 22 11:00:24 www postfix/smtpd[7581]: disconnect from mx.linuxquestions.org[64.246.34.13]