Mail - Error sending to remote recipient

Hi,

I am trying to test an email server. I log into a remote host connect to the mail server using:

 telnet ipaddress 25

I get:

Trying ...
Connected to 7.
Escape character is '^]'.
220 mail.myserver.com ESMTP Postfix

Then I say hello:

EHLO mydomain.com

It says:

EHLO remotedomain.com
250-mail.mydomain.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

I send a mail telling who it’s from

MAIL FROM:<mail@domain.com>

It responds:

250 Ok

I say where it’s going:

RCPT TO:<test@domain.com>

Then I get an error:

Recipient address rejected: Relay access denied

Any ideas greatly appreciated…

.jlar

If domain.com mail is not handled by the server you connected to, then obviously the server is not going to accept your RCPT TO. This is basic anti-spam relay configuration.

Ok, I fixed this… now I get an OK when I send it. Where did it go though? I don’t see it when I type mail…

Mail log files are your friends, nay, any log file is your friend.

I looked in /var/log/mail. Nothing has been written to it since early October.

I think I’m close now… I set up two accounts ‘accounts’ and ‘postmaster’. I can send mail to accounts@mydomain.com from another host via telnet. It’s not being delivered locally though. If I send mail locally using the ‘mail’ command from the ‘postmaster’ account to the ‘accounts’ account, they don’t get it. Oddly, mail sent from postmaster to root works, root gets the mail…

Hi,

I figured out what was wrong here. I hope it is of use to someone else. You need to edit the file:

/etc/aliases

The handiest way is to have one account to receive all the mails, so that would look like:

sales: tom
orders: tom
info: tom

which means all sales@mydomain.com, orders@mydomain.com, info@mydomain.com will go to tom@mydomain.com. Now run the command:

postalias /etc/aliases

The reason root was getting all the mail is because everything is sent to root if an alias can’t be found for it.

I found this solution in:
Suse Linux by Chris Brown, published by O’Reilly

An excellent book…